diff options
author | megamage <none@none> | 2009-09-02 15:42:40 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-09-02 15:42:40 -0500 |
commit | 0c0a7b6b0ee55aa1c58a82b2afdc48614f3342bc (patch) | |
tree | 38b20ab7a9ef0dd38dd7f572c8f4dee165ad1f7f /src/game/ObjectMgr.cpp | |
parent | f49754447b51f6b25b61e3067a2b40508dd60116 (diff) |
[8444] Prevent spawn gameobjects with invalid displayid by command. Author: VladimirMangos
Also fix mangos string for not existed gameobejct entry.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 885a8c843f7..3204e8f0145 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1565,13 +1565,13 @@ void ObjectMgr::LoadGameobjects() uint32 entry = fields[ 1].GetUInt32(); GameObjectInfo const* gInfo = GetGameObjectInfo(entry); - if(!gInfo) + if (!gInfo) { sLog.outErrorDb("Table `gameobject` has gameobject (GUID: %u) with non existing gameobject entry %u, skipped.", guid, entry); continue; } - if(gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId)) + if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId)) { sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) have invalid displayId (%u), not loaded.",guid, entry, gInfo->type, gInfo->displayId); continue; @@ -1612,25 +1612,25 @@ void ObjectMgr::LoadGameobjects() int16 gameEvent = fields[16].GetInt16(); int16 PoolId = fields[17].GetInt16(); - if(data.rotation2 < -1.0f || data.rotation2 > 1.0f) + if (data.rotation2 < -1.0f || data.rotation2 > 1.0f) { sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip",guid,data.id,data.rotation2 ); continue; } - if(data.rotation3 < -1.0f || data.rotation3 > 1.0f) + if (data.rotation3 < -1.0f || data.rotation3 > 1.0f) { sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip",guid,data.id,data.rotation3 ); continue; } - if(!MapManager::IsValidMapCoord(data.mapid,data.posX,data.posY,data.posZ,data.orientation)) + if (!MapManager::IsValidMapCoord(data.mapid,data.posX,data.posY,data.posZ,data.orientation)) { sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid coordinates, skip",guid,data.id ); continue; } - if(data.phaseMask==0) + if (data.phaseMask==0) { sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.",guid,data.id ); data.phaseMask = 1; |