Jump to content

rrtn

Members
  • Posts

    32
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

rrtn's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. 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
  2. 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
  3. re-enabled hunter pet call redundancy fix with update by blueboy & some DK fixes & improvements
  4. @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
  5. 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
  6. 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
  7. 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
  8. 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.
  9. 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
  10. 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
  11. 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:
  12. 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?!?!
  13. fixed rogue crash, some minor DK work & mangos_botguy.sql updated
  14. 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
  15. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use