vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | -- |
2 | -- GoodInspect increases inspect range and allows inspection of opposing faction members. |
||
3 | -- also adds guild info to inspect window a la your character sheet. |
||
4 | -- version 1.0.4 by usea - 2005 |
||
5 | -- |
||
6 | BINDING_NAME_GOODINSPECT = "Inspect Target"; |
||
7 | BINDING_HEADER_GOODINSPECT = "Good Inspect"; |
||
8 | |||
9 | function GoodInspect_OnLoad() |
||
10 | InspectFrame_LoadUI(); |
||
11 | InspectFrame_OnUpdate = GoodInspect_InspectFrame_OnUpdate; |
||
12 | |||
13 | InspectFrame_Show = GoodInspect_InspectFrame_Show; |
||
14 | |||
15 | -- stops the Inspect option in the unit dropdown menu from greying out |
||
16 | UnitPopupButtons["INSPECT"] = { text = TEXT(INSPECT), dist = 0 }; |
||
17 | end |
||
18 | |||
19 | -- allows inspection of opposing faction members (can't see equip) |
||
20 | function GoodInspect_InspectFrame_Show(unit) |
||
21 | HideUIPanel(InspectFrame); |
||
22 | if(UnitExists(unit) and UnitIsPlayer(unit)) then |
||
23 | NotifyInspect(unit); |
||
24 | InspectFrame.unit = unit; |
||
25 | ShowUIPanel(InspectFrame); |
||
26 | InspectNameText:SetWidth(300); |
||
27 | InspectNameText:SetText(UnitPVPName("target")); |
||
28 | local guildname = nil; |
||
29 | local guildtitle = nil; |
||
30 | local guildrank = nil; |
||
31 | guildname, guildtitle, guildrank = GetGuildInfo("target"); |
||
32 | if(guildname ~= nil and guildtitle ~= nil and guildrank ~= nil) then |
||
33 | InspectTitleText:SetText(format(TEXT(GUILD_TITLE_TEMPLATE), guildtitle, guildname)); |
||
34 | InspectTitleText:Show(); |
||
35 | else |
||
36 | InspectTitleText:Hide(); |
||
37 | end |
||
38 | end |
||
39 | end |
||
40 | |||
41 | function InspectBinding() |
||
42 | if(InspectFrame:IsVisible()) then |
||
43 | InspectFrame:Hide(); |
||
44 | else |
||
45 | InspectUnit("target"); |
||
46 | end |
||
47 | end |
||
48 | |||
49 | |||
50 | -- left empty to stop distance checking on inspect |
||
51 | function GoodInspect_InspectFrame_OnUpdate() |
||
52 | -- do nothing |
||
53 | end |