refactoring, removed duplicate error messages
This commit is contained in:
+2
-7
@@ -85,10 +85,8 @@ end
|
||||
function UI_ERROR_MESSAGE()
|
||||
if Inbox_opening then
|
||||
if arg1 == ERR_INV_FULL then
|
||||
Print('Inventory full. Aborting.', 1, 0, 0)
|
||||
Abort()
|
||||
elseif arg1 == ERR_ITEM_MAX_COUNT then
|
||||
Print('You already have the maximum amount of that item. Skipping.', 1, 0, 0)
|
||||
Inbox_skip = true
|
||||
end
|
||||
end
|
||||
@@ -128,10 +126,6 @@ function hook.OpenMail_Reply(...)
|
||||
return orig.OpenMail_Reply(unpack(arg))
|
||||
end
|
||||
|
||||
function Print(msg, r, g, b)
|
||||
DEFAULT_CHAT_FRAME:AddMessage('Postal: ' .. msg, r, g, b)
|
||||
end
|
||||
|
||||
function Abort()
|
||||
Kill()
|
||||
Inbox_opening = false
|
||||
@@ -734,7 +728,8 @@ function SendMail_Send()
|
||||
orig.ClickSendMailItemButton()
|
||||
|
||||
if not GetSendMailItem() then
|
||||
return Print('Unknown error. Aborting.', 1, 0, 0)
|
||||
DEFAULT_CHAT_FRAME:AddMessage('Postal: Unknown error. Aborting.', 1, 0, 0)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user