WoWInterface SVN Snoopy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 12 to Rev 13
    Reverse comparison

Rev 12 → Rev 13

Snoopy/core.lua
51,10 → 51,10
function UpdateUnit(unit) -- update unit
if not UnitIsPlayer(unit) then return end
InspectFrame.unit = unit
ShowUIPanel(InspectFrame)
NotifyInspect(unit)
InspectNameText:SetText(UnitPVPName(unit))
UpdateTitleText(unit, true)
ShowUIPanel(InspectFrame)
NotifyInspect(unit)
UpdateAllData()
if not UnitCanAttack("player", unit) then
UpdateNote(not CheckInteractDistance(unit, 1) and "Out of Inspect Range", 0.25)
62,25 → 62,35
UpdateNote("Cannot Inspect PVP Enemy", 2)
end
end
local talenttext = { }
function UpdateTitleText(unit, reset)
local gname, gtitle = GetGuildInfo(unit)
local talenttext = ""
if not reset and GetNumTalentTabs() > 0 then
wipe(talenttext)
for i = 1, 3, 1 do
local name, _, pts = GetTalentTabInfo(i, true)
if not name then return end
tinsert(talenttext, pts.." "..strsub(name, 1, 3))
local ctalent = GetActiveTalentGroup(true)
for j = 1, GetNumTalentGroups(true), 1 do
for i = 1, 3, 1 do
local name, _, pts = GetTalentTabInfo(i, true, false, j)
if not name then return end
if i == 1 then
if j > 1 then
talenttext = format("%s - ", talenttext)
end
if ctalent == j then
talenttext = format("%s|cffffff00", talenttext)
end
end
talenttext = format("%s%s%d %s%s", talenttext, i == 1 and "" or " / ", pts, strsub(name, 1, 3), (ctalent == 1 and i == 3 and "|r") or "")
end
end
else
tinsert(talenttext, "-")
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, talenttext)
else
InspectTitleText:SetFormattedText("-\n%s", table.concat(talenttext, " / "))
InspectTitleText:SetFormattedText("-\n%s", talenttext)
end
wipe(talenttext)
InspectNameText:SetText(UnitPVPName(unit))
end
 
InspectFrame_Show = function(unit)
174,7 → 184,7
InspectTitleText:Show()
InspectTitleText:SetText("")
text = InspectFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
text:SetPoint("TOP", InspectFrame, "TOP", 0, -1)
text:SetPoint("TOP", InspectFrame, "TOP", 0, -2)
text:SetAlpha(0.8)
 
a:SetScript("OnUpdate", function(this, a1)
Snoopy/Snoopy.toc
3,7 → 3,7
## Notes: Easy inspecting
## Author: TotalPackage
## X-Category: Interface Enhancements
## Version: 3.1.001
## Version: 3.1.002
 
## LoadManagers: AddonLoader
## X-LoadOn-Always: delayed