Skip to content

Instantly share code, notes, and snippets.

@eehret
eehret / gist:11122781
Created April 20, 2014 19:24
Patch for BeanCounter 5.19.5445 to fix a bug where new mail items are sometimes not read when they should be.
diff --git BeanCounterMail.lua BeanCounterMail.lua
index b517cb9..01f1ce3 100644
--- BeanCounterMail.lua
+++ BeanCounterMail.lua
@@ -64,6 +64,7 @@ function private.mailMonitor(event,arg1)
elseif (event == "MAIL_SHOW") then
private.inboxStart = {} --clear the inbox list, if we errored out this should give us a fresh start.
+ private.mailReadOveride = {}
if not registeredInboxFrameHook then --make sure we only ever register this hook once
@eehret
eehret / gist:11122694
Created April 20, 2014 19:20
Patch for Beancounter 5.19.5445 to fix bug where items with random enchants sometimes do not get tracked. Cause was due to certain items with random enchants receiving different unique id when placed in mail. My solution was to calculate an alternate unique id using the "suffix factor" and information stored in the local DB, when the mail item g…
diff --git BeanCounterAPI.lua BeanCounterAPI.lua
index 28a9afb..40e4170 100644
--- BeanCounterAPI.lua
+++ BeanCounterAPI.lua
@@ -353,6 +353,16 @@ function lib.API.getItemString(itemLink)
return itemString, itemName
end
+function lib.API.getSuffixFactor(suffixId, uniqueId)
+ local suffixFactor = 0