refactor(Core): code cleanup (part 3) (#6380)

This commit is contained in:
Francesco Borzì
2021-06-19 01:25:29 +02:00
committed by GitHub
parent 4d20442a1e
commit 23e9b85d0e
31 changed files with 34 additions and 65 deletions

View File

@@ -1849,7 +1849,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
cannot be solved from within the check in other way since target type cannot be called for the spell currently
Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
if (!caster->IsVehicle() && !(caster->GetCharmerOrOwner() == target))
if (!caster->IsVehicle() && caster->GetCharmerOrOwner() != target)
{
if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
return SPELL_FAILED_TARGET_AURASTATE;