aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-03 17:20:35 -0600
committermegamage <none@none>2008-11-03 17:20:35 -0600
commit94c03e321186bc73e7027a3308ce889250baa594 (patch)
treeef2855703b968990965e6824f617efa65fef5bf1 /src/game/Unit.cpp
parent6a8878fb5da29c4ff0deac8e8819489089731704 (diff)
[svn] Fix hunter's frozen trap, half duration when pvp.
Use vector to store linked spell information to support multiple effects. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index f997ce6b506..e0f242313a7 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4154,15 +4154,15 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
statue = ((Totem*)caster);
- if(int32 spell_triggered = spellmgr.GetSpellLinked(-(int32)Aur->GetSpellProto()->Id, 0))
+ if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)Aur->GetSpellProto()->Id))
{
- if(spell_triggered > 0)
+ for(std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
{
- if(Unit* caster = Aur->GetCaster())
- CastSpell(this, spell_triggered, true, 0, 0, caster->GetGUID());
+ if(spell_triggered < 0)
+ RemoveAurasDueToSpell(-(*i));
+ else if(Unit* caster = Aur->GetCaster())
+ CastSpell(this, *i, true, 0, 0, caster->GetGUID());
}
- else
- RemoveAurasDueToSpell(-spell_triggered);
}
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);