Originally Posted by Garkin
CustomCompassPins fires callback "OnWorldMapChanged" and error occurs in callback handler. Is it really CustomCompassPins fault?
Error occurs in this function:
Lua Code:
function ZO_WorldMapFilterPanel_Shared:GetPinFilter(mapPinGroup) if self.modeVars then return self.modeVars.filters[self.mapFilterType][mapPinGroup] end return nil end
Because self.modeVars.filters[self.mapFilterType] is nil.
(In this case self = WORLD_MAP_FILTERS.imperialPvPPanel and self.modeVars = self.savedVars[mapMode])
I wonder if it is because ZO_WorldMap_GetMode() returns invalid value (mapMode is invalid or nil). But I can't be sure unless I do some tests.
|
I would write a patch add-on for this problem (or maybe add it to MapFix?)
Lua Code:
local _GetPinFilter = _G["ZO_WorldMapFilterPanel_Shared"].GetPinFilter
local function GetPinFilter (obj, mapPinGroup)
if obj.modeVars then
if obj.modeVars.filters and obj.mapFilterType then
if obj.modeVars.filters[obj.mapFilterType] then
return obj.modeVars.filters[obj.mapFilterType][mapPinGroup]
end
end
end
return nil
end
_G["ZO_WorldMapFilterPanel_Shared"].GetPinFilter = GetPinFilter