Optimize the check for PvP flag

This commit is contained in:
Revision
2024-07-22 04:17:28 +02:00
parent dfa0bcc9ab
commit f1104d5315
2 changed files with 1 additions and 10 deletions

View File

@@ -95,16 +95,6 @@ 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;