diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index eb5e9c29..07aea077 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -392,7 +392,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) } } - if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup()) + if (!bot->InBattleground() && !bot->inRandomLfgDungeon() && bot->GetGroup() && !bot->GetGroup()->isLFGGroup()) { Player* leader = bot->GetGroup()->GetLeader(); if (leader && leader != bot) // Checks if the leader is valid and is not the bot itself @@ -1312,11 +1312,9 @@ void PlayerbotAI::DoNextAction(bool min) // if in combat but stick with old data - clear targets if (currentEngine == engines[BOT_STATE_NON_COMBAT] && bot->IsInCombat()) { - if (aiObjectContext->GetValue("current target")->Get() != nullptr || - aiObjectContext->GetValue("pull target")->Get() != ObjectGuid::Empty || - aiObjectContext->GetValue("dps target")->Get() != nullptr) + if (aiObjectContext->GetValue("current target")->Get() != nullptr) { - Reset(); + aiObjectContext->GetValue("current target")->Set(nullptr); } }