/trunk
## Notes: Easy and lite inspecting |
## Author: TotalPackage |
## X-Category: Interface Enhancements |
## Version: 3.0.001 |
## Version: 3.0.002 |
core.lua |
local CheckInteractDistance, GetInventoryItemLink = CheckInteractDistance, GetInventoryItemLink |
local UnitExists, UnitIsPlayer, UnitCanAttack = UnitExists, UnitIsPlayer, UnitCanAttack |
local oInspectPaperDollFrame_OnShow, oInspectPaperDollItemSlotButton_Update |
local WOW3 = UnitAura and true |
local cache = { } |
local elap, schedule, text = 0, 0.25, nil |
InspectFrame_OnEvent = function(self, ev, a1) |
if not InspectFrame:IsShown() then return end |
ev = WOW3 and ev or self |
a1 = WOW3 and a1 or arg1 |
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) |
else -- empty slot |
GameTooltip:SetText((self.checkRelic and UnitHasRelicSlot(unit) and _G.RELICSLOT) or _G[strupper(name)]) |
end |
CursorUpdate() |
CursorUpdate(self) |
end |
oInspectPaperDollFrame_OnShow = InspectPaperDollFrame_OnShow |