diff --git a/Modules/Appearance.lua b/Modules/Appearance.lua index aa39e3d..fe12924 100755 --- a/Modules/Appearance.lua +++ b/Modules/Appearance.lua @@ -81,11 +81,12 @@ function Appearance:OnEnable() v:Show() end - self:RegisterEvent("MINIMAP_UPDATE_ZOOM") self:RegisterEvent("PLAYER_REGEN_ENABLED") self:RegisterEvent("PLAYER_REGEN_DISABLED") self:RegisterEvent("ADDON_LOADED") self:RegisterEvent("CVAR_UPDATE") + self:RegisterEvent("ZONE_CHANGED_INDOORS") + self:RegisterEvent("ZONE_CHANGED") -- Removes the circular "waffle-like" texture that shows when using a non-circular minimap in the blue quest objective area. -- Thank you Funkeh` for the code! @@ -142,15 +143,16 @@ function Appearance:CVAR_UPDATE(_, key, value) if key == "ROTATE_MINIMAP" then rotateMinimap = value end end -function Appearance:MINIMAP_UPDATE_ZOOM() - local zoom = Minimap:GetZoom() - if GetCVar("minimapZoom") == GetCVar("minimapInsideZoom") then - Minimap:SetZoom(zoom < 2 and zoom + 1 or zoom - 1) - end +function Appearance:ZONE_CHANGED_INDOORS() + indoors = true + + if inCombat then self:SetCombatAlpha() + else self:SetAlpha() end +end - indoors = GetCVar("minimapZoom")+0 ~= Minimap:GetZoom() - Minimap:SetZoom(zoom) +function Appearance:ZONE_CHANGED() + indoors = false if inCombat then self:SetCombatAlpha() else self:SetAlpha() end diff --git a/Modules/RangeCircle.lua b/Modules/RangeCircle.lua index 495f16d..9ffa69d 100755 --- a/Modules/RangeCircle.lua +++ b/Modules/RangeCircle.lua @@ -66,9 +66,10 @@ function RangeCircle:OnEnable() texture:Show() - self:RegisterEvent("MINIMAP_UPDATE_ZOOM") self:RegisterEvent("PLAYER_REGEN_ENABLED") self:RegisterEvent("PLAYER_REGEN_DISABLED") + self:RegisterEvent("ZONE_CHANGED_INDOORS") + self:RegisterEvent("ZONE_CHANGED") self:Update() self:SecureHook(Minimap, "SetZoom", "Update") @@ -88,16 +89,13 @@ function RangeCircle:PLAYER_REGEN_DISABLED() self:Update() end -function RangeCircle:MINIMAP_UPDATE_ZOOM() - local zoom = Minimap:GetZoom() - - if GetCVar("minimapZoom") == GetCVar("minimapInsideZoom") then - Minimap:SetZoom(zoom < 2 and zoom + 1 or zoom - 1) - end - - indoors = GetCVar("minimapZoom")+0 ~= Minimap:GetZoom() - Minimap:SetZoom(zoom) +function RangeCircle:ZONE_CHANGED_INDOORS() + indoors = true + self:Update() +end +function RangeCircle:ZONE_CHANGED() + indoors = false self:Update() end