diff options
-rw-r--r-- | src/game/Object.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 24 |
2 files changed, 4 insertions, 21 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index be66efde0ad..881e4d2515a 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1453,6 +1453,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float return NULL; go->SetRespawnTime(respawnTime); go->SetSpawnedByDefault(false); // do not save respawn time + go->SetOwnerGUID(GetGUID()); map->Add(go); return go; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index bf9d1b9f9bf..75e01781923 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -819,28 +819,10 @@ void Spell::EffectDummy(uint32 i) creatureTarget->RemoveCorpse(); creatureTarget->SetHealth(0); // just for nice GM-mode view - GameObject* pGameObj = new GameObject; - - Map *map = creatureTarget->GetMap(); - - if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, - creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), - creatureTarget->GetOrientation(), 0, 0, 0, 0, 100, 1) ) - { - delete pGameObj; - return; - } - - pGameObj->SetRespawnTime(creatureTarget->GetRespawnTime()-time(NULL)); - pGameObj->SetOwnerGUID(m_caster->GetGUID() ); - pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() ); - pGameObj->SetSpellId(m_spellInfo->Id); - - DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy\n"); - map->Add(pGameObj); - + 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\n"); WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); - data << uint64(pGameObj->GetGUID()); + data << uint64(Crystal_Prison->GetGUID()); m_caster->SendMessageToSet(&data,true); return; |