Fixed Issue 10. Now summoned elemental is correctly despawned.
Try to find a better place for such check... --HG-- branch : trunk
This commit is contained in:
+13
-1
@@ -112,7 +112,19 @@ void Totem::UnSummon()
|
|||||||
CombatStop();
|
CombatStop();
|
||||||
RemoveAurasDueToSpell(GetSpell());
|
RemoveAurasDueToSpell(GetSpell());
|
||||||
|
|
||||||
// clear owenr's totem slot
|
// All summoned by totem minions must disappear when it is removed.
|
||||||
|
if (const SpellEntry* spInfo = sSpellStore.LookupEntry(GetSpell()))
|
||||||
|
{
|
||||||
|
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||||
|
{
|
||||||
|
if (spInfo->Effect[i] != SPELL_EFFECT_SUMMON)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
m_owner->RemoveAllMinionsByEntry(spInfo->EffectMiscValue[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// clear owner's totem slot
|
||||||
for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
|
for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
|
||||||
{
|
{
|
||||||
if(m_owner->m_SummonSlot[i]==GetGUID())
|
if(m_owner->m_SummonSlot[i]==GetGUID())
|
||||||
|
|||||||
Reference in New Issue
Block a user