diff options
| author | Shauren <shauren.trinity@gmail.com> | 2011-02-03 22:20:40 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-02-03 22:20:40 +0100 |
| commit | c2b0bcbd6c8155812857523681cd787059cd9bf9 (patch) | |
| tree | b325612ecdddbb1235c676a862435c83374f95cf /src/server/game/Spells | |
| parent | 7ea8bad07f64ed5886130fcc8016c0c72a32758e (diff) | |
Core/Instances: Implemented DungeonEncounter.dbc for creating completed encounters mask to use in packets
Core/Dungeon Finder: Implemented new way of giving random dungeon rewards, linked to DungeonEncounter.dbc
Diffstat (limited to 'src/server/game/Spells')
| -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(); |
