Changeset 56

Show
Ignore:
Timestamp:
11/19/08 13:29:53 (17 years ago)
Author:
yumileroy
Message:

[svn] Modify SummonGameObject? function to set owner GUID.
Implement spell 23019. Patch provided by Edder.

Original author: megamage
Date: 2008-10-18 12:02:47-05:00

Location:
trunk/src/game
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Object.cpp

    r52 r56  
    14541454    go->SetRespawnTime(respawnTime); 
    14551455    go->SetSpawnedByDefault(false); // do not save respawn time 
     1456    go->SetOwnerGUID(GetGUID()); 
    14561457    map->Add(go); 
    14571458 
  • trunk/src/game/SpellEffects.cpp

    r53 r56  
    820820                    creatureTarget->SetHealth(0);                   // just for nice GM-mode view 
    821821 
    822                     GameObject* pGameObj = new GameObject; 
    823  
    824                     Map *map = creatureTarget->GetMap(); 
    825  
    826                     if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, 
    827                         creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), 
    828                         creatureTarget->GetOrientation(), 0, 0, 0, 0, 100, 1) ) 
    829                     { 
    830                         delete pGameObj; 
    831                         return; 
    832                     } 
    833  
    834                     pGameObj->SetRespawnTime(creatureTarget->GetRespawnTime()-time(NULL)); 
    835                     pGameObj->SetOwnerGUID(m_caster->GetGUID() ); 
    836                     pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() ); 
    837                     pGameObj->SetSpellId(m_spellInfo->Id); 
    838  
    839                     DEBUG_LOG("AddObject at SpellEfects.cpp EffectDummy\n"); 
    840                     map->Add(pGameObj); 
    841  
     822                    GameObject* Crystal_Prison = m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, creatureTarget->GetRespawnTime()-time(NULL)); 
     823                    sLog.outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019\n"); 
    842824                    WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8); 
    843                     data << uint64(pGameObj->GetGUID()); 
     825                    data << uint64(Crystal_Prison->GetGUID()); 
    844826                    m_caster->SendMessageToSet(&data,true); 
    845827