Skip to content

Commit

Permalink
Workaround for invalid boe items
Browse files Browse the repository at this point in the history
  • Loading branch information
Alar of Runetotem committed Jul 4, 2021
1 parent fc1e0ad commit 882feb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MailCommander.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ local basepresets={ --#basepresets
local itemlink=GetContainerItemLink(bag,slot)
if itemlink then
local id=parseLink(itemlink)
if not id then
self:Print(C("Invalid item ","Orange"),itemlink)
return
end
local min=getProperty('keep',toon,id,0)
local max=getProperty('cap',toon,id,CAP)
local level=GetDetailedItemLevelInfo(itemlink)
Expand Down Expand Up @@ -998,6 +1002,7 @@ function addon:OnInitialized()
Click on 'Cancel' and restore MailCommander 1.0 if you want to keep the old version
]],
0,function(this) C_Timer.After(0.5,addon.InitContinue) end,function() C_Timer.After(0.5,addon.InitDisabled) end,self)

end
function addon:InitDisabled()
addon:Popup(C("Mailcommander","Orange").. "\n\n" .. "MailCommander has been disabled")
Expand Down Expand Up @@ -1056,7 +1061,7 @@ function addon:OnInitializedContinue()
self:AddBoolean("ALLFACTIONS",false,L["Show characters from both factions"],L["Show all toons fromj all factions"])
self:AddBoolean("ALLREALMS",false,L["Show characters from all realms"],L["Show all toons from all realms"])
self:AddLabel(L["Data management"])
self:AddAction("reset",L["Erase all stored data. Think twice"])
self:AddAction("Reset",L["Erase all stored data. Think twice"])
--@debug@
self:AddLabel(L["Debug Options"])
self:AddBoolean("DRY",false,"Disable mail sending")
Expand Down
3 changes: 3 additions & 0 deletions RelNotes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Mail Commander allows you to define a per character list of needs which wil be d
You can make this selection permament, disabling some kind of items, or just cherry pick each time
You can also use the "Send all" button to have all enabled items sent with a single click
]])
self:RelNotes(2,0,2,[[
Fix: MailCommander\MailCommander-2.0.1 90100.lua:403: Usage: GetItemInfoInstant(itemID|"name"|"itemlink")
]])
self:RelNotes(2,0,1,[[
Fix: MailCommander\MailCommander-2.0.0 90100.lua:1099: bad argument #1 to 'pairs' (table expected, got nil)
]])
Expand Down

0 comments on commit 882feb0

Please sign in to comment.