Fixed one more opcode.

Added startup check for gameobject displayid==0.
This commit is contained in:
tomrus88 2009-08-24 00:59:23 +04:00
parent 33149b8f04
commit e7353428b1
2 changed files with 23 additions and 12 deletions

View file

@ -1001,7 +1001,12 @@ void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & recv_data )
/* WorldSession::Update( getMSTime() );*/ /* WorldSession::Update( getMSTime() );*/
DEBUG_LOG( "WORLD: Time Lag/Synchronization Resent/Update" ); DEBUG_LOG( "WORLD: Time Lag/Synchronization Resent/Update" );
recv_data.read_skip<uint64>(); uint64 guid;
if(!recv_data.readPackGUID(guid))
{
recv_data.rpos(recv_data.wpos());
return;
}
recv_data.read_skip<uint32>(); recv_data.read_skip<uint32>();
/* /*
uint64 guid; uint64 guid;

View file

@ -1226,9 +1226,15 @@ void ObjectMgr::LoadGameobjects()
continue; continue;
} }
if(!gInfo->displayId))
{
sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) doesn't have displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
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); sLog.outErrorDb("Gameobject (GUID: %u Entry %u GoType: %u) have invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
continue; continue;
} }
@ -1246,9 +1252,9 @@ void ObjectMgr::LoadGameobjects()
data.rotation3 = fields[10].GetFloat(); data.rotation3 = fields[10].GetFloat();
data.spawntimesecs = fields[11].GetInt32(); data.spawntimesecs = fields[11].GetInt32();
if (data.spawntimesecs==0 && gInfo->IsDespawnAtAction()) if (data.spawntimesecs == 0 && gInfo->IsDespawnAtAction())
{ {
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but gameobejct marked as despawnable at action.",guid,data.id); sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but gameobejct marked as despawnable at action.", guid, data.id);
} }
data.animprogress = fields[12].GetUInt32(); data.animprogress = fields[12].GetUInt32();
@ -1256,7 +1262,7 @@ void ObjectMgr::LoadGameobjects()
uint32 go_state = fields[13].GetUInt32(); uint32 go_state = fields[13].GetUInt32();
if (go_state >= MAX_GO_STATE) if (go_state >= MAX_GO_STATE)
{ {
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip",guid,data.id,go_state); sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip", guid, data.id, go_state);
continue; continue;
} }
data.go_state = GOState(go_state); data.go_state = GOState(go_state);
@ -1268,29 +1274,29 @@ void ObjectMgr::LoadGameobjects()
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 ); sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2);
continue; 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 ); sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3);
continue; 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 ); sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid coordinates, skip", guid, data.id);
continue; 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 ); 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; data.phaseMask = 1;
} }
if (gameEvent==0 && PoolId==0) // if not this is to be managed by GameEvent System or Pool system if (gameEvent == 0 && PoolId == 0) // if not this is to be managed by GameEvent System or Pool system
AddGameobjectToGrid(guid, &data); AddGameobjectToGrid(guid, &data);
++count; ++count;