area lookup fixes

This commit is contained in:
Xurkon
2026-05-09 23:53:44 -05:00
parent 9caef46c2b
commit a885faa364
3 changed files with 30 additions and 8 deletions
+4 -2
View File
@@ -110,7 +110,8 @@ function QuestiePlayer.HasRequiredClass(requiredClasses)
end
function QuestiePlayer:GetCurrentZoneId()
local uiMapId = C_Map.GetBestMapForUnit("player")
local uiMapIdOrTable = C_Map.GetBestMapForUnit("player")
local uiMapId = type(uiMapIdOrTable) == "table" and uiMapIdOrTable.uiMapID or uiMapIdOrTable
if uiMapId then
local areaId = ZoneDB:GetAreaIdByUiMapId(uiMapId)
if areaId then
@@ -123,7 +124,8 @@ function QuestiePlayer:GetCurrentZoneId()
end
function QuestiePlayer:GetCurrentUiMapId()
local uiMapId = C_Map.GetBestMapForUnit("player")
local uiMapIdOrTable = C_Map.GetBestMapForUnit("player")
local uiMapId = type(uiMapIdOrTable) == "table" and uiMapIdOrTable.uiMapID or uiMapIdOrTable
if uiMapId then
return uiMapId
end