[7216] Create gameobject in death point instead spawn point in spell 23019 effect.

This commit is contained in:
VladimirMangos 2009-02-01 21:30:26 +03:00
parent ed59d22dec
commit f5ac3d245f
2 changed files with 6 additions and 5 deletions

View file

@ -782,14 +782,11 @@ void Spell::EffectDummy(uint32 i)
if(creatureTarget->isPet()) if(creatureTarget->isPet())
return; return;
creatureTarget->setDeathState(JUST_DIED);
creatureTarget->RemoveCorpse();
creatureTarget->SetHealth(0); // just for nice GM-mode view
GameObject* pGameObj = new GameObject; GameObject* pGameObj = new GameObject;
Map *map = creatureTarget->GetMap(); Map *map = creatureTarget->GetMap();
// create before death for get proper coordinates
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, m_caster->GetPhaseMask(), if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, m_caster->GetPhaseMask(),
creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(),
creatureTarget->GetOrientation(), 0, 0, 0, 0, 100, 1) ) creatureTarget->GetOrientation(), 0, 0, 0, 0, 100, 1) )
@ -803,6 +800,10 @@ void Spell::EffectDummy(uint32 i)
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() ); pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() );
pGameObj->SetSpellId(m_spellInfo->Id); pGameObj->SetSpellId(m_spellInfo->Id);
creatureTarget->setDeathState(JUST_DIED);
creatureTarget->RemoveCorpse();
creatureTarget->SetHealth(0); // just for nice GM-mode view
DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy\n"); DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy\n");
map->Add(pGameObj); map->Add(pGameObj);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7215" #define REVISION_NR "7216"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__