sunnyqeen
-
Posts
3 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by sunnyqeen
-
-
Hi blueboy,
Thanks for your attention.
I will have a try.
-
Fix for the bot flight.
Bots will automatically learn the new flight places when master goes to speek to the flight guy.
Currently bots will automatically learn the new flight places only when master start flying.
diff --git a/src/game/playerbot/PlayerbotMgr.cpp b/src/game/playerbot/PlayerbotMgr.cpp index f55d2c2..d56d39f 100644 --- a/src/game/playerbot/PlayerbotMgr.cpp +++ b/src/game/playerbot/PlayerbotMgr.cpp @@ -398,9 +398,67 @@ void PlayerbotMgr::HandleMasterIncomingPacket(const WorldPacket& packet) } } break; + + case CMSG_TAXIQUERYAVAILABLENODES: + { + WorldPacket p(packet); + p.rpos(0); // reset reader + ObjectGuid npcGUID; + p >> npcGUID; + + Creature *pNpc = m_master->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER); + if (pNpc) + { + for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it) + { + Player* const bot = it->second; + if (!bot) + return; + + Creature *unit = bot->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER); + if (!unit) + { + DEBUG_LOG("PlayerbotAI: talk to FLIGHTMASTER - %s not found or you can't interact with it.", npcGUID.GetString().c_str()); + continue; + } + bot->GetSession()->SendLearnNewTaxiNode(unit); + } + return; + } + return; + } + // if master talks to an NPC case CMSG_GOSSIP_HELLO: + { + WorldPacket p(packet); + p.rpos(0); // reset reader + ObjectGuid npcGUID; + p >> npcGUID; + + Creature *pNpc = m_master->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER); + if (pNpc) + { + for (PlayerBotMap::const_iterator it = GetPlayerBotsBegin(); it != GetPlayerBotsEnd(); ++it) + { + Player* const bot = it->second; + if (!bot) + return; + + Creature *unit = bot->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_FLIGHTMASTER); + if (!unit) + { + DEBUG_LOG("PlayerbotAI: talk to FLIGHTMASTER - %s not found or you can't interact with it.", npcGUID.GetString().c_str()); + continue; + } + + bot->GetSession()->SendLearnNewTaxiNode(unit); + } + return; + } + + } case CMSG_QUESTGIVER_HELLO: { WorldPacket p(packet);
Playerbot
in OldCore modifications
Posted
PlayerbotAI fix:
If the player is unmounted, when add a mounted bot, the bot will not change it's mounted status.
If the player and bots are mounted, and the bots is under attacked, the bot will stoped following the player.