[11527] Check rotation0 and rotation1 fields at gameobject data loading

This commit is contained in:
SilverIce 2011-05-24 02:27:45 +03:00
parent f98144e89d
commit 7d889c0821
2 changed files with 13 additions and 1 deletions

View file

@ -1514,6 +1514,18 @@ void ObjectMgr::LoadGameobjects()
int16 GuidPoolId = fields[17].GetInt16();
int16 EntryPoolId = fields[18].GetInt16();
if (data.rotation0 < -1.0f || data.rotation0 > 1.0f)
{
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation0 (%f) value, skip", guid, data.id, data.rotation0);
continue;
}
if (data.rotation1 < -1.0f || data.rotation1 > 1.0f)
{
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid rotation1 (%f) value, skip", guid, data.id, data.rotation1);
continue;
}
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);