-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNoWorldMapWayshrine.lua
More file actions
26 lines (22 loc) · 955 Bytes
/
NoWorldMapWayshrine.lua
File metadata and controls
26 lines (22 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- Slightly Improved™ Gameplay
-- The MIT License © 2016 Arthur Corenzan
CALLBACK_MANAGER:RegisterCallback("SlightlyImprovedGameplay_OnAddOnLoaded", function(savedVars)
local comboBox = WORLD_MAP_FILTERS.pvePanel:FindCheckBox(MAP_FILTER_WAYSHRINES)
local shouldChangeBack = false
local function OnMapChanged()
local showWayshrines = ZO_WorldMap_IsPinGroupShown(MAP_FILTER_WAYSHRINES)
local isEnabled = savedVars.noWorldmapWayshrines
if (GetMapType() == MAPTYPE_WORLD) then
if (isEnabled and showWayshrines) then
ZO_CheckButton_OnClicked(comboBox)
shouldChangeBack = true
end
else
if (not showWayshrines and shouldChangeBack) then
ZO_CheckButton_OnClicked(comboBox)
shouldChangeBack = false
end
end
end
CALLBACK_MANAGER:RegisterCallback("OnWorldMapChanged", OnMapChanged)
end)