From 882feb0d2922696554621f41263e9a66e9482362 Mon Sep 17 00:00:00 2001 From: Alar of Runetotem Date: Sun, 4 Jul 2021 14:40:32 +0200 Subject: [PATCH] Workaround for invalid boe items --- MailCommander.lua | 7 ++++++- RelNotes.lua | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/MailCommander.lua b/MailCommander.lua index 1144ce3..3a5d872 100644 --- a/MailCommander.lua +++ b/MailCommander.lua @@ -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) @@ -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") @@ -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") diff --git a/RelNotes.lua b/RelNotes.lua index 760a960..64701de 100644 --- a/RelNotes.lua +++ b/RelNotes.lua @@ -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) ]])