aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-10-29 14:19:31 -0500
committermegamage <none@none>2008-10-29 14:19:31 -0500
commitfebb2d61472bbce18e008967dad04d2eaaa063cf (patch)
tree18ff2936d58cbe7507c23c7d755a5f5d8b41c2cd /src/game/Unit.cpp
parent5e809c2a6bc87d342324b54582dfe6d0c538dedc (diff)
[svn] Fix broken spell target 38 (script target).
Implement linked spells, but will not enable it before testing. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d079219588b..118fa71c761 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4163,6 +4163,18 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
if(caster->GetTypeId()==TYPEID_UNIT && ((Creature*)caster)->isTotem() && ((Totem*)caster)->GetTotemType()==TOTEM_STATUE)
statue = ((Totem*)caster);
+
+ if(int32 spell_triggered = spellmgr.GetSpellLinked(-(int32)Aur->GetSpellProto()->Id, 0))
+ {
+ if(spell_triggered > 0)
+ {
+ if(Unit* caster = Aur->GetCaster())
+ CastSpell(this, spell_triggered, true, 0, 0, caster->GetGUID());
+ }
+ else
+ RemoveAurasDueToSpell(-spell_triggered);
+ }
+
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
Aur->ApplyModifier(false,true);
Aur->_RemoveAura();