Mercurial > wow > ouroloot
diff core.lua @ 142:375059a11c1d 2.21.0
Updates for WoD.
- Basic WoD changes (TOC bump, LE_* constants, etc)
- The instance_abbrev table is now indexed by InstanceMapID values; the old
method is still supported for transition.
- Some initial placeholder values for WoD until we actually start seeing them.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Thu, 13 Nov 2014 22:12:33 -0500 |
parents | c176359e7265 |
children | 543fcf15add7 |
line wrap: on
line diff
--- a/core.lua Wed Mar 20 20:49:11 2013 -0400 +++ b/core.lua Thu Nov 13 22:12:33 2014 -0500 @@ -57,7 +57,7 @@ - id itemID as number - itemlink full clickable link - itexture icon path (e.g., Interface\Icons\INV_Misc_Rune_01) -- quality ITEM_QUALITY_* number +- quality [LE_]ITEM_QUALITY_* number - unique an almost-certainly-unique string, content meaningless - disposition offspec/gvault/shard; missing otherwise; can be set from the extratext field @@ -294,7 +294,7 @@ -- heirlooms to show up thresholds = {} for i = 0,6 do - thresholds[i] = _G.ITEM_QUALITY_COLORS[i].hex .. _G["ITEM_QUALITY"..i.."_DESC"] .. "|r" + thresholds[i] = _G.ITEM_QUALITY_COLORS[i].hex .. _G['ITEM_QUALITY'..i..'_DESC'] .. '|r' end _G.setfenv (1, _G) @@ -440,7 +440,7 @@ --@end-debug@ -- TEXT will automatically be surrounded by brackets - -- COLOR can be ITEM_QUALITY_* or a formatting string ("|cff...") + -- COLOR can be LE_ITEM_QUALITY_* or a formatting string ("|cff...") -- FUNC can be "MethodName", "tab_title", or a function -- -- Returns an opaque token and a matching number. Calling tostring() on @@ -530,9 +530,9 @@ function instance_tag() -- Return values of GetInstanceInfo changed considerably, now much -- more useful and consistent. - local name, typeof, diffcode, _, raidsize = GetInstanceInfo() + local name, typeof, diffcode, _, raidsize, _, _, mapid, currsize = GetInstanceInfo() local t - name = addon.instance_abbrev[name] or name + name = addon.instance_abbrev[mapid] or addon.instance_abbrev[name] or name if typeof == nil or typeof == "none" or diffcode == 0 or diffcode == nil then -- either outdoors or in a scenario (revisit those maybe) return name, MAX_RAID_MEMBERS @@ -651,6 +651,7 @@ end ]] do + local AnimTimerFrame = CreateFrame('Frame',nil,nil) -- FIXME transition hack local caches = {} local cleanup_group = AnimTimerFrame:CreateAnimationGroup() local time, next = time, next @@ -760,7 +761,7 @@ --function self.callbacks:OnUnused (target_aka_self, eventname) end if _G.OuroLootOptsDB == nil then - local vclick = self.format_hypertext ([[click here]], ITEM_QUALITY_UNCOMMON, 'help') + local vclick = self.format_hypertext ([[click here]], LE_ITEM_QUALITY_UNCOMMON, 'help') self:ScheduleTimer(function(s) for id in pairs(self.default_itemfilter) do opts.itemfilter[id] = true @@ -879,8 +880,6 @@ -- -- CFPrint added instead of the usual Print testing of the first arg for -- frame-ness, which would slow down all printing and only rarely be useful. - -- - -- There is no ITEM_QUALITY_LEGENDARY constant. Sigh. do local AC = LibStub("AceConsole-3.0") function addon.chatprefix (code, arg) @@ -889,7 +888,8 @@ f = code --elseif ..... end - local ret, num = self.format_hypertext ("Ouro Loot", --[[legendary]]5, f) + local ret, num = self.format_hypertext ("Ouro Loot", + LE_ITEM_QUALITY_LEGENDARY, f) if code == "GoToLootLine" then self.lootjumps[num] = arg end @@ -933,7 +933,7 @@ while opts.keybinding do if InCombatLockdown() then local reload = self.format_hypertext ([[the options tab]], - ITEM_QUALITY_UNCOMMON, 'opt') + LE_ITEM_QUALITY_UNCOMMON, 'opt') self:Print("Cannot create '%s' as a keybinding while in combat!", opts.keybinding_text) self:Print("The rest of the addon will continue to work, but you will need to reload out of combat to get the keybinding. Either type /reload or use the button on %s in the lower right.", @@ -1197,7 +1197,7 @@ 'Activate', enabled_p, rebroadcast_p, threshold The two boolean predicates are self-explanatory. The threshold is an - ITEM_QUALITY_* constant integer. + LE_ITEM_QUALITY_* constant integer. 'Deactivate', raiderdata After all system events have been unregistered. Argument is a holder of @@ -1625,7 +1625,7 @@ if (not iname) or (not itexture) then cache_miss = true iname, ilink, iquality, itexture = - UNKNOWN..': '..itemid, 'item:6948', ITEM_QUALITY_COMMON, [[Interface\ICONS\INV_Misc_QuestionMark]] + UNKNOWN..': '..itemid, 'item:6948', LE_ITEM_QUALITY_COMMON, [[Interface\ICONS\INV_Misc_QuestionMark]] end self.dprint('loot',">>"..prefix, "R:", recipient, "U:", unique, "I:", itemid, "C:", count, "frm:", from, "ex:", extratext, "q:", iquality) @@ -1834,7 +1834,7 @@ -- that GUI is in place.) do local green_help_link = addon.format_hypertext ([[Click here]], - ITEM_QUALITY_UNCOMMON, 'help') + LE_ITEM_QUALITY_UNCOMMON, 'help') function addon:OnSlash (txt) --, editbox) txt = strtrim(txt:lower()) local cmd, arg = "" @@ -2197,7 +2197,7 @@ else self.dprint('comm', "ours is older, (possibly) yammering") if newer_warning then - local pop = addon.format_hypertext ([[click here]], ITEM_QUALITY_UNCOMMON, + local pop = addon.format_hypertext ([[click here]], LE_ITEM_QUALITY_UNCOMMON, function() -- Sadly, this is not generated by the packager, so hardcode it -- for now. The 'data' field is handled differently for onshow @@ -2206,7 +2206,7 @@ --[[text_arg1=]]nil, --[[text_arg2=]]nil, --[[data=]][[http://www.curse.com/addons/wow/ouroloot]]) end) - local ping = addon.format_hypertext ([[click here]], ITEM_QUALITY_UNCOMMON, 'DoPing') + local ping = addon.format_hypertext ([[click here]], LE_ITEM_QUALITY_UNCOMMON, 'DoPing') self:Print(newer_warning, tostring(pop), tostring(ping)) newer_warning = nil end