From 7503f251dcb31deac304face6299297715cd620b Mon Sep 17 00:00:00 2001 From: Xurkon Date: Sun, 29 Mar 2026 04:44:21 -0500 Subject: [PATCH] Fix: Townsfolk POIs not appearing due to uiMapId < 1000 not being registered --- CHANGELOG.md | 2 ++ Database/Zones/zoneDB.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce02c5d..bcf8bdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - **[Fix — PrintDifficultyColor Nil Text]** Fixed crash in `PrintDifficultyColor` when quest name is nil. Added defensive nil check in `GetColoredQuestName` to return early if `QuestieDB.QueryQuestSingle` returns nil for a quest, preventing "attempt to concatenate local 'text' (a nil value)" errors. +- **[Fix — Townsfolk POI Map IDs]** Fixed some Townsfolk POIs not appearing in custom zones. Removed the `uiMapId > 1000` restriction in `ZoneDB:ApplyCustomZones()` that was preventing custom zone IDs below 1000 from being registered as self-mappings. This caused some Townsfolk NPCs with zone IDs < 1000 to fail UiMapId lookups and not display on the map. + - **[Fix — Custom Zone Map Pins]** Fixed map icons not appearing in Ascension custom zones (e.g., Valley of Trials, Northshire Valley). The issue was that custom zone UiMapData was not properly injected into `QuestieCompat.UiMapData` before HBD initialized its map cache. Added `ApplyCustomZones()` function in `ZoneDB` that hooks `ZoneDB.Initialize` to inject custom zones BEFORE the original initialization runs, ensuring HBD's `mapData` table contains custom zone entries like 1244 (Valley of Trials). - **[Fix — Zone Name Fallback]** Fixed "Unknown Zone" display for custom zones in the tracker. When `GetZoneNameByID` fails for custom zone IDs, the system now falls back to `GetQuestLogZoneName` which reads the zone header directly from the quest log where custom zone names are properly displayed. diff --git a/Database/Zones/zoneDB.lua b/Database/Zones/zoneDB.lua index 6303702..9e9f150 100644 --- a/Database/Zones/zoneDB.lua +++ b/Database/Zones/zoneDB.lua @@ -73,7 +73,7 @@ function ZoneDB:ApplyCustomZones() for uiMapId, data in pairs(QuestieCompat.UiMapData) do if not uiMapId or type(uiMapId) ~= "number" then -- skip non-numeric keys - elseif uiMapId > 1000 and _ZoneDB.areaIdToUiMapId[uiMapId] == nil then + elseif _ZoneDB.areaIdToUiMapId[uiMapId] == nil then _ZoneDB.areaIdToUiMapId[uiMapId] = uiMapId end