Quantcast

- Further changes needed for Wrath if Titan is not loaded

urnati [01-04-24 - 20:07]
- Further changes needed for Wrath if Titan is not loaded
Filename
TitanBag/TitanBag.lua
TitanClock/TitanClock.lua
TitanGold/TitanGold.lua
TitanLocation/TitanLocation.lua
TitanPerformance/TitanPerformance.lua
TitanRepair/TitanRepair.lua
TitanVolume/TitanVolume.lua
TitanXP/TitanXP.lua
diff --git a/TitanBag/TitanBag.lua b/TitanBag/TitanBag.lua
index 8ae14ff..406b87a 100644
--- a/TitanBag/TitanBag.lua
+++ b/TitanBag/TitanBag.lua
@@ -15,8 +15,8 @@ local TITAN_BAG_THRESHOLD_TABLE = {
 }
 local updateTable = {TITAN_BAG_ID, TITAN_PANEL_UPDATE_BUTTON};
 -- ******************************** Variables *******************************
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
-local AceTimer = LibStub("AceTimer-3.0")
+local L = {} -- For AceLocale
+local AceTimer = {}
 local BagTimer

 local bag_info = {
@@ -566,5 +566,7 @@ end


 if TITAN_ID then -- it exists
+	AceTimer = LibStub("AceTimer-3.0")
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanClock/TitanClock.lua b/TitanClock/TitanClock.lua
index 73bb5d1..863cf11 100644
--- a/TitanClock/TitanClock.lua
+++ b/TitanClock/TitanClock.lua
@@ -15,8 +15,8 @@ local TITAN_CLOCK_FORMAT_24H = "24H";
 local TITAN_CLOCK_FRAME_SHOW_TIME = 0.5;
 local _G = getfenv(0);
 -- ******************************** Variables *******************************
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
-local AceTimer = LibStub("AceTimer-3.0")
+local L = {} -- For AceLocale
+local AceTimer = {}
 local ClockTimer = nil;
 local updateTable = {TITAN_CLOCK_ID, TITAN_PANEL_UPDATE_ALL };
 local realmName = GetRealmName();
@@ -612,5 +612,7 @@ end


 if TITAN_ID then -- it exists
+	AceTimer = LibStub("AceTimer-3.0")
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanGold/TitanGold.lua b/TitanGold/TitanGold.lua
index b0fe9bd..6c2f1f5 100644
--- a/TitanGold/TitanGold.lua
+++ b/TitanGold/TitanGold.lua
@@ -25,8 +25,8 @@ local GOLD_SESS_STATUS;
 local GOLD_PERHOUR_STATUS;
 local GOLD_STARTINGGOLD;
 local GOLD_SESSIONSTART;
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
-local TitanGold = LibStub("AceAddon-3.0"):NewAddon("TitanGold", "AceTimer-3.0")
+local L = {} -- For AceLocale
+local TitanGold = {} -- For Ace
 local GoldTimer = nil;
 local _G = getfenv(0);
 local realmName = GetRealmName();
@@ -1241,5 +1241,7 @@ end


 if TITAN_ID then -- it exists
+	TitanGold = LibStub("AceAddon-3.0"):NewAddon("TitanGold", "AceTimer-3.0")
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanLocation/TitanLocation.lua b/TitanLocation/TitanLocation.lua
index 735ee92..51ee258 100755
--- a/TitanLocation/TitanLocation.lua
+++ b/TitanLocation/TitanLocation.lua
@@ -19,8 +19,8 @@ local cachedX = 0;
 local cachedY = 0;
 local updateTable = {TITAN_LOCATION_ID, TITAN_PANEL_UPDATE_BUTTON};
 -- ******************************** Variables *******************************
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true);
-local AceTimer = LibStub("AceTimer-3.0");
+local L = {} -- For AceLocale
+local AceTimer = {}
 local LocationTimer = nil;

 -- Difference in the Blizzard frame for the world map
@@ -792,5 +792,7 @@ end


 if TITAN_ID then -- it exists
+	AceTimer = LibStub("AceTimer-3.0")
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanPerformance/TitanPerformance.lua b/TitanPerformance/TitanPerformance.lua
index be845b0..ed196e9 100644
--- a/TitanPerformance/TitanPerformance.lua
+++ b/TitanPerformance/TitanPerformance.lua
@@ -33,8 +33,8 @@ local _G = getfenv(0);
 local topAddOns;
 local memUsageSinceGC = {};
 local counter = 1; --counter for active addons
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
-local AceTimer = LibStub("AceTimer-3.0")
+local L = {} -- For AceLocale
+local AceTimer = {}
 local PerfTimer = nil;
 -- ******************************** Functions *******************************
 local function CalcAppNum(val)
@@ -962,5 +962,7 @@ end


 if TITAN_ID then -- it exists
+	AceTimer = LibStub("AceTimer-3.0")
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanRepair/TitanRepair.lua b/TitanRepair/TitanRepair.lua
index f16c5fc..1f0e08d 100644
--- a/TitanRepair/TitanRepair.lua
+++ b/TitanRepair/TitanRepair.lua
@@ -12,7 +12,7 @@ local TITAN_BUTTON = "TitanPanel"..TITAN_REPAIR_ID.."Button"
 local TITAN_TOOLTIP = "Titan"..TITAN_REPAIR_ID.."Tooltip"
 local NYL = "nyl"

-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
+local L = {} -- For AceLocale
 local TitanRepair = {} -- for LibStub("AceAddon-3.0")... set on create frames
 local _G = getfenv(0);
 local TR = TitanRepair
@@ -1370,6 +1370,7 @@ local function Create_Frames()
 end

 if TITAN_ID then -- it exists
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	TitanRepair = LibStub("AceAddon-3.0"):NewAddon(TITAN_REPAIR_ID, "AceHook-3.0", "AceTimer-3.0")
 	Create_Frames() -- do the work
 end
diff --git a/TitanVolume/TitanVolume.lua b/TitanVolume/TitanVolume.lua
index 0fdbf26..47126e1 100644
--- a/TitanVolume/TitanVolume.lua
+++ b/TitanVolume/TitanVolume.lua
@@ -12,7 +12,7 @@ local TITAN_VOLUME_BUTTON = "TitanPanel"..TITAN_VOLUME_ID.."Button"
 local TITAN_VOLUME_FRAME_SHOW_TIME = 0.5;
 local TITAN_VOLUME_ARTWORK_PATH = "Interface\\AddOns\\TitanVolume\\Artwork\\";
 local _G = getfenv(0);
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
+local L = {} -- For AceLocale

 function TitanPanelVolumeButton_OnLoad(self)
 	local notes = ""
@@ -616,5 +616,6 @@ end


 if TITAN_ID then -- it exists
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end
diff --git a/TitanXP/TitanXP.lua b/TitanXP/TitanXP.lua
index 1d90b15..2d41504 100644
--- a/TitanXP/TitanXP.lua
+++ b/TitanXP/TitanXP.lua
@@ -17,7 +17,7 @@ local updateTable = {TITAN_XP_ID, TITAN_PANEL_UPDATE_ALL};
 local TitanPanelXPButton_ButtonAdded = nil;
 local found = nil;
 local lastMobXP, lastXP, XPGain = 0, 0, 0
-local L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
+local L = {} -- For AceLocale
 -- ******************************** Functions *******************************

 --[[
@@ -557,5 +557,6 @@ end


 if TITAN_ID then -- it exists
+	L = LibStub("AceLocale-3.0"):GetLocale(TITAN_ID, true)
 	Create_Frames() -- do the work
 end