# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1323246478 0 # Node ID f1d0a5d7b006fb3f21bbb517b9a81cd5e1d982d4 # Parent 076a44f30a8b01de6adc1c009e081acb6e49bafd Manual loot insertion should not go through recent cache. diff -r 076a44f30a8b -r f1d0a5d7b006 core.lua --- a/core.lua Fri Dec 02 01:59:31 2011 +0000 +++ b/core.lua Wed Dec 07 08:27:58 2011 +0000 @@ -671,6 +671,7 @@ -- The function name is a bit of a misnomer, as local entries overwrite -- remote entries as the candidate table is populated. This routine is -- to extract the results once the cache timers have expired. + -- Keep this sync'd with the local_override branch below. for i,sig in ipairs(candidates) do addon.dprint('loot', "processing candidate entry", i, sig) local loot = candidates[sig] @@ -719,7 +720,6 @@ if from and self.recent_loot:test(signature) then self.dprint('cache', "loot <",signature,"> already in cache, skipping") else - self.recent_loot:add(signature) -- There is some redundancy in all this, in the interests of ease-of-coding i = { kind = 'loot', @@ -737,9 +737,28 @@ extratext = extratext, is_heroic = self:is_heroic_item(ilink), } - candidates[signature] = i - tinsert (candidates, signature) - self.dprint('cache', "loot <",signature,"> added to cache, candidate", #candidates) + if local_override then + -- adding things by hand, don't wait for network cache timeouts + if i.extratext == 'shard' + or i.extratext == 'gvault' + or i.extratext == 'offspec' + then + i.disposition = i.extratext + end + local looti = self._addLootEntry(i) + if (i.disposition ~= 'shard') + and (i.disposition ~= 'gvault') + and (not self.history_suppress) + then + self:_addHistoryEntry(looti) + end + i = looti -- mostly for gui's manual entry + else + self.recent_loot:add(signature) + candidates[signature] = i + tinsert (candidates, signature) + self.dprint('cache', "loot <",signature,"> added to cache, candidate", #candidates) + end end break end