diff options
| author | megamage <none@none> | 2008-10-18 12:02:47 -0500 | 
|---|---|---|
| committer | megamage <none@none> | 2008-10-18 12:02:47 -0500 | 
| commit | fe453877d115291a161fd80e1e0cbec970192eeb (patch) | |
| tree | b7986606a78ab482ce88aec77448fb79d2f9b09f /src | |
| parent | a3e03f62d04b45aa2e75040ed3b582cdc8da61a9 (diff) | |
[svn] Modify SummonGameObject function to set owner GUID.
Implement spell 23019. Patch provided by Edder.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -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;  | 
