*Remove possessed summons when aura is cancelled but not when channelling is canncelled. This fix Eye of Kilrogg.
--HG-- branch : trunk
This commit is contained in:
@@ -2148,25 +2148,6 @@ void Spell::cancel()
|
|||||||
|
|
||||||
finish(false);
|
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->RemoveDynObject(m_spellInfo->Id);
|
||||||
m_caster->RemoveGameObject(m_spellInfo->Id,true);
|
m_caster->RemoveGameObject(m_spellInfo->Id,true);
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-1
@@ -4673,7 +4673,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
|||||||
// Statue unsummoned at aura remove
|
// Statue unsummoned at aura remove
|
||||||
Totem* statue = NULL;
|
Totem* statue = NULL;
|
||||||
bool channeled = false;
|
bool channeled = false;
|
||||||
if(IsChanneledSpell(AurSpellInfo))
|
if(Aur->GetAuraDuration() && IsChanneledSpell(AurSpellInfo))
|
||||||
{
|
{
|
||||||
if(!caster) // can be already located for IsSingleTargetSpell case
|
if(!caster) // can be already located for IsSingleTargetSpell case
|
||||||
caster = Aur->GetCaster();
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user