From 6a6a4c00264ef2ac6de36218ed094101c4387f6f Mon Sep 17 00:00:00 2001 From: insunaa Date: Fri, 16 Aug 2024 13:24:03 +0200 Subject: [PATCH] SafeLoc: Implement Westfall GY as fallback graveyard --- src/game/Globals/GraveyardManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/Globals/GraveyardManager.cpp b/src/game/Globals/GraveyardManager.cpp index 18850c28565..20723b5d358 100644 --- a/src/game/Globals/GraveyardManager.cpp +++ b/src/game/Globals/GraveyardManager.cpp @@ -140,6 +140,8 @@ WorldSafeLocsEntry const* GraveyardManager::GetClosestGraveYard(float x, float y const uint32 zoneId = sTerrainMgr.GetZoneId(mapId, x, y, z); const uint32 areaId = sTerrainMgr.GetAreaId(mapId, x, y, z); + constexpr uint32 fallbackSafeLocId = 4; + WorldSafeLocsEntry const* graveyard = nullptr; if (areaId != 0) { @@ -160,9 +162,12 @@ WorldSafeLocsEntry const* GraveyardManager::GetClosestGraveYard(float x, float y } if (graveyard == nullptr) + { sLog.outErrorDb("Table `game_graveyard_zone` incomplete: Map %u Zone " "%u Area %u Team %u does not have a linked graveyard.", mapId, zoneId, areaId, uint32(team)); + graveyard = sWorldSafeLocsStore.LookupEntry(fallbackSafeLocId); + } return graveyard; }