Mercurial > wow > ouroloot
comparison core.lua @ 11:952c3ac0e783
GetItemQualityColor change and TOC bump for 4.2
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Tue, 28 Jun 2011 19:18:07 +0000 |
| parents | 67b8537e8432 |
| children | a91cd74d8df9 |
comparison
equal
deleted
inserted
replaced
| 10:67b8537e8432 | 11:952c3ac0e783 |
|---|---|
| 132 bossmod_registered = nil | 132 bossmod_registered = nil |
| 133 bossmods = {} | 133 bossmods = {} |
| 134 | 134 |
| 135 requesting = nil -- for prompting for additional rebroadcasters | 135 requesting = nil -- for prompting for additional rebroadcasters |
| 136 | 136 |
| 137 thresholds, quality_hexes = {}, {} | 137 thresholds = {} |
| 138 for i = 0,6 do | 138 for i = 0,6 do |
| 139 local hex = _G.select(4,_G.GetItemQualityColor(i)) | 139 thresholds[i] = _G.ITEM_QUALITY_COLORS[i].hex .. _G["ITEM_QUALITY"..i.."_DESC"] .. "|r" |
| 140 local desc = _G["ITEM_QUALITY"..i.."_DESC"] | |
| 141 quality_hexes[i] = hex | |
| 142 thresholds[i] = hex .. desc .. "|r" | |
| 143 end | 140 end |
| 144 | 141 |
| 145 _G.setfenv (1, _G) | 142 _G.setfenv (1, _G) |
| 146 end | 143 end |
| 147 | 144 |
| 168 do | 165 do |
| 169 local hypertext_format_str = "|HOuroRaid:%s|h%s[%s]|r|h" | 166 local hypertext_format_str = "|HOuroRaid:%s|h%s[%s]|r|h" |
| 170 | 167 |
| 171 function addon.format_hypertext (code, text, color) | 168 function addon.format_hypertext (code, text, color) |
| 172 return hypertext_format_str:format (code, | 169 return hypertext_format_str:format (code, |
| 173 type(color)=='number' and addon.quality_hexes[color] or color, | 170 type(color)=='number' and ITEM_QUALITY_COLORS[color].hex or color, |
| 174 text) | 171 text) |
| 175 end | 172 end |
| 176 | 173 |
| 177 DEFAULT_CHAT_FRAME:HookScript("OnHyperlinkClick", function(self, link, string, mousebutton) | 174 DEFAULT_CHAT_FRAME:HookScript("OnHyperlinkClick", function(self, link, string, mousebutton) |
| 178 local ltype, arg = strsplit(":",link) | 175 local ltype, arg = strsplit(":",link) |
| 522 self.popped = StaticPopup_Show "OUROL_REMIND" | 519 self.popped = StaticPopup_Show "OUROL_REMIND" |
| 523 self.popped.data = self | 520 self.popped.data = self |
| 524 return | 521 return |
| 525 end | 522 end |
| 526 end | 523 end |
| 524 -- Throttle the checks fired by common events. | |
| 527 if docheck and not InCombatLockdown() then | 525 if docheck and not InCombatLockdown() then |
| 528 now = time() | 526 now = time() |
| 529 if difftime(now,lastevent) > 45 then | 527 if difftime(now,lastevent) > 45 then |
| 530 lastevent = now | 528 lastevent = now |
| 531 self:CheckRoster(false,now) | 529 self:CheckRoster(false,now) |
