Fix: Townsfolk POIs not appearing due to uiMapId < 1000 not being registered

This commit is contained in:
Xurkon
2026-03-29 04:44:21 -05:00
parent d2732b9b4d
commit 7503f251dc
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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.
+1 -1
View File
@@ -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