From d7bcc25e3880afc057ad7ad98b08be4e676d4531 Mon Sep 17 00:00:00 2001 From: Spp Date: Mon, 25 Oct 2010 11:47:23 +0200 Subject: Core/Map: Reenable error msg to find missing graveyards and use a better msg when a zone id is not found --HG-- branch : trunk --- src/server/game/Globals/ObjectMgr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index cc1a16fb5ed..63339a17170 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -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; } -- cgit v1.2.3