Core/Map: Reenable error msg to find missing graveyards and use a better msg when a zone id is not found

--HG--
branch : trunk
This commit is contained in:
Spp
2010-10-25 11:47:23 +02:00
parent f381e74c10
commit d7bcc25e38

View File

@@ -5960,8 +5960,12 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float
// search for zone associated closest graveyard
uint32 zoneId = sMapMgr.GetZoneId(MapId,x,y,z);
if (!zoneId && z > -500)
sLog.outError("Bad zoneId: Map = %u (%f, %f, %f)", MapId, x, y, z);
if (!zoneId)
{
if (z > -500)
sLog.outError("ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z);
return NULL;
}
// Simulate std. algorithm:
@@ -5978,7 +5982,7 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float
if (graveLow == graveUp && !map->IsBattleArena())
{
//sLog.outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.",zoneId,team);
sLog.outErrorDb("Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.",zoneId,team);
return NULL;
}