small fix
This commit is contained in:
+7
-5
@@ -267,7 +267,7 @@ function self:Inbox_OpenSelected(all)
|
|||||||
|
|
||||||
local selected = {}
|
local selected = {}
|
||||||
if all then
|
if all then
|
||||||
for i = 1,GetInboxNumItems() do
|
for i=1,GetInboxNumItems() do
|
||||||
tinsert(selected, i)
|
tinsert(selected, i)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -514,7 +514,6 @@ function self.PostalMailButton_OnClick()
|
|||||||
}
|
}
|
||||||
|
|
||||||
self:SendMail_Clear()
|
self:SendMail_Clear()
|
||||||
SendMailFrame_Update()
|
|
||||||
|
|
||||||
self:When(function()
|
self:When(function()
|
||||||
return self.SendMail_ready
|
return self.SendMail_ready
|
||||||
@@ -549,14 +548,14 @@ function self:AttachmentButton_OnClick()
|
|||||||
self.orig.PickupContainerItem(unpack(attachedItem))
|
self.orig.PickupContainerItem(unpack(attachedItem))
|
||||||
if arg1 ~= 'LeftButton' then ClearCursor() end -- for the lock changed event
|
if arg1 ~= 'LeftButton' then ClearCursor() end -- for the lock changed event
|
||||||
end
|
end
|
||||||
SendMailFrame_Update()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- requires an item lock changed event for a proper update
|
-- requires an item lock changed event for a proper update
|
||||||
function self:SendMail_SetAttachment(item, slot)
|
function self:SendMail_SetAttachment(item, slot)
|
||||||
if item and not self:SendMail_PickupMailable(item) then return end
|
if item and not self:SendMail_PickupMailable(item) then
|
||||||
if not slot then
|
return
|
||||||
|
elseif not slot then
|
||||||
for i=1,ATTACHMENTS_MAX do
|
for i=1,ATTACHMENTS_MAX do
|
||||||
if not getglobal('PostalAttachment'..i).item then
|
if not getglobal('PostalAttachment'..i).item then
|
||||||
slot = getglobal('PostalAttachment'..i)
|
slot = getglobal('PostalAttachment'..i)
|
||||||
@@ -565,6 +564,7 @@ function self:SendMail_SetAttachment(item, slot)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if slot then
|
if slot then
|
||||||
|
if not (item or slot.item) then return true end
|
||||||
slot.item = item
|
slot.item = item
|
||||||
ClearCursor()
|
ClearCursor()
|
||||||
SendMailFrame_Update()
|
SendMailFrame_Update()
|
||||||
@@ -615,6 +615,8 @@ function self:SendMail_Clear()
|
|||||||
SendMailBodyEditBox:SetText('')
|
SendMailBodyEditBox:SetText('')
|
||||||
MoneyInputFrame_ResetMoney(SendMailMoney)
|
MoneyInputFrame_ResetMoney(SendMailMoney)
|
||||||
SendMailRadioButton_OnClick(1)
|
SendMailRadioButton_OnClick(1)
|
||||||
|
|
||||||
|
SendMailFrame_Update()
|
||||||
end
|
end
|
||||||
|
|
||||||
function self:SendMail_Send()
|
function self:SendMail_Send()
|
||||||
|
|||||||
Reference in New Issue
Block a user