Fix: prevent crash when quest name is nil in PrintDifficultyColor

This commit is contained in:
Xurkon
2026-03-29 04:25:55 -05:00
parent c61a70d98b
commit d2732b9b4d
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -4,6 +4,8 @@
### Ascension Custom Zone Support ### Ascension Custom Zone Support
- **[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 — 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 — 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. - **[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.
+4
View File
@@ -179,6 +179,10 @@ function QuestieLib:GetColoredQuestName(questId, showLevel, showState, blizzLike
local name = QuestieDB.QueryQuestSingle(questId, "name") local name = QuestieDB.QueryQuestSingle(questId, "name")
local level, _ = QuestieLib.GetTbcLevel(questId); local level, _ = QuestieLib.GetTbcLevel(questId);
if name == nil then
return nil
end
if showLevel then if showLevel then
name = QuestieLib:GetQuestString(questId, name, level, blizzLike) name = QuestieLib:GetQuestString(questId, name, level, blizzLike)
end end