diff options
author | QAston <qaston@gmail.com> | 2011-06-21 15:55:23 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-06-21 15:57:18 +0200 |
commit | fcc02a045acc32bfe54ff6406ac348fa13d3e1b7 (patch) | |
tree | 00b46b880f01a87ca8a0ebd86f539d87171e3153 | |
parent | a02d145a17eee1aff3652c7371d8f6502dc62788 (diff) |
Core/Auras: Remove auras with AURA_INTERRUPT_FLAG_HITBYSPELL on spell hit, only when target hit is enemy.
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4748c3e18f5..c4872841dc7 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1359,14 +1359,16 @@ 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; - if (!m_caster->IsFriendlyTo(unit)) + // 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)) { 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 if ((m_customAttr & SPELL_ATTR0_CU_AURA_CC) && unit->IsControlledByPlayer()) unit->RemoveAurasByType(SPELL_AURA_MOD_STEALTH); } - else + else if (m_caster->IsFriendlyTo(unit)) { // for delayed spells ignore negative spells (after duel end) for friendly targets // TODO: this cause soul transfer bugged |