mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
More bot raid changes
This commit is contained in:
+6
-13
@@ -2300,7 +2300,11 @@ bool Bot::Process()
|
||||
}
|
||||
|
||||
// Bot AI
|
||||
AI_Process();
|
||||
Raid* raid = entity_list.GetRaidByBot(this);
|
||||
if (raid)
|
||||
AI_Process_Raid();
|
||||
else
|
||||
AI_Process();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2540,12 +2544,10 @@ void Bot::AI_Process()
|
||||
Client* bot_owner = (GetBotOwner() && GetBotOwner()->IsClient() ? GetBotOwner()->CastToClient() : nullptr);
|
||||
Group* bot_group = GetGroup();
|
||||
|
||||
Raid* bot_raid = entity_list.GetRaidByBot(this);
|
||||
|
||||
//#pragma region PRIMARY AI SKIP CHECKS
|
||||
|
||||
// Primary reasons for not processing AI
|
||||
if (!bot_owner || (!bot_group && !bot_raid) || !IsAIControlled()) {
|
||||
if (!bot_owner || (!bot_group) || !IsAIControlled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2563,15 +2565,6 @@ void Bot::AI_Process()
|
||||
if (bot_group) {
|
||||
leash_owner = (bot_group->GetLeader() && bot_group->GetLeader()->IsClient() ? bot_group->GetLeader()->CastToClient() : bot_owner);
|
||||
}
|
||||
else if (bot_raid) {
|
||||
int bot_raid_group = bot_raid->GetGroup(GetName());
|
||||
if (bot_raid_group > 0) {
|
||||
leash_owner = bot_raid->GetGroupLeader(bot_raid_group)->CastToClient();
|
||||
}
|
||||
else {
|
||||
leash_owner = bot_raid->GetLeader();
|
||||
}
|
||||
}
|
||||
|
||||
if (!leash_owner) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user