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