mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
fix(Core/Entities): Improve interactions between taxis and players regarding PvP flag. (#23681)
This commit is contained in:
@@ -83,29 +83,19 @@ WorldObject* CreatureAI::GetSummoner() const
|
||||
inline bool IsValidCombatTarget(Creature* source, Player* target)
|
||||
{
|
||||
if (target->IsGameMaster())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!source->IsInWorld() || !target->IsInWorld())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!source->IsAlive() || !target->IsAlive())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!source->InSamePhase(target))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (source->HasUnitState(UNIT_STATE_IN_FLIGHT) || target->HasUnitState(UNIT_STATE_IN_FLIGHT))
|
||||
{
|
||||
if (source->IsInFlight() || target->IsInFlight())
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user