diff options
author | Shocker <shocker@freakz.ro> | 2012-02-25 22:51:06 +0200 |
---|---|---|
committer | Shocker <shocker@freakz.ro> | 2012-02-25 22:51:06 +0200 |
commit | f0d0d95cf9350bfc77113a58e8541f6866658e9d (patch) | |
tree | 5ae1671df28ce9fed18698655dcb445635a75c75 /src | |
parent | c10e6708ed6bcef4602841ae5178e912842b0867 (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-x | src/server/game/Entities/Player/Player.cpp | 4 |
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); |