View Single Post
09/08/15, 06:04 AM   #9
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by Garkin View Post
CustomCompassPins fires callback "OnWorldMapChanged" and error occurs in callback handler. Is it really CustomCompassPins fault?

Error occurs in this function:

Lua Code:
  1. function ZO_WorldMapFilterPanel_Shared:GetPinFilter(mapPinGroup)
  2.     if self.modeVars then
  3.         return self.modeVars.filters[self.mapFilterType][mapPinGroup]
  4.     end
  5.     return nil
  6. 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:
  1. local _GetPinFilter = _G["ZO_WorldMapFilterPanel_Shared"].GetPinFilter
  2. local function GetPinFilter (obj, mapPinGroup)
  3.     if obj.modeVars then
  4.         if obj.modeVars.filters and obj.mapFilterType then
  5.             if obj.modeVars.filters[obj.mapFilterType] then
  6.                 return obj.modeVars.filters[obj.mapFilterType][mapPinGroup]
  7.             end
  8.         end
  9.     end
  10.     return nil
  11. end
  12. _G["ZO_WorldMapFilterPanel_Shared"].GetPinFilter = GetPinFilter

Last edited by Fyrakin : 09/08/15 at 06:07 AM.
  Reply With Quote