diff core.lua @ 70:cdee65c1bd8c

Implement a list of items to be automatically marked as sent to the guild vault. List controlled on the Options tab like the existing filter. Default list is Cataclysm crafting material drops.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 11 May 2012 03:56:21 +0000
parents 8442272a8418
children fb330a1fb6e9
line wrap: on
line diff
--- a/core.lua	Fri May 11 03:08:12 2012 +0000
+++ b/core.lua	Fri May 11 03:56:21 2012 +0000
@@ -547,6 +547,10 @@
 		opts.itemfilter = self.default_itemfilter
 	end
 	self.default_itemfilter = nil
+	if opts.itemvault == nil then
+		opts.itemvault = self.default_itemvault
+	end
+	self.default_itemvault = nil
 
 	self:RegisterChatCommand("ouroloot", "OnSlash")
 	if opts.register_slashloot then
@@ -1082,12 +1086,16 @@
 					id			= itemid,
 					itemlink	= ilink,
 					itexture	= itexture,
-					disposition	= (recipient == self.sharder) and 'shard' or nil,
 					count		= (count and count ~= "") and count or nil,
 					bcast_from	= from,
 					extratext	= extratext,
 					variant		= self:is_variant_item(ilink),
 				}
+				if opts.itemvault[itemid] then
+					i.disposition = 'gvault'
+				elseif recipient == self.sharder then
+					i.disposition = 'shard'
+				end
 				if local_override then
 					-- player is adding loot by hand, don't wait for network cache timeouts
 					-- keep this sync'd with prefer_local_loots above