Skip to content

Commit

Permalink
SafeLoc: Implement Westfall GY as fallback graveyard
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored and killerwife committed Sep 18, 2024
1 parent 897b3c1 commit 6a6a4c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/Globals/GraveyardManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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<WorldSafeLocsEntry>(fallbackSafeLocId);
}
return graveyard;
}

Expand Down

0 comments on commit 6a6a4c0

Please sign in to comment.