debugs removed
This commit is contained in:
@@ -18,7 +18,6 @@ function Events:Register(event, callback, owner)
|
||||
if not callbacks[event] then
|
||||
callbacks[event] = {}
|
||||
eventFrame:RegisterEvent(event)
|
||||
addon:Debug("Registered event: %s", event)
|
||||
end
|
||||
|
||||
table.insert(callbacks[event], {
|
||||
@@ -40,7 +39,6 @@ function Events:UnregisterOwner(owner)
|
||||
if table.getn(cbs) == 0 then
|
||||
eventFrame:UnregisterEvent(event)
|
||||
callbacks[event] = nil
|
||||
addon:Debug("Unregistered event: %s", event)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -59,7 +59,6 @@ function Guda_BagFrame_OnLoad(self)
|
||||
end)
|
||||
end
|
||||
|
||||
addon:Debug("Bag frame loaded")
|
||||
end
|
||||
|
||||
|
||||
@@ -407,7 +406,6 @@ function BagFrame:UpdateMoney()
|
||||
local moneyFrame = getglobal("Guda_BagFrame_MoneyFrame")
|
||||
|
||||
if not moneyFrame then
|
||||
addon:Debug("MoneyFrame not found! Checking parent...")
|
||||
addon:Debug("Guda_BagFrame exists: " .. tostring(getglobal("Guda_BagFrame") ~= nil))
|
||||
|
||||
-- Try to create it manually
|
||||
@@ -1495,7 +1493,6 @@ function Guda_BagSlot_OnClick(button, bagID)
|
||||
-- Refresh the bag display
|
||||
BagFrame:Update()
|
||||
|
||||
addon:Debug(string.format("Bag %d visibility toggled via %s: %s", bagID, tostring(which), hiddenBags[bagID] and "hidden" or "visible"))
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1562,7 +1559,6 @@ end
|
||||
function Guda_BagFrame_HighlightBagSlots(bagID)
|
||||
local itemContainer = getglobal("Guda_BagFrame_ItemContainer")
|
||||
if not itemContainer then
|
||||
addon:Debug("HighlightBagSlots: itemContainer not found")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1586,7 +1582,6 @@ function Guda_BagFrame_HighlightBagSlots(bagID)
|
||||
end
|
||||
end
|
||||
|
||||
addon:Debug(string.format("HighlightBagSlots: Highlighted %d slots, dimmed %d slots for bagID %d", highlightCount, dimCount, bagID))
|
||||
end
|
||||
|
||||
-- Clear all highlighting by restoring full opacity to all slots
|
||||
|
||||
@@ -20,12 +20,10 @@ function Guda_BankFrame_OnLoad(self)
|
||||
searchBox:SetTextColor(0.5, 0.5, 0.5, 1)
|
||||
end
|
||||
|
||||
addon:Debug("Bank frame loaded")
|
||||
end
|
||||
|
||||
-- OnShow
|
||||
function Guda_BankFrame_OnShow(self)
|
||||
addon:Debug("Bank frame OnShow (readOnly=%s, currentViewChar=%s)", tostring(isReadOnlyMode), tostring(currentViewChar))
|
||||
if BankFrame.EnsureBagButtonsInitialized then
|
||||
BankFrame:EnsureBagButtonsInitialized()
|
||||
end
|
||||
@@ -169,7 +167,6 @@ function BankFrame:DisplayItems(bankData, isOtherChar, charName)
|
||||
|
||||
-- Ensure this is NOT a bag slot button
|
||||
if button.isBagSlot then
|
||||
addon:Debug("WARNING: Got a bag slot button from item pool, skipping!")
|
||||
break
|
||||
end
|
||||
|
||||
@@ -606,7 +603,6 @@ function BankFrame:CreateGudaButtonOnBlizzardUI()
|
||||
-- Initially hide the button
|
||||
gudaButton:Hide()
|
||||
|
||||
addon:Debug("Guda button created on Blizzard BankFrame")
|
||||
end
|
||||
|
||||
-- Show the Guda button on Blizzard UI
|
||||
@@ -768,18 +764,12 @@ function BankFrame:Initialize()
|
||||
end
|
||||
end)
|
||||
|
||||
addon:Debug("Bank frame initialized")
|
||||
end
|
||||
|
||||
-- Bank Bag Slot Button Handlers
|
||||
|
||||
-- OnLoad handler for bank bag slot buttons
|
||||
function Guda_BankBagSlot_OnLoad(button, bagID)
|
||||
-- Debug: bag slot OnLoad
|
||||
local btnName = (button and button.GetName) and button:GetName() or tostring(button)
|
||||
if addon and addon.DEBUG then
|
||||
addon:Debug("BankBagSlot_OnLoad %s bagID=%s", tostring(btnName), tostring(bagID))
|
||||
end
|
||||
-- Hide borders from ItemButtonTemplate
|
||||
local buttonName = button:GetName()
|
||||
-- Hide the normal texture border
|
||||
@@ -851,11 +841,6 @@ end
|
||||
|
||||
-- Update bank bag slot button texture
|
||||
function Guda_BankBagSlot_Update(button, bagID)
|
||||
-- Debug: function initialization
|
||||
local btnName = (button and button.GetName) and button:GetName() or tostring(button)
|
||||
if addon and addon.DEBUG then
|
||||
addon:Debug("BankBagSlot_Update init for %s bagID=%s", tostring(btnName), tostring(bagID))
|
||||
end
|
||||
local isHidden = hiddenBankBags[bagID]
|
||||
|
||||
if bagID == -1 then
|
||||
@@ -883,10 +868,6 @@ function Guda_BankBagSlot_Update(button, bagID)
|
||||
-- Get bag texture directly from inventory (more reliable on 1.12)
|
||||
local texture = invSlot and GetInventoryItemTexture("player", invSlot) or nil
|
||||
|
||||
-- Debug details for diagnosis (DEBUG only)
|
||||
if addon and addon.DEBUG then
|
||||
addon:Debug("BankBagSlot_Update details bag=%s bankBtn=%s invSlot=%s purchased=%s tex=%s", tostring(bagID), tostring(bankButtonID), tostring(invSlot), tostring(isPurchased), tostring(texture))
|
||||
end
|
||||
|
||||
if texture then
|
||||
-- Bag is equipped in this slot and we have the texture
|
||||
@@ -927,9 +908,6 @@ function Guda_BankBagSlot_OnClick(button, bagID, which)
|
||||
hiddenBankBags[bagID] = not hiddenBankBags[bagID]
|
||||
Guda_BankBagSlot_Update(button, bagID)
|
||||
BankFrame:Update()
|
||||
if addon and addon.DEBUG then
|
||||
addon:Debug(string.format("Bank bag %d visibility toggled via %s: %s", bagID, tostring(which), hiddenBankBags[bagID] and "hidden" or "visible"))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@@ -937,9 +915,6 @@ function Guda_BankBagSlot_OnClick(button, bagID, which)
|
||||
-- Equip bag from cursor into this bank bag slot (5-10) when bank open and purchased
|
||||
if bagID and bagID ~= -1 and CursorHasItem and CursorHasItem() then
|
||||
local invSlot, bankButtonID = BankFrame:GetBankInvSlotForBagID(bagID)
|
||||
if addon and addon.DEBUG then
|
||||
addon:Debug(string.format("OnClick LEFT bag=%s bankBtn=%s invSlot=%s bankOpen=%s purchased=%s cursorHas=%s", tostring(bagID), tostring(bankButtonID), tostring(invSlot), tostring(addon.Modules.BankScanner:IsBankOpen()), tostring(bankButtonID and bankButtonID <= GetNumBankSlots()), tostring(CursorHasItem())))
|
||||
end
|
||||
if invSlot and addon.Modules.BankScanner:IsBankOpen() then
|
||||
local purchased = (bankButtonID and bankButtonID <= GetNumBankSlots())
|
||||
if purchased then
|
||||
@@ -977,10 +952,6 @@ function Guda_BankBagSlot_OnEnter(button, bagID)
|
||||
local isPurchased = (bankButtonID and bankButtonID <= numSlots)
|
||||
local hasItem = invSlot and GetInventoryItemTexture("player", invSlot)
|
||||
|
||||
if DEFAULT_CHAT_FRAME then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("Guda debug: OnEnter bag="..tostring(bagID).." bankBtn="..tostring(bankButtonID).." invSlot="..tostring(invSlot).." hasItem="..tostring(hasItem ~= nil))
|
||||
end
|
||||
|
||||
if hasItem then
|
||||
-- Show bag item tooltip
|
||||
GameTooltip:SetInventoryItem("player", invSlot)
|
||||
@@ -1018,7 +989,6 @@ end
|
||||
function Guda_BankFrame_HighlightBagSlots(bagID)
|
||||
local itemContainer = getglobal("Guda_BankFrame_ItemContainer")
|
||||
if not itemContainer then
|
||||
addon:Debug("BankFrame HighlightBagSlots: itemContainer not found")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -311,7 +311,7 @@
|
||||
</Button>
|
||||
|
||||
<!-- Bank Bag Slot 5 -->
|
||||
<Button name="$parent_BankBag5" inherits="ItemButtonTemplate" movable="true">
|
||||
<Button name="$parent_BankBag5" inherits="ItemButtonTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
|
||||
Reference in New Issue
Block a user