mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
bot auto leave group
This commit is contained in:
parent
0f544e6baa
commit
966c33f944
@ -273,7 +273,6 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
// bot->GetMotionMaster()->Clear();
|
// bot->GetMotionMaster()->Clear();
|
||||||
// bot->GetMotionMaster()->MoveIdle();
|
// bot->GetMotionMaster()->MoveIdle();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// cheat options
|
// cheat options
|
||||||
if (bot->IsAlive() && ((uint32)GetCheat() > 0 || (uint32)sPlayerbotAIConfig->botCheatMask > 0))
|
if (bot->IsAlive() && ((uint32)GetCheat() > 0 || (uint32)sPlayerbotAIConfig->botCheatMask > 0))
|
||||||
{
|
{
|
||||||
@ -303,6 +302,14 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup()) {
|
||||||
|
Player* leader = bot->GetGroup()->GetLeader();
|
||||||
|
PlayerbotAI* leaderAI = GET_PLAYERBOT_AI(leader);
|
||||||
|
if (leaderAI && !leaderAI->IsRealPlayer()) {
|
||||||
|
bot->RemoveFromGroup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool min = minimal;
|
bool min = minimal;
|
||||||
UpdateAIInternal(elapsed, min);
|
UpdateAIInternal(elapsed, min);
|
||||||
inCombat = bot->IsInCombat();
|
inCombat = bot->IsInCombat();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user