Core/AI: Replace many Unit::IsHostileTo with Unit::IsValidAttackTarget or Creature::canCreatureAttack.
This commit is contained in:
1 parent
580264b5a5
commit
fe25ce4fa3
27 files changed
+30
-49
No files matched your search
@@ -1462,9 +1462,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, const uint32 effectMask, bool
|
||||
if (m_spellInfo->Speed > 0.0f && unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE) && unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
|
||||
return SPELL_MISS_EVADE;
|
||||
|
||||
// check for IsHostileTo() instead of !IsFriendlyTo()
|
||||
// ex: spell 47463 needs to be casted by different units on the same neutral target
|
||||
if (m_caster->IsHostileTo(unit))
|
||||
if (m_caster->IsValidAttackTarget(unit))
|
||||
{
|
||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
|
||||
//TODO: This is a hack. But we do not know what types of stealth should be interrupted by CC
|
||||
|
||||
Reference in new issue
Block a user