From ebd2dbd9c602ca09c3fd163ecde45912a4fd58d8 Mon Sep 17 00:00:00 2001 From: HonorGoG Date: Fri, 4 Jan 2019 15:33:05 -0800 Subject: [PATCH] - TitanUtils: Fixed display logic for TitanDebug - TitanLocation: Fixed logic for frame display of LocOnMiniMap --- Titan/TitanUtils.lua | 2 +- TitanLocation/TitanLocation.lua | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Titan/TitanUtils.lua b/Titan/TitanUtils.lua index 176b904..e04476b 100644 --- a/Titan/TitanUtils.lua +++ b/Titan/TitanUtils.lua @@ -1900,7 +1900,7 @@ function TitanDebug(debug_message, debug_type) ..dtype ..TitanUtils_GetGreenText(debug_message) - if TitanAllGetVar("Silenced") then + if not TitanAllGetVar("Silenced") then _G["DEFAULT_CHAT_FRAME"]:AddMessage(msg) end -- Debug_array(msg) diff --git a/TitanLocation/TitanLocation.lua b/TitanLocation/TitanLocation.lua index c0c5216..7cf2227 100755 --- a/TitanLocation/TitanLocation.lua +++ b/TitanLocation/TitanLocation.lua @@ -187,9 +187,11 @@ end -- ************************************************************************** function TitanPanelLocationButton_OnEvent(self, event, ...) if event == "PLAYER_ENTERING_WORLD" then --- if not TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap") and MinimapBorderTop and MinimapBorderTop:IsShown() then --- TitanPanelLocationButton_LocOnMiniMap() --- end + TitanDebug("PEW_LocOnMiniMap Value: "..tostring(LocOnMiniMap)) + TitanDebug("PEW_ShowLocOnMiniMap Value: "..TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap")) + if TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap") and MinimapBorderTop and MinimapBorderTop:IsShown() then + TitanPanelLocationButton_LocOnMiniMap() + end end if TitanGetVar(TITAN_LOCATION_ID, "UpdateWorldmap") then local mapID = C_Map.GetBestMapForUnit("player") @@ -204,10 +206,14 @@ end -- function to throttle down unnecessary updates function TitanPanelLocationButton_CheckForUpdate() - if not LocOnMiniMap and not TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap") and MinimapBorderTop and MinimapBorderTop:IsShown() then - TitanPanelLocationButton_LocOnMiniMap() - local LocOnMiniMap = true; - end +-- TitanDebug("LocOnMiniMap Value: "..tostring(LocOnMiniMap)) +-- TitanDebug("ShowLocOnMiniMap Value: "..TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap")) +-- if not LocOnMiniMap and not TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap") and MinimapBorderTop and MinimapBorderTop:IsShown() then +-- if TitanGetVar(TITAN_LOCATION_ID, "ShowLocOnMiniMap") and MinimapBorderTop and MinimapBorderTop:IsShown() then +-- TitanDebug("Calling TitanPanelLocationButton_LocOnMiniMap") +-- TitanPanelLocationButton_LocOnMiniMap() +-- local LocOnMiniMap = true; +-- end local mapID = C_Map.GetBestMapForUnit("player") local tempx, tempy = TitanPanelGetPlayerMapPosition(); if tempx ~= cachedX or tempy ~= cachedY then @@ -221,6 +227,7 @@ end -- ************************************************************************** function TitanPanelLocation_HandleUpdater() if TitanPanelLocationButton:IsVisible() and not LocationTimer then + TitanDebug("LocationTimer Started") LocationTimer = AceTimer.ScheduleRepeatingTimer("TitanPanelLocation", TitanPanelLocationButton_CheckForUpdate, 0.5) end end -- 1.7.9.5