From e8f8b66636cbcd5d9995ce8b3bb64afb5a835851 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 27 Jul 2009 17:32:56 +0200 Subject: *Implement immunity removal part for Shattering Throw ability - by thenecromancer. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 13 +++++++++++++ src/game/Unit.cpp | 16 ++++++++++++++++ src/game/Unit.h | 1 + 3 files changed, 30 insertions(+) (limited to 'src') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f36d7048efe..25ea3015f41 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5480,6 +5480,19 @@ void Spell::EffectScriptEffect(uint32 effIndex) } break; } + case SPELLFAMILY_WARRIOR: + { + // Shattering Throw + if ( m_spellInfo->SpellFamilyFlags[1] & 0x1 ) + { + if(!unitTarget) + return; + // remove shields, will still display immune to damage part + unitTarget->RemoveAurasWithMechanic(1<second->GetId() != except) + { + if(GetAllSpellMechanicMask(iter->second->GetSpellProto()) & mechanic_mask) + { + RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL); + continue; + } + } + ++iter; + } +} + void Unit::UpdateInterruptMask() { m_interruptMask = 0; diff --git a/src/game/Unit.h b/src/game/Unit.h index 6d8f8838cf3..22fe4ccc687 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1450,6 +1450,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = NULL); void RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID); void RemoveMovementImpairingAuras(); + void RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except=0); void RemoveAllAuras(); void RemoveArenaAuras(bool onleave = false); void RemoveAllAurasOnDeath(); -- cgit v1.2.3