diff options
author | megamage <none@none> | 2009-02-23 09:54:48 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-23 09:54:48 -0600 |
commit | 7ca5b9a8e7e5cf8dba02dc6a4a6d027b5892fb89 (patch) | |
tree | c4386ed4746ff6ba1b51bbe2ebcf3a33a203c32f | |
parent | 08b760e953fb1a1cdb798d47b8e7681d8422345a (diff) |
*Remove possessed summons when aura is cancelled but not when channelling is canncelled. This fix Eye of Kilrogg.
--HG--
branch : trunk
-rw-r--r-- | src/game/Spell.cpp | 19 | ||||
-rw-r--r-- | src/game/Unit.cpp | 18 |
2 files changed, 17 insertions, 20 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index f74bf664c5c..90a22d963e9 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2148,25 +2148,6 @@ void Spell::cancel() finish(false); - // Unsummon summon as possessed creatures on spell cancel - if(m_caster->GetTypeId() == TYPEID_PLAYER) - { - for(int i = 0; i < 3; ++i) - { - if(m_spellInfo->Effect[i] == SPELL_EFFECT_SUMMON && - (m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED || - m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 || - m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) - { - ((Player*)m_caster)->StopCastingCharm(); - break; - // Possession is removed in the UnSummon function - //if (m_caster->GetCharm()) - // ((TemporarySummon*)m_caster->GetCharm())->UnSummon(); - } - } - } - m_caster->RemoveDynObject(m_spellInfo->Id); m_caster->RemoveGameObject(m_spellInfo->Id,true); } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2e4a552c8d0..21a489f188c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4673,7 +4673,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) // Statue unsummoned at aura remove Totem* statue = NULL; bool channeled = false; - if(IsChanneledSpell(AurSpellInfo)) + if(Aur->GetAuraDuration() && IsChanneledSpell(AurSpellInfo)) { if(!caster) // can be already located for IsSingleTargetSpell case caster = Aur->GetCaster(); @@ -4700,6 +4700,22 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) } } } + + // Unsummon summon as possessed creatures on spell cancel + if(caster->GetTypeId() == TYPEID_PLAYER) + { + for(int i = 0; i < 3; ++i) + { + if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON && + (AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED || + AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 || + AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) + { + ((Player*)caster)->StopCastingCharm(); + break; + } + } + } } } |