[Bots] Cleanup AI_IdleCastCheck Logic (#3004)

* [Bots] Cleanup AI_IdleCastCheck Logic

* cleanup logic
This commit is contained in:
Aeadoin authored and GitHub committed 2023-02-25 20:16:09 -05:00
1 parent a470931fdd
commit d2c3c14ae0
2 files changed
+47 -27

No files matched your search

+1
View File
@@ -2470,6 +2470,7 @@ void Bot::AI_Process()
}
// We also need a leash owner and follow mob (subset of primary AI criteria)
bot_group->VerifyGroup();
Client* leash_owner = (bot_group->GetLeader() && bot_group->GetLeader()->IsClient() ? bot_group->GetLeader()->CastToClient() : bot_owner);
if (!leash_owner) {
return;