aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShocker <shocker@freakz.ro>2012-02-25 22:51:06 +0200
committerShocker <shocker@freakz.ro>2012-02-25 22:51:06 +0200
commitf0d0d95cf9350bfc77113a58e8541f6866658e9d (patch)
tree5ae1671df28ce9fed18698655dcb445635a75c75 /src
parentc10e6708ed6bcef4602841ae5178e912842b0867 (diff)
Core/Spells: Fix spellmod restore on failed cast for auras that have multiple mods for different spells (by lost-illusion)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 4b3c7f9a83a..f5b7d487219 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -20065,9 +20065,13 @@ void Player::RestoreSpellMods(Spell* spell, uint32 ownerAuraId, Aura* aura)
continue;
// check if mod affected this spell
+ // first, check if the mod aura applied at least one spellmod to this spell
Spell::UsedSpellMods::iterator iterMod = spell->m_appliedMods.find(mod->ownerAura);
if (iterMod == spell->m_appliedMods.end())
continue;
+ // secondly, check if the current mod is one of the spellmods applied by the mod aura
+ if (!(mod->mask & spell->m_spellInfo->SpellFamilyFlags))
+ continue;
// remove from list
spell->m_appliedMods.erase(iterMod);