Changeset 52 for trunk/src/game
- Timestamp:
- 11/19/08 13:29:24 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/GameObject.h
r44 r52 495 495 } 496 496 bool isSpawnedByDefault() const { return m_spawnedByDefault; } 497 void SetSpawnedByDefault(bool b) { m_spawnedByDefault = b; } 497 498 uint32 GetRespawnDelay() const { return m_respawnDelayTime; } 498 499 void Refresh(); -
trunk/src/game/Object.cpp
r44 r52 1436 1436 } 1437 1437 1438 GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime) 1439 { 1440 if(!IsInWorld()) 1441 return NULL; 1442 Map * map = GetMap(); 1443 if(!map) 1444 return NULL; 1445 GameObjectInfo const* goinfo = objmgr.GetGameObjectInfo(entry); 1446 if(!goinfo) 1447 { 1448 sLog.outErrorDb("Gameobject template %u not found in database!", entry); 1449 return NULL; 1450 } 1451 GameObject *go = new GameObject(); 1452 if(!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),entry,map,x,y,z,ang,rotation0,rotation1,rotation2,rotation3,100,1)) 1453 return NULL; 1454 go->SetRespawnTime(respawnTime); 1455 go->SetSpawnedByDefault(false); // do not save respawn time 1456 map->Add(go); 1457 1458 return go; 1459 } 1460 1438 1461 void WorldObject::GetNearPoint2D(float &x, float &y, float distance2d, float absAngle ) const 1439 1462 { -
trunk/src/game/Object.h
r44 r52 92 92 class UpdateMask; 93 93 class InstanceData; 94 class GameObject; 94 95 95 96 typedef HM_NAMESPACE::hash_map<Player*, UpdateData> UpdateDataMapType; … … 446 447 Map const* GetBaseMap() const; 447 448 Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime); 448 449 GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime); 449 450 protected: 450 451 explicit WorldObject();