/trunk
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 |
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") |
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() |
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 |
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) |
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) |
## Notes: Easy inspecting |
## Author: TotalPackage |
## X-Category: Interface Enhancements |
## Version: 3.0.004 |
## Version: 3.0.005 |
core.lua |