diff core.lua @ 50:973d7396e0bf

Document entry fields. Add support for AddonLoader.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Mon, 30 Jan 2012 14:43:24 +0000
parents fd3dd12f96ce
children 857aea8ae33d
line wrap: on
line diff
--- a/core.lua	Sun Jan 29 03:38:30 2012 +0000
+++ b/core.lua	Mon Jan 30 14:43:24 2012 +0000
@@ -3,9 +3,46 @@
 --[==[
 g_loot's numeric indices are loot entries (including titles, separators,
 etc); its named indices are:
-- forum:		saved text from forum markup window, default nil
-- attend:		saved text from raid attendence window, default nil
-- printed.FOO:	last loot index formatted into text window FOO, default 0
+- forum			saved text from forum markup window, default nil
+- attend		saved text from raid attendence window, default nil
+- printed.FOO	last loot index formatted into text window FOO, default 0
+
+Common g_loot indices:
+- kind			time/boss/loot
+- hour			0-23, on the *physical instance server*, not the realm server
+- minute		0-59, ditto
+- stamp			date+timestamp, on the local computer
+- cols			graphical display data; cleared when logging out
+
+Time specific g_loot indices:
+- startday		table with month/day/year/text fields from makedate()
+
+Boss specific g_loot indices:
+- bosskill		name of boss/encounter; not necessarily a kill;
+- 				may be changed if "snarky boss names" option is enabled
+- reason		wipe/kill ("pull" does not generate an entry)
+- instance		name of instance, including size and difficulty
+- duration		in seconds; may be missing
+- raiderlist	"Able, Baker, Charlie"; may be missing
+
+Loot specific g_loot indices:
+- person		recipient
+- person_class	class of recipient if available; may be missing;
+- 				will be classID-style (e.g., DEATHKNIGHT)
+- itemname		not including square brackets
+- id			itemID as number
+- itemlink		full clickable link
+- itexture		icon path (e.g., Interface\Icons\INV_Misc_Rune_01)
+- quality		ITEM_QUALITY_* number
+- disposition	offspec/gvault/shard; missing otherwise; can be set from extratext
+- count			e.g., "x3"; missing otherwise; can be set/removed from extratext;
+- 				triggers only for a stack of items, not "the boss dropped double axes today"
+- is_heroic		true if item is heroic; missing otherwise
+- cache_miss	if GetItemInfo failed; SHOULD be missing (changes other fields)
+- bcast_from	if rebroadcast from another player; missing otherwise
+- extratext		text in Note column, including disposition and rebroadcasting
+- extratext_byhand	true if text was edited by player directly; missing otherwise
+
 
 Functions arranged like this, with these lables (for jumping to).  As a
 rule, member functions with UpperCamelCase names are called directly by
@@ -439,8 +476,9 @@
 	addon.default_itemfilter = nil
 
 	self:RegisterChatCommand("ouroloot", "OnSlash")
-	-- maybe try to detect if this command is already in use...
 	if opts.register_slashloot then
+		-- NOTA BENE:  do not use /loot in the LoadOn list, ChatTypeInfo gets confused
+		-- maybe try to detect if this command is already in use...
 		SLASH_ACECONSOLE_OUROLOOT2 = "/loot"
 	end