diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index e7781be00c..caf1f4e46a 100755 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -1547,7 +1547,6 @@ class Unit : public WorldObject bool isFrozen() const; bool isTargetableForAttack(bool checkFakeDeath = true) const; - bool isAttackableByAOE(SpellInfo const* spellProto = NULL) const; bool canAttack(Unit const* target, bool force = true) const; virtual bool IsInWater() const; virtual bool IsUnderWater() const; diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index 50c3a093a1..ee3e7eab1b 100755 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -727,6 +727,9 @@ namespace Trinity case SPELL_TARGETS_ENEMY: if (target->isTotem()) continue; + // can't be checked in SpellInfo::CheckTarget - needs more research + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + continue; if (i_source->IsControlledByPlayer()) { if (i_source->IsFriendlyTo(target)) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index eebf93597f..2a05907996 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1529,7 +1529,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b if (target != caster && target->GetCharmerOrOwnerGUID() != caster->GetGUID()) { // any unattackable target skipped - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_OOC_NOT_ATTACKABLE)) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return SPELL_FAILED_BAD_TARGETS; }