Files
pfQuest/porting/forever_post.lua

23 lines
880 B
Lua

-- pfQuest on 70334, after compat/optional.lua: pfQuest's optional client hooks answered from the real 70334 APIs.
local G = _G
local M = G.C_Map
-- AreaTable/zone key of the map the 1.12 API currently shows (also capitals, which 1.12 GetMapZones omits)
local by_map = {}
pfQuestCompat.GetCurrentMapAreaID = function()
local id = __current_map and __current_map() -- compat layer (pfQuestEnv)
if not id then return nil end
if by_map[id] ~= nil then return by_map[id] or nil end
local info = M.GetMapInfo(id)
local area = info and pfMap and pfMap.GetMapIDByName and pfMap:GetMapIDByName(info.name)
by_map[id] = area or false
return area
end
pfQuestCompat.GetItemIcon = function(itemid)
return G.C_Item and G.C_Item.GetItemIconByID(itemid) or nil
end
-- the 70334 minimap can rotate
pfQuestCompat.rotateMinimap = G.GetCVar("rotateMinimap") ~= "0" and true or nil