Removed debug statement
urnati [08-09-19 - 03:49]
diff --git a/TitanClassicAmmo/TitanClassicAmmo.lua b/TitanClassicAmmo/TitanClassicAmmo.lua
index f449bbb..9f71e3a 100644
--- a/TitanClassicAmmo/TitanClassicAmmo.lua
+++ b/TitanClassicAmmo/TitanClassicAmmo.lua
@@ -53,16 +53,22 @@ function TitanPanelAmmoButton_OnLoad(self)
ShowAmmoName = false,
}
};
+TitanDebug("TitanPanelAmmoButton_OnLoad")
self:SetScript("OnEvent", function(_, event, arg1, ...)
+TitanDebug("OnEvent")
if event == "PLAYER_LOGIN" then
+TitanDebug("PLAYER_LOGIN")
TitanPanelAmmoButton_PLAYER_LOGIN()
elseif event == "UNIT_INVENTORY_CHANGED" then
+TitanDebug("UNIT_INVENTORY_CHANGED")
TitanPanelAmmoButton_UNIT_INVENTORY_CHANGED(arg1, ...)
elseif event == "UPDATE_INVENTORY_DURABILITY" then
+TitanDebug("UPDATE_INVENTORY_DURABILITY")
TitanPanelAmmoButton_UPDATE_INVENTORY_DURABILITY()
elseif event == "MERCHANT_CLOSED" or event == "PLAYER_ENTERING_WORLD" then
+TitanDebug("MERCHANT_CLOSED / PLAYER_ENTERING_WORLD")
TitanPanelAmmoButton_MERCHANT_CLOSED()
elseif event == "ACTIONBAR_HIDEGRID" then
TitanPanelAmmoButton_ACTIONBAR_HIDEGRID()
@@ -70,8 +76,35 @@ self:SetScript("OnEvent", function(_, event, arg1, ...)
end)
TitanPanelAmmoButton:RegisterEvent("PLAYER_LOGIN")
+ TitanPanelAmmoButton:RegisterEvent("UNIT_INVENTORY_CHANGED")
+ TitanPanelAmmoButton:RegisterEvent("UPDATE_INVENTORY_DURABILITY")
+ TitanPanelAmmoButton:RegisterEvent("MERCHANT_CLOSED")
+ TitanPanelAmmoButton:RegisterEvent("PLAYER_ENTERING_WORLD")
+ TitanPanelAmmoButton:RegisterEvent("ACTIONBAR_HIDEGRID")
end
+function TitanClassicAmmo_OnEvent(self, event, ...)
+ if (event == "PLAYER_LOGIN") then
+ TitanPanelAmmoButton_PLAYER_LOGIN()
+ return;
+ end
+ if (event == "UNIT_INVENTORY_CHANGED") then
+ TitanPanelAmmoButton_UNIT_INVENTORY_CHANGED()
+ return;
+ end
+ if (event == "UPDATE_INVENTORY_DURABILITY") then
+ TitanPanelAmmoButton_UPDATE_INVENTORY_DURABILITY()
+ return;
+ end
+ if (event == "MERCHANT_CLOSED" or event == "PLAYER_ENTERING_WORLD") then
+ TitanPanelAmmoButton_MERCHANT_CLOSED()
+ return;
+ end
+ if (event == "ACTIONBAR_HIDEGRID") then
+ TitanPanelAmmoButton_ACTIONBAR_HIDEGRID()
+ return;
+ end
+end
function TitanPanelAmmoButton_PLAYER_LOGIN()
-- Class check
@@ -103,6 +136,7 @@ end
function TitanPanelAmmoButton_UNIT_INVENTORY_CHANGED(arg1, ...)
+TitanDebug("TitanPanelAmmoButton_UNIT_INVENTORY_CHANGED")
if arg1 == "player" then
TitanPanelAmmoUpdateDisplay();
if isAmmo then
diff --git a/TitanClassicBag/TitanClassicBag.lua b/TitanClassicBag/TitanClassicBag.lua
index 63066f2..1e20786 100644
--- a/TitanClassicBag/TitanClassicBag.lua
+++ b/TitanClassicBag/TitanClassicBag.lua
@@ -175,12 +175,6 @@ local function CountMe(bag)
bagType = "NORMAL"
end
end
-TitanDebug("CountMe:"
-.." size "..tostring(size)
-.." used "..tostring(used)
-.." bagType "..tostring(bagType)
-.." name "..tostring(name)
-)
return {size = size, used = used, bagType = bagType, name = name, color = color}
end
--]]