Fix: Bots attacking players not flagged

This commit is contained in:
Revision
2024-07-21 22:43:39 +02:00
parent 24547f4cc5
commit d0d8f3a40f

View File

@@ -95,6 +95,16 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
return false;
}
if (target->IsPlayer() && !target->IsPvP() && !target->IsFFAPvP() && (!bot->duel || bot->duel->Opponent != target || bot->duel->StartTime))
{
if (verbose)
{
botAI->TellError(Acore::StringFormat("%s is not flagged for pvp", target->GetName()));
}
return false;
}
if (bot->IsMounted() && bot->IsWithinLOSInMap(target))
{
WorldPacket emptyPacket;