mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge branch 'liyunfan1223:master' into master
This commit is contained in:
@@ -357,6 +357,8 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup())
|
if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup())
|
||||||
{
|
{
|
||||||
Player* leader = bot->GetGroup()->GetLeader();
|
Player* leader = bot->GetGroup()->GetLeader();
|
||||||
|
if (leader && leader != bot) // Checks if the leader is valid and is not the bot itself
|
||||||
|
{
|
||||||
PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader);
|
PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader);
|
||||||
if (leaderAI && !leaderAI->IsRealPlayer())
|
if (leaderAI && !leaderAI->IsRealPlayer())
|
||||||
{
|
{
|
||||||
@@ -364,6 +366,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
ResetStrategies();
|
ResetStrategies();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool min = minimal;
|
bool min = minimal;
|
||||||
UpdateAIInternal(elapsed, min);
|
UpdateAIInternal(elapsed, min);
|
||||||
|
|||||||
Reference in New Issue
Block a user