view ItemCountAddons/ItemCount.lua @ 56:b33248fb89dd

Added tag v0.1.12-BETA for changeset 1eff0a6979e9
author Zerotorescue
date Mon, 20 Dec 2010 14:32:21 +0100
parents 9607b3251655
children 03c0610e9c1e
line wrap: on
line source
do
	
	local function GetTotalCount(itemId)
		return ICGetItemCountTotal(itemId) or -1;
	end
	
	local function GetCharacterCount(itemId)
		return ICGetItemCountCharacter(itemId) or -1;
	end
	
	local function IsEnabled()
		return (ICGetItemCountTotal and ICGetItemCountCharacter);
	end
	
	local function OnSelect()
		local addonName = "|r|cfffed000ItemCount|r|cffff6600";
		
		print("|cffff6600Note: " .. addonName .. " can't record mailbox item data and thus this will not be included in any item counts.|r");
	end
	
	IMRegisterItemCountAddon("ItemCount", GetTotalCount, GetCharacterCount, IsEnabled, OnSelect);
	
end