mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7489] Update gameobject rotation fields if need.
* Fixed update absent in ".gobject turn" command * Propetly set rotation fields for summoned objects * Check rotation/coordinates fields values at server loading
This commit is contained in:
parent
071a24562a
commit
7589bf7263
6 changed files with 54 additions and 45 deletions
|
|
@ -1075,6 +1075,24 @@ void ObjectMgr::LoadGameobjects()
|
|||
int16 gameEvent = fields[16].GetInt16();
|
||||
int16 PoolId = fields[17].GetInt16();
|
||||
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
sLog.outErrorDb("Table `gameobject` have gameobject (GUID: %u Entry: %u) with invalid coordinates, skip",guid,data.id );
|
||||
continue;
|
||||
}
|
||||
|
||||
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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue