Core/Scripts: Added wrapper method for despawning creatures DespawnOrUnsummon
This commit is contained in:
@@ -2229,7 +2229,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
|
||||
player->AutoStoreLoot(creature->GetCreatureInfo()->SkinLootId,LootTemplates_Skinning,true);
|
||||
|
||||
creature->ForcedDespawn();
|
||||
creature->DespawnOrUnsummon();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2279,7 +2279,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
|
||||
Creature* creatureTarget = target->ToCreature();
|
||||
|
||||
creatureTarget->ForcedDespawn();
|
||||
creatureTarget->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
// Tear of Azzinoth Summon Channel - it's not really supposed to do anything,and this only prevents the console spam
|
||||
@@ -2375,7 +2375,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
if (permafrostCaster)
|
||||
{
|
||||
if (Creature *permafrostCasterAsCreature = permafrostCaster->ToCreature())
|
||||
permafrostCasterAsCreature->ForcedDespawn(3000);
|
||||
permafrostCasterAsCreature->DespawnOrUnsummon(3000);
|
||||
|
||||
caster->CastSpell(caster, 66181, false);
|
||||
caster->RemoveAllAuras();
|
||||
|
||||
@@ -879,7 +879,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, uint32(creatureTarget->GetRespawnTime()-time(NULL)));
|
||||
sLog->outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
|
||||
|
||||
creatureTarget->ForcedDespawn();
|
||||
creatureTarget->DespawnOrUnsummon();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1044,7 +1044,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
unitTarget->ToCreature()->ForcedDespawn();
|
||||
unitTarget->ToCreature()->DespawnOrUnsummon();
|
||||
|
||||
//cast spell Raptor Capture Credit
|
||||
m_caster->CastSpell(m_caster, 42337, true, NULL);
|
||||
@@ -3681,7 +3681,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
// "kill" original creature
|
||||
creatureTarget->ForcedDespawn();
|
||||
creatureTarget->DespawnOrUnsummon();
|
||||
|
||||
uint8 level = (creatureTarget->getLevel() < (m_caster->getLevel() - 5)) ? (m_caster->getLevel() - 5) : creatureTarget->getLevel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user