Core/Auras: Fix Cold Blood handling on misses and parries.
Patch by dr.tenma. Fixes issue #2291 --HG-- branch : trunk
This commit is contained in:
1 parent
8ce0abbbc8
commit
41a9d3216c
3 files changed
+15
-2
No files matched your search
@@ -19226,7 +19226,7 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply)
|
||||
}
|
||||
|
||||
// Restore spellmods in case of failed cast
|
||||
void Player::RestoreSpellMods(Spell * spell)
|
||||
void Player::RestoreSpellMods(Spell *spell, uint32 ownerAuraId)
|
||||
{
|
||||
if (!spell || spell->m_appliedMods.empty())
|
||||
return;
|
||||
@@ -19241,6 +19241,10 @@ void Player::RestoreSpellMods(Spell * spell)
|
||||
if (!mod->ownerAura || !mod->ownerAura->GetCharges())
|
||||
continue;
|
||||
|
||||
// Restore only specific owner aura mods
|
||||
if (ownerAuraId && (ownerAuraId != mod->ownerAura->GetSpellProto()->Id))
|
||||
continue;
|
||||
|
||||
// check if mod affected this spell
|
||||
Spell::UsedSpellMods::iterator iterMod = spell->m_appliedMods.find(mod->ownerAura);
|
||||
if (iterMod == spell->m_appliedMods.end())
|
||||
|
||||
Reference in new issue
Block a user