Merged and updated to latest PTR build 9704

This commit is contained in:
tomrus88 2009-03-19 14:18:17 +03:00
commit a2d3941588
22 changed files with 376 additions and 454 deletions

View file

@ -1076,6 +1076,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 );
@ -2710,7 +2728,14 @@ void ObjectMgr::LoadGroups()
}
}
InstanceSave *save = sInstanceSaveManager.AddInstanceSave(fields[1].GetUInt32(), fields[2].GetUInt32(), fields[4].GetUInt8(), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true);
MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt32());
if(!mapEntry || !mapEntry->IsDungeon())
{
sLog.outErrorDb("Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt32());
continue;
}
InstanceSave *save = sInstanceSaveManager.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), fields[4].GetUInt8(), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true);
group->BindToInstance(save, fields[3].GetBool(), true);
}while( result->NextRow() );
delete result;