Core: Fixed some level 4 warnings (msvc)
This commit is contained in:
1 parent
b229f72bf4
commit
f1170ba0fb
26 files changed
+177
-167
No files matched your search
@@ -2380,6 +2380,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
|
||||
sLog->outError(LOG_FILTER_SQL, "Gameobject template %u not found in database!", entry);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Map* map = GetMap();
|
||||
GameObject* go = new GameObject();
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY))
|
||||
@@ -2387,13 +2388,14 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
|
||||
delete go;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
go->SetRespawnTime(respawnTime);
|
||||
if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) //not sure how to handle this
|
||||
((Unit*)this)->AddGameObject(go);
|
||||
ToUnit()->AddGameObject(go);
|
||||
else
|
||||
go->SetSpawnedByDefault(false);
|
||||
map->AddToMap(go);
|
||||
|
||||
map->AddToMap(go);
|
||||
return go;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user