vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <Ui xmlns="http://www.blizzard.com/wow/ui/" |
2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
3 | xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd"> |
||
4 | <Frame name="StatRingsCasting" parent="UIParent" inherits="StatRingsRingTemplate"> |
||
5 | <Anchors> |
||
6 | <Anchor point="RIGHT" relativeTo="StatRingsMana"> |
||
7 | <Offset> |
||
8 | <AbsDimension x="15" y="0"/> |
||
9 | </Offset> |
||
10 | </Anchor> |
||
11 | </Anchors> |
||
12 | <Scripts> |
||
13 | <OnLoad> |
||
14 | StatRings_RegisterRing(this, "Casting"); |
||
15 | StatRingsRingTemplate_OnLoad(); |
||
16 | this:SetReversed(true); |
||
17 | |||
18 | this:SetAlpha(0.1); |
||
19 | |||
20 | this:RegisterEvent("PLAYER_ENTERING_WORLD"); |
||
21 | this:RegisterEvent("SPELLCAST_START"); |
||
22 | this:RegisterEvent("SPELLCAST_STOP"); |
||
23 | this:RegisterEvent("SPELLCAST_FAILED"); |
||
24 | this:RegisterEvent("SPELLCAST_INTERRUPTED"); |
||
25 | this:RegisterEvent("SPELLCAST_DELAYED"); |
||
26 | this:RegisterEvent("SPELLCAST_CHANNEL_START"); |
||
27 | this:RegisterEvent("SPELLCAST_CHANNEL_UPDATE"); |
||
28 | this:RegisterEvent("SPELLCAST_CHANNEL_STOP"); |
||
29 | |||
30 | this:SetMax(1); |
||
31 | this:SetValue(0); |
||
32 | |||
33 | function this:UpdateAlpha() |
||
34 | if this.startValue < this.maxValue then |
||
35 | StatRingsTest_SetAlpha(self, 0.4); |
||
36 | elseif this.startValue == this.maxValue then |
||
37 | StatRingsTest_SetAlpha(self, 0); |
||
38 | end |
||
39 | end |
||
40 | this:AddUpdateFunction(this.UpdateAlpha); |
||
41 | this.dirty = true; |
||
42 | </OnLoad> |
||
43 | <OnEvent> |
||
44 | if (event == "PLAYER_ENTERING_WORLD") then |
||
45 | this:UpdateColor({["r"] = 1, ["g"] = 1, ["b"] = 0}); |
||
46 | this:SetMax(1); |
||
47 | this:SetValue(0); |
||
48 | this.spellstart = GetTime(); |
||
49 | this.channeling = 0; |
||
50 | this.casting = 0; |
||
51 | return; |
||
52 | elseif event == "SPELLCAST_START" then |
||
53 | this:UpdateColor({["r"] = 1, ["g"] = 1, ["b"] = 0}); |
||
54 | Moog_HudCastTime:SetTextColor(1, 1, 0 ); |
||
55 | this:SetMax(arg2); |
||
56 | -- sr_pr("Spell " .. arg1 .. " : " .. (arg2 / 1000)); |
||
57 | this:SetValue(0); |
||
58 | this.casting = 1; |
||
59 | this.channeling = 0; |
||
60 | this.spellstart = GetTime(); |
||
61 | elseif event == "SPELLCAST_CHANNEL_START" then |
||
62 | this:UpdateColor({["r"] = 0, ["g"] = 1, ["b"] = 0}); |
||
63 | Moog_HudCastTime:SetTextColor(0, 1, 0 ); |
||
64 | this:SetMax(arg1); |
||
65 | -- sr_pr("Channelled Spell " .. arg2 .. " : " .. (arg1 / 1000)); |
||
66 | this:SetValue(arg1); |
||
67 | this.channeling = 1; |
||
68 | this.casting = 1; |
||
69 | this.spellstart = GetTime(); |
||
70 | elseif event == "SPELLCAST_CHANNEL_UPDATE" then |
||
71 | if arg1 == 0 then |
||
72 | this:SetValue(0); |
||
73 | this.casting = 0; |
||
74 | this.channeling = 0; |
||
75 | Moog_HudCastTime:SetText(""); |
||
76 | if (MoogHUDInfo.BlinkLongCast) then |
||
77 | Moog_SpellBlinkTime = GetTime(); end |
||
78 | -- sr_pr("Channelled Spell Aborted"); |
||
79 | else |
||
80 | this:SetValue(this.maxValue-arg1); |
||
81 | this.spellstart = GetTime() - (this.endValue/1000); |
||
82 | -- sr_pr("Channelled Spell remaining : " .. (arg1 / 1000)); |
||
83 | end |
||
84 | elseif event == "SPELLCAST_DELAYED" then |
||
85 | this:SetValue(this.startValue - arg1); |
||
86 | this.spellstart = this.spellstart + (arg1/1000); |
||
87 | -- sr_pr("Spell Delayed"); |
||
88 | elseif event == "SPELLCAST_STOP" or event == "SPELLCAST_CHANNEL_STOP" or event == "SPELLCAST_FAILED" or event == "SPELLCAST_INTERRUPTED" then |
||
89 | if this.channeling == nil then |
||
90 | this.channeling = 0; end |
||
91 | if ((this.channeling == 0) or (event == "SPELLCAST_CHANNEL_STOP")) then |
||
92 | if ((this.casting == 1) and (MoogHUDInfo.BlinkLongCast)) then |
||
93 | Moog_SpellBlinkTime = GetTime(); end |
||
94 | if ((this.casting == 0) and (MoogHUDInfo.BlinkInstaCast)) then |
||
95 | Moog_SpellBlinkTime = GetTime(); end |
||
96 | this:SetValue(0); |
||
97 | this.casting = 0; |
||
98 | Moog_HudCastTime:SetText(""); |
||
99 | end |
||
100 | -- sr_pr("Spell Aborted"); |
||
101 | end |
||
102 | </OnEvent> |
||
103 | </Scripts> |
||
104 | </Frame> |
||
105 | </Ui> |