mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spells: Remove spellmods from SpellMod owner instead of caster (needed so pet casts properly remove aura charges)
This commit is contained in:
@@ -3672,15 +3672,18 @@ void Spell::finish(bool ok)
|
||||
{
|
||||
if (!m_triggeredByAuraSpell)
|
||||
m_caster->ToPlayer()->UpdatePotionCooldown(this);
|
||||
}
|
||||
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
{
|
||||
// triggered spell pointer can be not set in some cases
|
||||
// this is needed for proper apply of triggered spell mods
|
||||
m_caster->ToPlayer()->SetSpellModTakingSpell(this, true);
|
||||
modOwner->SetSpellModTakingSpell(this, true);
|
||||
|
||||
// Take mods after trigger spell (needed for 14177 to affect 48664)
|
||||
// mods are taken only on succesfull cast and independantly from targets of the spell
|
||||
m_caster->ToPlayer()->RemoveSpellMods(this);
|
||||
m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
|
||||
modOwner->RemoveSpellMods(this);
|
||||
modOwner->SetSpellModTakingSpell(this, false);
|
||||
}
|
||||
|
||||
// Stop Attack for some spells
|
||||
|
||||
Reference in New Issue
Block a user