rrtn
-
Posts
32 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by rrtn
-
-
added racial traits to rogue & fixed human trait
added new config option: PlayerbotAI.DisableBots
this allows you to disable the bots through the conf file. use the mangos_command_bot.sql to toggle security levels if you want to enable bots for different levels: player->mod->gm->admin
################################################################################################################### # PLAYERBOTAI CONFIGURATION # # PlayerbotAI.DisableBots # Disable the bot command and bot menu # Default: 0 - off # 1 - on # # PlayerbotAI.DebugWhisper # Enable debug output by whispering master # Default: 0 - off # 1 - on # # PlayerbotAI.FollowDistanceMin # PlayerbotAI.FollowDistanceMax # Min. and Max. follow distance for bots # Default: 0.5 / 1.0 ################################################################################################################### PlayerbotAI.DisableBots = 0 PlayerbotAI.DebugWhisper = 0 PlayerbotAI.FollowDistanceMin = 0.5 PlayerbotAI.FollowDistanceMax = 1.0
-
re-enabled hunter pet call redundancy fix with update by blueboy & some DK fixes & improvements
-
@Schmoozerd - if you mean to the main mangos branch that will never happen. this is just a very none blizz like option.
@wormyke - that is a patch :blink: copy/paste the code to a text document and rename it to group.patch
-
i prefer(and currently use) this alliance & horde grouping/trade method too...thx False.Genesis & patro
diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 18e77bf..2a36307 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -339,6 +339,8 @@ bool Group::AddMember(const uint64 &guid, const char* name) uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method) { + BroadcastGroupUpdate(); + // remove member and change leader (if need) only if strong more 2 members _before_ member remove if(GetMembersCount() > (isBGGroup() ? 1 : 2)) // in BG group case allow 1 members group { @@ -1687,3 +1689,18 @@ void Group::_homebindIfInstance(Player *player) player->m_InstanceValid = false; } } +void Group::BroadcastGroupUpdate(void) +{ + // Group Hack: force flags update on group leave - for values update hack + for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr) + { + Player *pp = sObjectMgr.GetPlayer(citr->guid); + if(pp && pp->IsInWorld()) + { + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2); + pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE); + DEBUG_LOG("-- Forced group value update for '%s'", pp->GetName()); + } + } +} + diff --git a/src/game/Group.h b/src/game/Group.h index 0411036..2e8ac12 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -337,6 +337,9 @@ class MANGOS_DLL_SPEC Group InstanceGroupBind* GetBoundInstance(Map* aMap); BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; } + //Group hack. + void BroadcastGroupUpdate(void); + protected: bool _addMember(const uint64 &guid, const char* name, bool isAssistant=false); bool _addMember(const uint64 &guid, const char* name, bool isAssistant, uint8 group); diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 0c54d41..ce959de 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -196,6 +196,7 @@ void WorldSession::HandleGroupAcceptOpcode( WorldPacket & /*recv_data*/ ) if(!group->AddMember(GetPlayer()->GetGUID(), GetPlayer()->GetName())) return; + group->BroadcastGroupUpdate(); } void WorldSession::HandleGroupDeclineOpcode( WorldPacket & /*recv_data*/ ) diff --git a/src/game/Object.cpp b/src/game/Object.cpp index e2853d4..ba6800d 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -691,6 +691,38 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask * else *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_OTHER_TAGGER); } + // FG: pretend that OTHER players in own group are friendly ("blue") + else if(index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE) + { + bool ch = false; + if(target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER && target != this) + { + if(target->IsInSameGroupWith((Player*)this) || target->IsInSameRaidWith((Player*)this)) + { + if(index == UNIT_FIELD_BYTES_2) + { + DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (flag)", target->GetName(), ((Player*)this)->GetName()); + *data << ( m_uint32Values[ index ] & (UNIT_BYTE2_FLAG_SANCTUARY << 8) ); // this flag is at uint8 offset 1 !! + ch = true; + } + else if(index == UNIT_FIELD_FACTIONTEMPLATE) + { + FactionTemplateEntry const *ft1, *ft2; + ft1 = ((Player*)this)->getFactionTemplateEntry(); + ft2 = ((Player*)target)->getFactionTemplateEntry(); + if(ft1 && ft2 && !ft1->IsFriendlyTo(*ft2)) + { + uint32 faction = ((Player*)target)->getFaction(); // pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work) + DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (faction %u)", target->GetName(), ((Player*)this)->GetName(), faction); + *data << uint32(faction); + ch = true; + } + } + } + } + if(!ch) + *data << m_uint32Values[ index ]; + } else { // send in current format (float as float, uint32 as uint32) @@ -1668,6 +1700,19 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa return pCreature; } +void Object::ForceValuesUpdateAtIndex(uint32 i) +{ + m_uint32Values_mirror[i] = GetUInt32Value(i) + 1; // makes server think the field changed + if(m_inWorld) + { + if(!m_objectUpdated) + { + AddToClientUpdateList(); + m_objectUpdated = true; + } + } +} + namespace MaNGOS { class NearUsedPosDo diff --git a/src/game/Object.h b/src/game/Object.h index 4707f47..b26d7fe 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -301,6 +301,8 @@ class MANGOS_DLL_SPEC Object virtual bool hasQuest(uint32 /* quest_id */) const { return false; } virtual bool hasInvolvedQuest(uint32 /* quest_id */) const { return false; } + + void ForceValuesUpdateAtIndex(uint32); protected: Object ( ); diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index 6662545..d64062c 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -532,11 +532,11 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) return; } - if (pOther->GetTeam() !=_player->GetTeam() ) + /*if (pOther->GetTeam() !=_player->GetTeam() ) { SendTradeStatus(TRADE_STATUS_WRONG_FACTION); return; - } + }*/ if (!pOther->IsWithinDistInMap(_player,10.0f,false)) {
updated for 8873
-
updated mangos_botguy, new teleport fix & hunter pet call redundancy fix by blueboy
@blueboy - thanks again for contributing to this project
EDIT: disabled(not removed) hunter pet call redundancy fix for now cause it was interfering with other pet functions
-
revert teleport patch, some more paladin work.
@blueboy - your need or greed update has default after 0 cases, i am testing your new teleport fix now(interesting approach none the less). also, thank you for taking the time to explain each patch and the process you used to come up with it. so a special thanks to blueboy for all the recent work on playerbot. sry, i wish i had more time for testing(i didnt even notice the bug in last teleport change til LordPsyan posted) but between being busy and not playing WoW as much in my free time(damn why does modern warfare have to be sooo good ) oh and Stillhard meant by post as code plz use the (code)example(/code)
your playerbotai patch should look like this:
diff --git a/src/game/PlayerbotAI.cpp b/src/game/PlayerbotAI.cpp index 77c6a1f..009d3bd 100644 --- a/src/game/PlayerbotAI.cpp +++ b/src/game/PlayerbotAI.cpp @@ -2401,7 +2401,7 @@ void PlayerbotAI::HandleTeleportAck() if (m_bot->IsBeingTeleportedNear()) { WorldPacket p = WorldPacket(MSG_MOVE_TELEPORT_ACK, 8 + 4 + 4); - p << m_bot->GetGUID(); + p.appendPackGUID(m_bot->GetGUID()); p << (uint32) 0; // supposed to be flags? not used currently p << (uint32) time(0); // time - not currently used m_bot->GetSession()->HandleMoveTeleportAck(p);
OR if adding code(like the need or greed patch):
case CMSG_LOOT_ROLL: { WorldPacket p(packet); //WorldPacket packet for CMSG_LOOT_ROLL, (8+4+1) uint64 Guid; uint32 NumberOfPlayers; uint8 rollType; p.rpos(0); //reset packet pointer p >> Guid; //guid of the item rolled p >> NumberOfPlayers; //number of players invited to roll p >> rollType; //need,greed or pass on roll for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it) { uint32 choice = urand(0,2); //returns 0,1,or 2 Player* const bot = it->second; if(!bot) return; Group* group = bot->GetGroup(); if(!group) return; switch (group->GetLootMethod()) { case GROUP_LOOT: // bot random roll group->CountRollVote(bot->GetGUID(), Guid, NumberOfPlayers, choice); break; case NEED_BEFORE_GREED: choice = 1; // bot need roll group->CountRollVote(bot->GetGUID(), Guid, NumberOfPlayers, choice); break; case MASTER_LOOT: choice = 0; // bot pass on roll group->CountRollVote(bot->GetGUID(), Guid, NumberOfPlayers, choice); break; default: break; } switch (rollType) { case ROLL_NEED: bot->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED, 1); break; case ROLL_GREED: bot->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED, 1); break; } } return; }
this makes life easier for ppl wanting to test your work
-
need or greed patch by blueboy, implement first aid in all classes, rewrote DK also added debug output & some major paladin work also added debug output.
-
thank you very much for your contribution to this project blueboy, your need or greed loot patch sounds very interesting and yes feel free to post as much as you want also i will take this time to say; this is an open invitation to ALL who want to help playerbot! many playerbot members seem to be AFK at the moment so if you have anything to contribute(a fix or update) plz post here!
thanks, rrtn
-
recommitted locale patch by ckegg, some more hunter & warrior work.
@ckegg - wow, thanks for clearing that up i had no idea you could piggyback foreign client dbc on top of enUS dbc! this really is news to me cause i have only used the enUS client
-
Warrior: fixed some wrong spellids & worked on battle stance attacks. Hunter: added misdirection & thanks to blueboy for feed pets patch.
@ckegg - ok, i found your getSpellId locale patch commit. i dont understand exactly what this does for the spell commands? please explain. since we are just sending the commands to the client, instead of the spell numbers, wouldnt this be a client side issue? like only enUS & enGB clients would understand the "heal" command. this is why i thought we needed some translation patches :confused:
-
merged with mangos branch master. updated druid & warlock too
EDIT:
@wargameskhaine - sry, i dont use the "tank command" i just read this and will look into it. collinsp implemented that command...speaking of, he started this thread cause yad02 'abandoned' the original playerbot thread and now collinsp is gone?!?!
-
Does time I tested,
At that time the rogue generated crash when he was ordered to attack <- fixed
DK and freeze the server. <- fixed?
And every time a bot teleports generated crash also killed. <- not fixed (only happens inside instance)
I will now test in 3.2.2a to see it and I report aki later this weekend
fixed rogue crash, some minor DK work & mangos_botguy.sql updated
-
Ok... found it. Seems someone updated ACE and modified the LockedQueue stuff since last merge (before mine). There is indeed no empty() anymore, regardless of what VS9 and IntelliSense think. Packets are pulled by next(packet) and then deleted. Will update playerbot code in WorldSession.cpp asap and push it to repos.
sorry, that was my push. at the time i was only checking in on this thread sporadically and also went from playing WoW alot to not so much. that fix was cherry picked from this thread and not fully tested. however, i only have myself to blame ...anyway great to see you back Runsttren!
@sickofitall - playerbot works fine on rev_8620
@leomkyll - plz, post the crash log or tell us which bot(if any) is responsible for the crash.
EDIT: updated playerbot branch to 3.2.2a
thx to everyone on mangos team that make this switch possible.
special thanks to TOM_RUS, VladimirMangos, balrok, arrai
-
i guess im not the only one busy right now :confused: i only updated the branch to current.
where is everyone? ckegg is right, playerbot needs some work
-
Taken from Insider's cumulative patches:
I use it and it works perfectly.
lol "Insider"? those are KAPATEJIb Cumulative Packs @ Russian Mangos DC
d/l this: http://ftp.filekeeper.org/download/insider/Mangos6/Cumulative%20Pack/8296_1294.rar
and find 81_anticheat.patch inside the rar...thats it
-
Auto-merging src/mangosd/mangosd.conf.dist.in
CONFLICT (content): Merge conflict in src/mangosd/mangosd.conf.dist.in
Auto-merging win/VC90/game.vcproj
Automatic merge failed; fix conflicts and then commit the result.
Mightylink@ZVC /c/Northrend (RPPVP)/Mangos Source/mangos + ahbot + playerbot/man
gos (master|MERGING)
$
im sry but this is just plain sad
you should know that that merge was completely eady to be compiled! the only conflict was in the mangosd.conf which most everyone manually configure that anyway
-
merged branch 'master' of git://github.com/mangos/mangos.
since 3.2.0 is right around the corner i played with merging playerbot into 320 branch and all went well
for those interested heres a simple batch file i wrote to get you started on playerbot 320...dont forget those 320 sqls
@echo off cd "C:\\svn" call "C:\\Program Files\\Git\\cmd\\git.cmd" clone git://github.com/playerbot/mangos.git playerbot cd playerbot call "C:\\Program Files\\Git\\cmd\\git.cmd" checkout -b 320 call "C:\\Program Files\\Git\\cmd\\git.cmd" pull git://github.com/mangos/mangos.git 320 pause
enjoy
-
hello everyone !
so i got the source at git://github.com/playerbot/mangos.git and compiled it.
i assume, tho, that i have some .sql to add to the dB for it to work ?
one of my friend prefers trinity, and he had 2 .sql files to add.
i see this mangos_botguy.sql file, i was wondering if it was what i was looking for.
and if so, in the characters DB ?
or do i simply restore from dump the files in the sql folder ?
i've made it this far, i dont want to mess it up !
hehe
tank you VERY much everyone
heres some help on the 2 sql's
1. mangos_botguy.sql - provides an npc with a menu of your available characters for recruiting as a bot. basically it uses the add/remove commands for you. type .npc add 99002 to spawn him
2. mangos_command_bot.sql - provides a command table entry so if you only want bots to be accessed by gm's and not players:
INSERT INTO `command`(`name`,`security`,`help`) values ('bot',[b][color=green]0[/color][/b],'Syntax: .bot [$command] [$playername]\\r\\n\\r\\nadd [$playername] or remove [$playername]');
change 0(player level) to 1, 2 or 3(gm levels)
-
Tried pulling playerbot with the latest mangos [8208] and got a merge conflict error with WorldSession.cpp
k, i merged playerbot to the latest mangos rev. i did some work on the hunter & priest classes. another thing i wasnt so sure about, but did, was made bots quieter. the talking bots a great for debugging but if you are playing with other real people its sucks digging through every bot action theyve done to find your friends message however, it is a nice perk so i just limited them to less common/rare scenarios, like the priest casting scream rather than say the priest casting renew which fills your whole chat log with "I'm casting renew." for miles
-
@rrtn: Thx. Jaw is fine now. Next wednesday the doc takes the stitches out. And what exactly do you mean by 'problem commit' and which part of code should be omitted to let the movement appear right?!?!
[Edit]: btw... do you have any crashes with Playerbot after last changes?
Well, what can i say Runsttren?...Brilliant!...just plain brilliant! crash issue resolved. i just merged the latest mangos with playerbot branch and i cannot crash it and im really tryin'
-
k, im compiling the latest playerbot
just thinkin' of this: you know what would be great if we could reorder the out of combat actions
case in point lets say after a long/hard battle with a boss + others there is a good chance that when the fight is over your bots and you have curses, damage spells, draining spells still on them, so the problem is is that they will die while looting the dead victims. meaning it would be more logical if after combat has eneded they will group heal, remove curses & remove drain spells and only after begin looting...what do you think?
-
Update:
- added support for combat orders 'assist' and 'protect'
- added text comand 'orders' - bot will whisper orders and status
- bot will set movement order to follow master on creation
What changed:
The '/p orders' is mainly for debugging or status checking on bots. It will tell you current combat and movement orders and one or two more other things. The COs for assist and protect are implemented within PlayerbotAI::GetCombatTarget (which is called every update cycle spend in combat). For the COs tank and heal there is more to do within the PlayerbotClassAIs. I.e. warrior should change stance to defense, cast Sunder Armor, Thunder Clap, etc... or as an example for CO heal a priest should just concentrate on healing and preventing threat.
Known bugs:
Sometimes bots do not react properly after combat. They stay around not going back to follow even if movement order is on follow. After some minutes they start to follow again... is this a timer issue?!?!
@rrtn: ahhhh u mean the big reprogramming I did for combat and movement orders! Yes, well, I did recode most of the movement and combat stuff within PlayerbotAI I did hope to get everything right in my first commit, but I didn't...
and again thx a ton Runsttren
i finally got off my "git-ass" and pushed my AI fixes
i forgot to push the mangos_command_bot.sql
oh well no biggy do when i have more stuf to test/add. for those interested all it is a toggle for is a gm level toggle
INSERT INTO `command`(`name`,`security`,`help`) values ('bot',0,'Syntax: .bot [$command] [$playername]\\r\\n\\r\\nadd [$playername] or remove [$playername]');
-
@rrtn: Thx. Jaw is fine now. Next wednesday the doc takes the stitches out. And what exactly do you mean by 'problem commit' and which part of code should be omitted to let the movement appear right?!?!
[Edit]: btw... do you have any crashes with Playerbot after last changes?
about the crash fix sry, been busy and havent compiled it since that push but will report back asap.
as for trouble shooting the movement issues what i did was generate a patch from the playerbot branch @ commit 8076 (a commit prior to the one you made), applied it to the latest mangos rev and the bots behave regularly plus they teleport to you when add them and you dont have to type "follow" to get them next to you(the way it is currently). basically its just these minor issues i posted before
2.(minor) odd bot movement: the behaviour on bot movement is not always normal
3.(minor) add bot=no teleport to you: the bot when added to the world stay were they where last only
and of course thx again Runsttren
-
@rrtn: Ok the weird movement is cause bots are same as players. And player class is never setting the monster movement flag anywhere. But this flag is needed to let the unit appear to run, walk backward, etc. Think we have to implement it on our own for the PlayerbotAI class. Somehow we should check howthe bot is moving and set the movement flag to the correct state...
my only question about this statement is if you ommit the code introduced in the "problem commit" the bots movement is completely normal.
oh yea, off topic. i hope you and your jaw are fellling much better now meant to post that a few comments ago, oops...better late than never :rolleyes:
Playerbot (archive)
in OldCore modifications
Posted
im currently in the long process of moving across the country(US) from brooklyn to los angeles...yikes
playerbot is not abandoned by me (however, i have no idea where the other members are). i have not be able to work on/update playerbot...why? just life in general(holidays, family, travel, moving, new work, ect.) sorry i know 3.3.0a is out
and a big thanks to all the people that help out on this thread, especially blueboy...i will have to take a look at this new branch
im excited about my move...yay but, (i have a car)not so much about the drive