mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 03:05:43 +00:00
Merge pull request #566 from EricksOliveira/patch-2
Update PlayerbotAI.cpp
This commit is contained in:
@@ -355,15 +355,18 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup())
|
if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup())
|
||||||
{
|
{
|
||||||
Player* leader = bot->GetGroup()->GetLeader();
|
Player* leader = bot->GetGroup()->GetLeader();
|
||||||
PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader);
|
if (leader && leader != bot) // Checks if the leader is valid and is not the bot itself
|
||||||
if (leaderAI && !leaderAI->IsRealPlayer())
|
{
|
||||||
{
|
PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader);
|
||||||
bot->RemoveFromGroup();
|
if (leaderAI && !leaderAI->IsRealPlayer())
|
||||||
ResetStrategies();
|
{
|
||||||
}
|
bot->RemoveFromGroup();
|
||||||
}
|
ResetStrategies();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool min = minimal;
|
bool min = minimal;
|
||||||
UpdateAIInternal(elapsed, min);
|
UpdateAIInternal(elapsed, min);
|
||||||
@@ -5959,4 +5962,4 @@ float PlayerbotAI::GetItemScoreMultiplier(ItemQualities quality)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user