Mercurial > wow > ouroloot
comparison core.lua @ 65:69fd720f853e
Add display_bcast_from option.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 27 Apr 2012 09:12:45 +0000 |
parents | 359d0159d6ca |
children | 43913e02a1ef |
comparison
equal
deleted
inserted
replaced
64:359d0159d6ca | 65:69fd720f853e |
---|---|
56 - count e.g., "x3"; missing otherwise; can be set/removed from | 56 - count e.g., "x3"; missing otherwise; can be set/removed from |
57 extratext; triggers only for a stack of items, not "the boss | 57 extratext; triggers only for a stack of items, not "the boss |
58 dropped double axes today" | 58 dropped double axes today" |
59 - is_heroic true if item is heroic; missing otherwise | 59 - is_heroic true if item is heroic; missing otherwise |
60 - cache_miss if GetItemInfo failed; SHOULD be missing (changes other fields) | 60 - cache_miss if GetItemInfo failed; SHOULD be missing (changes other fields) |
61 - bcast_from if rebroadcast from another player; missing otherwise | 61 - bcast_from player's name if received rebroadcast from that player; |
62 missing otherwise; can be deleted as a result of in-game | |
63 fiddling of loot data | |
62 - extratext text in Note column, including disposition and rebroadcasting | 64 - extratext text in Note column, including disposition and rebroadcasting |
63 - extratext_byhand true if text edited by player directly; missing otherwise | 65 - extratext_byhand true if text edited by player directly; missing otherwise |
64 | 66 |
65 | 67 |
66 Functions arranged like this, with these lables (for jumping to). As a | 68 Functions arranged like this, with these lables (for jumping to). As a |
122 ['[item] by ID'] = '[item]$I[/item]$X - $T', | 124 ['[item] by ID'] = '[item]$I[/item]$X - $T', |
123 ['Custom...'] = '', | 125 ['Custom...'] = '', |
124 }, | 126 }, |
125 ['forum_current'] = '[item] by name', | 127 ['forum_current'] = '[item] by name', |
126 ['display_disabled_LODs'] = false, | 128 ['display_disabled_LODs'] = false, |
129 ['display_bcast_from'] = true, | |
127 } | 130 } |
128 local virgin = "First time loaded? Hi! Use the /ouroloot or /loot command" | 131 local virgin = "First time loaded? Hi! Use the /ouroloot or /loot command" |
129 .." to show the main display. You should probably browse the instructions" | 132 .." to show the main display. You should probably browse the instructions" |
130 .." if you've never used this before; %s to display the help window. This" | 133 .." if you've never used this before; %s to display the help window. This" |
131 .." welcome message will not intrude again." | 134 .." welcome message will not intrude again." |
271 local r = 0 | 274 local r = 0 |
272 for d in addon.revision:gmatch("%d+") do | 275 for d in addon.revision:gmatch("%d+") do |
273 r = 1000*r + d | 276 r = 1000*r + d |
274 end | 277 end |
275 -- If it's a big enough number to obviously be a release, then make | 278 -- If it's a big enough number to obviously be a release, then make |
276 -- sure it's big enough to overcome many small point releases. | 279 -- sure it's big enough to overcome many small previous point releases. |
277 while r > 2000 and r < 2000000 do | 280 while r > 2000 and r < 2000000 do |
278 r = 1000*r | 281 r = 1000*r |
279 end | 282 end |
280 revision_large = math.max(r,1) | 283 revision_large = math.max(r,1) |
281 end | 284 end |
461 OuroLootSV_opts = {} | 464 OuroLootSV_opts = {} |
462 self:ScheduleTimer(function(s) | 465 self:ScheduleTimer(function(s) |
463 s:Print(virgin, s.format_hypertext('help',"click here",ITEM_QUALITY_UNCOMMON)) | 466 s:Print(virgin, s.format_hypertext('help',"click here",ITEM_QUALITY_UNCOMMON)) |
464 virgin = nil | 467 virgin = nil |
465 end,10,self) | 468 end,10,self) |
469 else | |
470 virgin = nil | |
466 end | 471 end |
467 opts = OuroLootSV_opts | 472 opts = OuroLootSV_opts |
468 local stored_datarev = opts.datarev | 473 local stored_datarev = opts.datarev |
469 for opt,default in pairs(option_defaults) do | 474 for opt,default in pairs(option_defaults) do |
470 if opts[opt] == nil then | 475 if opts[opt] == nil then |
1081 if not itemstring then | 1086 if not itemstring then |
1082 itemstring = msg:match(g_LOOT_ITEM_SELF_s) | 1087 itemstring = msg:match(g_LOOT_ITEM_SELF_s) |
1083 end | 1088 end |
1084 end | 1089 end |
1085 | 1090 |
1086 self.dprint('loot', "CHAT_MSG_LOOT, person is", person, ", itemstring is", itemstring, ", count is", count) | 1091 self.dprint('loot', "CHAT_MSG_LOOT, person is", person, |
1092 ", itemstring is", itemstring, ", count is", count) | |
1087 if not itemstring then return end -- "So-and-So selected Greed", etc, not actual looting | 1093 if not itemstring then return end -- "So-and-So selected Greed", etc, not actual looting |
1088 | 1094 |
1089 -- Name might be colorized, remove the highlighting | 1095 -- Name might be colorized, remove the highlighting |
1090 if person then | 1096 if person then |
1091 person = person:match("|c%x%x%x%x%x%x%x%x(%S+)") or person | 1097 person = person:match("|c%x%x%x%x%x%x%x%x(%S+)") or person |
1126 end | 1132 end |
1127 end | 1133 end |
1128 | 1134 |
1129 if cmd == "" then | 1135 if cmd == "" then |
1130 if InCombatLockdown() then | 1136 if InCombatLockdown() then |
1131 return self:Print("Can't display window in combat.") | 1137 return self:Print("Shouldn't display window in combat.") |
1132 else | 1138 else |
1133 return self:BuildMainDisplay() | 1139 return self:BuildMainDisplay() |
1134 end | 1140 end |
1135 | 1141 |
1136 elseif cmd:find("^thre") then | 1142 elseif cmd:find("^thre") then |
1658 self:Print(self.status_text) | 1664 self:Print(self.status_text) |
1659 return | 1665 return |
1660 end | 1666 end |
1661 | 1667 |
1662 if self.bossmods[x].r (self, _do_boss) then | 1668 if self.bossmods[x].r (self, _do_boss) then |
1663 --self.bossmod_registered = x | |
1664 self.bossmod_registered = self.bossmods[x].n | 1669 self.bossmod_registered = self.bossmods[x].n |
1665 else | 1670 else |
1666 self:Print("|cffff1010Boss mod registration failed|r") | 1671 self:Print("|cffff1010Boss mod registration failed|r") |
1667 end | 1672 end |
1668 end | 1673 end |
1682 end | 1687 end |
1683 } | 1688 } |
1684 | 1689 |
1685 -- Given a loot index, searches backwards for a timestamp. Returns that | 1690 -- Given a loot index, searches backwards for a timestamp. Returns that |
1686 -- index and the time entry, or nil if it falls off the beginning. Pass an | 1691 -- index and the time entry, or nil if it falls off the beginning. Pass an |
1687 -- optional second index to search no earlier than it. | 1692 -- optional second index to search no earlier than that. |
1688 -- May also be able to make good use of this in forum-generation routine. | 1693 -- May also be able to make good use of this in forum-generation routine. |
1689 function addon:find_previous_time_entry(i,stop) | 1694 function addon:find_previous_time_entry(i,stop) |
1690 stop = stop or 0 | 1695 stop = stop or 0 |
1691 while i > stop do | 1696 while i > stop do |
1692 if g_loot[i].kind == 'time' then | 1697 if g_loot[i].kind == 'time' then |