fix: money sent/received

This commit is contained in:
Salikh Gurgenidze
2025-12-28 00:24:18 +04:00
parent 4119547d1f
commit 8c17797133
2 changed files with 22 additions and 15 deletions
+21 -14
View File
@@ -197,6 +197,27 @@ function MailboxFrame:DisplayItems(items, charFullName, totalMails)
row:ClearAllPoints()
row:SetPoint("TOPLEFT", container, "TOPLEFT", 0, -(rowIndex - 1) * 55)
-- Row Money Frame
local moneyFrame = getglobal(row:GetName() .. "_MoneyFrame")
if moneyFrame then
-- Ensure row money frame doesn't auto-update to character money
moneyFrame.moneyType = "STATIC"
moneyFrame:UnregisterAllEvents()
moneyFrame:SetScript("OnShow", nil) -- Disable Blizzard's auto-update OnShow
moneyFrame:SetScript("OnEvent", nil)
-- Restore right alignment for the money frame to avoid overlap with icon
moneyFrame:ClearAllPoints()
moneyFrame:SetPoint("BOTTOMRIGHT", row, "BOTTOMRIGHT", -10, 8)
end
if (mail.money or 0) > 0 then
moneyFrame:Show()
MoneyFrame_Update(moneyFrame:GetName(), mail.money)
else
if moneyFrame then moneyFrame:Hide() end
end
-- Fill row data
getglobal(row:GetName() .. "_Sender"):SetText(mail.sender or "Unknown")
@@ -257,20 +278,6 @@ function MailboxFrame:DisplayItems(items, charFullName, totalMails)
if itemButton.qualityBorder then itemButton.qualityBorder:Hide() end
end
-- Row Money Frame
local moneyFrame = getglobal(row:GetName() .. "_MoneyFrame")
if moneyFrame then
-- Restore right alignment for the money frame to avoid overlap with icon
moneyFrame:ClearAllPoints()
moneyFrame:SetPoint("BOTTOMRIGHT", row, "BOTTOMRIGHT", -10, 8)
end
if (mail.money or 0) > 0 then
MoneyFrame_Update(moneyFrame:GetName(), mail.money)
moneyFrame:Show()
else
moneyFrame:Hide()
end
row:Show()
rowIndex = rowIndex + 1
end
+1 -1
View File
@@ -205,7 +205,7 @@
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-20" y="-40"/>
<AbsDimension x="-20" y="-43"/>
</Offset>
</Anchor>
</Anchors>