comparison 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
comparison
equal deleted inserted replaced
49:fd3dd12f96ce 50:973d7396e0bf
1 local nametag, addon = ... 1 local nametag, addon = ...
2 2
3 --[==[ 3 --[==[
4 g_loot's numeric indices are loot entries (including titles, separators, 4 g_loot's numeric indices are loot entries (including titles, separators,
5 etc); its named indices are: 5 etc); its named indices are:
6 - forum: saved text from forum markup window, default nil 6 - forum saved text from forum markup window, default nil
7 - attend: saved text from raid attendence window, default nil 7 - attend saved text from raid attendence window, default nil
8 - printed.FOO: last loot index formatted into text window FOO, default 0 8 - printed.FOO last loot index formatted into text window FOO, default 0
9
10 Common g_loot indices:
11 - kind time/boss/loot
12 - hour 0-23, on the *physical instance server*, not the realm server
13 - minute 0-59, ditto
14 - stamp date+timestamp, on the local computer
15 - cols graphical display data; cleared when logging out
16
17 Time specific g_loot indices:
18 - startday table with month/day/year/text fields from makedate()
19
20 Boss specific g_loot indices:
21 - bosskill name of boss/encounter; not necessarily a kill;
22 - may be changed if "snarky boss names" option is enabled
23 - reason wipe/kill ("pull" does not generate an entry)
24 - instance name of instance, including size and difficulty
25 - duration in seconds; may be missing
26 - raiderlist "Able, Baker, Charlie"; may be missing
27
28 Loot specific g_loot indices:
29 - person recipient
30 - person_class class of recipient if available; may be missing;
31 - will be classID-style (e.g., DEATHKNIGHT)
32 - itemname not including square brackets
33 - id itemID as number
34 - itemlink full clickable link
35 - itexture icon path (e.g., Interface\Icons\INV_Misc_Rune_01)
36 - quality ITEM_QUALITY_* number
37 - disposition offspec/gvault/shard; missing otherwise; can be set from extratext
38 - count e.g., "x3"; missing otherwise; can be set/removed from extratext;
39 - triggers only for a stack of items, not "the boss dropped double axes today"
40 - is_heroic true if item is heroic; missing otherwise
41 - cache_miss if GetItemInfo failed; SHOULD be missing (changes other fields)
42 - bcast_from if rebroadcast from another player; missing otherwise
43 - extratext text in Note column, including disposition and rebroadcasting
44 - extratext_byhand true if text was edited by player directly; missing otherwise
45
9 46
10 Functions arranged like this, with these lables (for jumping to). As a 47 Functions arranged like this, with these lables (for jumping to). As a
11 rule, member functions with UpperCamelCase names are called directly by 48 rule, member functions with UpperCamelCase names are called directly by
12 user-facing code, ones with lowercase names are "one step removed", and 49 user-facing code, ones with lowercase names are "one step removed", and
13 names with leading underscores are strictly internal helper functions. 50 names with leading underscores are strictly internal helper functions.
437 opts.itemfilter = addon.default_itemfilter 474 opts.itemfilter = addon.default_itemfilter
438 end 475 end
439 addon.default_itemfilter = nil 476 addon.default_itemfilter = nil
440 477
441 self:RegisterChatCommand("ouroloot", "OnSlash") 478 self:RegisterChatCommand("ouroloot", "OnSlash")
442 -- maybe try to detect if this command is already in use...
443 if opts.register_slashloot then 479 if opts.register_slashloot then
480 -- NOTA BENE: do not use /loot in the LoadOn list, ChatTypeInfo gets confused
481 -- maybe try to detect if this command is already in use...
444 SLASH_ACECONSOLE_OUROLOOT2 = "/loot" 482 SLASH_ACECONSOLE_OUROLOOT2 = "/loot"
445 end 483 end
446 484
447 self.history_all = self.history_all or OuroLootSV_hist or {} 485 self.history_all = self.history_all or OuroLootSV_hist or {}
448 local r = assert(GetRealmName()) 486 local r = assert(GetRealmName())