Core/Spells: Don't remove summoned gameobjects for non-channeled spells when spell cast was canceled

Fixes issues like Demonic Circle: Summon removing the last summoned circle when the new cast was canceled
This commit is contained in:
Shocker
2012-03-26 03:02:05 +03:00
parent 3f61bd0a26
commit fab1944ae4

View File

@@ -3080,7 +3080,8 @@ void Spell::cancel()
*m_selfContainer = NULL;
m_caster->RemoveDynObject(m_spellInfo->Id);
m_caster->RemoveGameObject(m_spellInfo->Id, true);
if (IsChanneledSpell(m_spellInfo)) // if not channeled then the object for the current cast wasn't summoned yet
m_caster->RemoveGameObject(m_spellInfo->Id, true);
//set state back so finish will be processed
m_spellState = oldState;