aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index a4fc30cb2f7..8f23f5e6f81 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -896,9 +896,8 @@ void Spell::EffectDummy(uint32 i)
return;
Creature* creatureTarget = (Creature*)unitTarget;
- creatureTarget->setDeathState(JUST_DIED);
- creatureTarget->RemoveCorpse();
- creatureTarget->SetHealth(0); // just for nice GM-mode view
+
+ creatureTarget->ForcedDespawn();
return;
}
case 16589: // Noggenfogger Elixir
@@ -956,9 +955,7 @@ void Spell::EffectDummy(uint32 i)
GameObject* Crystal_Prison = m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, creatureTarget->GetRespawnTime()-time(NULL));
sLog.outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
- creatureTarget->setDeathState(JUST_DIED);
- creatureTarget->RemoveCorpse();
- creatureTarget->SetHealth(0); // just for nice GM-mode view
+ creatureTarget->ForcedDespawn();
WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8);
data << uint64(Crystal_Prison->GetGUID());
@@ -1176,9 +1173,7 @@ void Spell::EffectDummy(uint32 i)
Creature* creatureTarget = (Creature*)unitTarget;
- creatureTarget->setDeathState(JUST_DIED);
- creatureTarget->RemoveCorpse();
- creatureTarget->SetHealth(0); // just for nice GM-mode view
+ creatureTarget->ForcedDespawn();
//cast spell Raptor Capture Credit
m_caster->CastSpell(m_caster, 42337, true, NULL);
@@ -1267,9 +1262,7 @@ void Spell::EffectDummy(uint32 i)
Creature* creatureTarget = (Creature*)unitTarget;
- creatureTarget->setDeathState(JUST_DIED);
- creatureTarget->RemoveCorpse();
- creatureTarget->SetHealth(0); // just for nice GM-mode view
+ creatureTarget->ForcedDespawn();
return;
}
@@ -4018,10 +4011,8 @@ void Spell::EffectTameCreature(uint32 /*i*/)
if(!pet) // in versy specific state like near world end/etc.
return;
- // kill original creature
- creatureTarget->setDeathState(JUST_DIED);
- creatureTarget->RemoveCorpse();
- creatureTarget->SetHealth(0); // just for nice GM-mode view
+ // "kill" original creature
+ creatureTarget->ForcedDespawn();
uint32 level = (creatureTarget->getLevel() < (m_caster->getLevel() - 5)) ? (m_caster->getLevel() - 5) : creatureTarget->getLevel();