WoWInterface SVN Snoopy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

Snoopy/core.lua
9,6 → 9,7
local cache = { }
local elap, schedule, text = 0, 0.25, nil
local UpdateAllData, UpdateUnit, UpdateNote, UpdateTitleText
local nothing = function() end
 
UnitPopupButtons.INSPECT.dist = 0 -- enables "Inspect" option in dropdown
BINDING_HEADER_INSPECT = INSPECT
19,6 → 20,7
end)
a:Hide()
a:RegisterEvent("ADDON_LOADED")
local hide = PlayerFrameFlash.Hide
function a:ADDON_LOADED(a1)
if a1 ~= "Blizzard_InspectUI" then return end
a:UnregisterEvent("ADDON_LOADED")
26,6 → 28,9
a.ADDON_LOADED = nil
InspectFrame:RegisterEvent("INSPECT_TALENT_READY")
InspectFrame:SetScript("OnUpdate", nil)
if oGlow then
oGlow.preventInspect = true
end
 
function UpdateAllData() -- try to update all of the inspect window data
InspectPaperDollFrame_OnShow()
71,9 → 76,9
tinsert(talenttext, "-")
end
if gname then
InspectTitleText:SetFormattedText("%s of <%s>\n%s", gtitle, gname, table.concat(talenttext, "/ "))
InspectTitleText:SetFormattedText("%s of <%s>\n%s", gtitle, gname, table.concat(talenttext, " / "))
else
InspectTitleText:SetFormattedText("-\n%s", table.concat(talenttext, "/ "))
InspectTitleText:SetFormattedText("-\n%s", table.concat(talenttext, " / "))
end
wipe(talenttext)
end
87,8 → 92,10
InspectFrame_OnEvent = function(self, ev, a1)
if not InspectFrame:IsShown() then return end
local unit = InspectFrame.unit
if ((ev == "PLAYER_TARGET_CHANGED" and unit == "target") or (ev == "PARTY_MEMBERS_CHANGED" and unit ~= "target")) and UnitExists(unit) then
UpdateUnit(unit)
if ((ev == "PLAYER_TARGET_CHANGED" and unit == "target") or (ev == "PARTY_MEMBERS_CHANGED" and unit ~= "target")) then
if UnitExists(unit) then
UpdateUnit(unit)
end
elseif ev == "UNIT_PORTRAIT_UPDATE" and unit == a1 then
SetPortraitTexture(InspectFramePortrait, unit)
UpdateUnit(unit)
102,10 → 109,28
oInspectPaperDollItemSlotButton_Update = InspectPaperDollItemSlotButton_Update
InspectPaperDollItemSlotButton_Update = function(self, ...)
oInspectPaperDollItemSlotButton_Update(self, ...)
local id = self:GetID()
local link
if CheckInteractDistance(InspectFrame.unit, 1) then
local id = self:GetID()
cache[id] = GetInventoryItemLink(InspectFrame.unit, id)
link = GetInventoryItemLink(InspectFrame.unit, id)
cache[id] = link
end
if oGlow then
if link then
local quality = select(3, GetItemInfo(link))
oGlow(self, quality)
if self.bc then
self.bc.Hide = nothing
if (type(quality) == "number" and quality > 1) or type(quality) == "string" then
self.bc:Show()
else
hide(self.bc)
end
end
elseif self.bc then
hide(self.bc)
end
end
end
 
InspectPaperDollItemSlotButton_OnEnter = function(self)
Snoopy/Snoopy.toc
3,6 → 3,6
## Notes: Easy inspecting
## Author: TotalPackage
## X-Category: Interface Enhancements
## Version: 3.0.004
## Version: 3.0.005
 
core.lua