Merge pull request #369 from noisiver/optimize-pvp-flag-check

Optimize the check for PvP flag
This commit is contained in:
Revision
2024-07-23 18:24:38 +02:00
committed by GitHub
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;