refactoring, removed duplicate error messages

This commit is contained in:
Manuel Simon Hirsig
2017-01-02 21:27:00 +01:00
parent 1de1acaf58
commit 1cc6ba0c9c
+2 -7
View File
@@ -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