This commit is contained in:
bash
2025-10-09 20:52:32 +02:00
parent cf4f0f6dc7
commit 31ed5cbb65
2 changed files with 4 additions and 4 deletions

View File

@@ -519,7 +519,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
} }
group = bot->GetGroup(); group = bot->GetGroup();
if (!group) if (group)
{ {
botAI->ResetStrategies(); botAI->ResetStrategies();
} }

View File

@@ -1521,7 +1521,7 @@ bool RandomPlayerbotMgr::ProcessBot(Player* bot)
{ {
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
if (botAI) if (!botAI)
return false; return false;
if (bot->InBattleground()) if (bot->InBattleground())
@@ -2379,7 +2379,7 @@ void RandomPlayerbotMgr::IncreaseLevel(Player* bot)
void RandomPlayerbotMgr::RandomizeFirst(Player* bot) void RandomPlayerbotMgr::RandomizeFirst(Player* bot)
{ {
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
if (botAI) if (!botAI)
return; return;
uint32 maxLevel = sPlayerbotAIConfig->randomBotMaxLevel; uint32 maxLevel = sPlayerbotAIConfig->randomBotMaxLevel;
@@ -2474,7 +2474,7 @@ void RandomPlayerbotMgr::RandomizeFirst(Player* bot)
void RandomPlayerbotMgr::RandomizeMin(Player* bot) void RandomPlayerbotMgr::RandomizeMin(Player* bot)
{ {
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot); PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
if (botAI) if (!botAI)
return; return;
PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "RandomizeMin"); PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_RNDBOT, "RandomizeMin");