diff options
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 2cc6d08c0be..f0ecb5307b6 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -51,6 +51,7 @@ #include "ConditionMgr.h" #include "DisableMgr.h" #include "SpellScript.h" +#include "InstanceScript.h" #define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS) @@ -3717,16 +3718,17 @@ void Spell::finish(bool ok) // 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); - } - // 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 - if (m_caster->GetTypeId() == TYPEID_PLAYER) - { + // 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); } + if (m_caster->GetTypeId() == TYPEID_UNIT) + if (InstanceScript* instance = m_caster->GetInstanceScript()) + instance->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, m_spellInfo->Id, m_caster); + // Stop Attack for some spells if (m_spellInfo->Attributes & SPELL_ATTR0_STOP_ATTACK_TARGET) m_caster->AttackStop(); |
