vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | IMBA_Viscidus_GlobsLeft_Num =20 |
2 | IMBA_Viscidus_GlobsLeft_Num2 = 20; |
||
3 | IMBA_Viscidus_GlobDie_Msg = "Glob of Viscidus dies" |
||
4 | |||
5 | IMBA_Viscidus_PoisonVolley_Msg = "Viscidus's Poison Bolt Volley hits" |
||
6 | IMBA_Viscidus_PoisonVolley_Time = 10 |
||
7 | |||
8 | IMBA_Viscidus_Frozen = false |
||
9 | IMBA_Viscidus_Frozen_Msg = "is frozen solid!" |
||
10 | IMBA_Viscidus_Frozen_Time = 15 |
||
11 | |||
12 | function IMBA_Viscidus_RegenActivator() |
||
13 | IMBA_Viscidus_GlobsLeft_Num = 20; |
||
14 | IMBA_Viscidus_GlobsLeft_Num2 = 20; |
||
15 | IMBA_Viscidus_GlobsLeft:SetValText(20); |
||
16 | --SendAddonMessage("IMBA", "VARSYNC IMBA_Viscidus_GlobsLeft_Num 20 REPLACE","RAID"); |
||
17 | IMBA_Viscidus_ResetFrostHits() |
||
18 | |||
19 | IMBA_Viscidus_TimerPoisonVolley:SetBarText("Poison Volley"); |
||
20 | IMBA_Viscidus_TimerPoisonVolley:StartTimer(IMBA_Viscidus_PoisonVolley_Time,false,nil,5) |
||
21 | IMBA_Viscidus_TimerPoisonVolley.callback=nil; |
||
22 | |||
23 | IMBA_Viscidus:Show(); |
||
24 | end |
||
25 | |||
26 | function IMBA_Viscidus_ResetFrostHits() |
||
27 | IMBA_Viscidus_Frozen=false; |
||
28 | IMBA_Viscidus_CounterHits:SetBarText("Frost Hits Left"); |
||
29 | IMBA_Viscidus_CounterHits.maxNumber=200; |
||
30 | IMBA_Viscidus_CounterHits:SetNum(200); |
||
31 | IMBA_Viscidus_GlobsLeft_Num=IMBA_Viscidus_GlobsLeft_Num2; |
||
32 | end |
||
33 | |||
34 | function IMBA_Viscidus_ResetPhysicalHits() |
||
35 | IMBA_Viscidus_Frozen=true; |
||
36 | IMBA_Viscidus_CounterHits:SetBarText("Physical Hits Left"); |
||
37 | IMBA_Viscidus_CounterHits.maxNumber=150; |
||
38 | IMBA_Viscidus_CounterHits:SetNum(150); |
||
39 | end |
||
40 | |||
41 | function IMBA_Viscidus_RegisterEvents() |
||
42 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"); |
||
43 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE"); |
||
44 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"); |
||
45 | |||
46 | this:RegisterEvent("CHAT_MSG_MONSTER_EMOTE"); |
||
47 | |||
48 | this:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH"); |
||
49 | |||
50 | this:RegisterEvent("CHAT_MSG_COMBAT_SELF_HITS"); |
||
51 | this:RegisterEvent("CHAT_MSG_COMBAT_PARTY_HITS"); |
||
52 | this:RegisterEvent("CHAT_MSG_COMBAT_FRIENDLYPLAYER_HITS"); |
||
53 | this:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE"); |
||
54 | this:RegisterEvent("CHAT_MSG_SPELL_PARTY_DAMAGE"); |
||
55 | this:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_DAMAGE"); |
||
56 | |||
57 | end |
||
58 | |||
59 | function IMBA_Viscidus_UnregisterEvents() |
||
60 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"); |
||
61 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE"); |
||
62 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"); |
||
63 | |||
64 | this:UnregisterEvent("CHAT_MSG_MONSTER_EMOTE"); |
||
65 | |||
66 | this:UnregisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH"); |
||
67 | |||
68 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER"); |
||
69 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_PARTY"); |
||
70 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF"); |
||
71 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER"); |
||
72 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_PARTY"); |
||
73 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF"); |
||
74 | end |
||
75 | |||
76 | function IMBA_Viscidus_OnLoad() |
||
77 | this:SetBackdropBorderColor(1, 1, 1, 1); |
||
78 | this:SetBackdropColor(0.0,0.0,0.0,0.6); |
||
79 | |||
80 | |||
81 | IMBA_Viscidus_Title:SetText("Viscidus Status"); |
||
82 | |||
83 | IMBA_Viscidus_GlobsLeft:SetBarText("Globs Left"); |
||
84 | IMBA_Viscidus_GlobsLeft:SetValText(20); |
||
85 | IMBA_Viscidus_TimerPoisonVolley:SetBarText("Poison Volley"); |
||
86 | IMBA_Viscidus_CounterHits:SetBarText("Frost Hits Left"); |
||
87 | |||
88 | |||
89 | IMBA_AddAddon("Viscidus", "Timer for Poison Bolt Volley, Shatter, and counting of Frost/Physical Hits", IMBA_LOCATIONS_AQ40, "IMBA_Viscidus_RegenActivator", nil,nil,"IMBA_Viscidus"); |
||
90 | IMBA_AddSyncVar("Viscidus","IMBA_Viscidus_GlobsLeft_Num","MIN"); |
||
91 | end |
||
92 | |||
93 | |||
94 | |||
95 | function IMBA_Viscidus_OnEvent(event) |
||
96 | if ( event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE" or event == "CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE" or event == "CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE") then |
||
97 | if string.find(arg1,IMBA_Viscidus_PoisonVolley_Msg) then |
||
98 | IMBA_Viscidus_TimerPoisonVolley:SetBarText("Poison Volley"); |
||
99 | IMBA_Viscidus_TimerPoisonVolley:StartTimer(IMBA_Viscidus_PoisonVolley_Time) |
||
100 | IMBA_Viscidus_TimerPoisonVolley.callback=nil; |
||
101 | end |
||
102 | elseif event=="CHAT_MSG_MONSTER_EMOTE" then |
||
103 | if string.find(arg1,IMBA_Viscidus_Frozen_Msg) then |
||
104 | IMBA_Viscidus_TimerPoisonVolley:SetBarText("Thaws in"); |
||
105 | IMBA_Viscidus_TimerPoisonVolley:StartTimer(IMBA_Viscidus_Frozen_Time) |
||
106 | IMBA_Viscidus_TimerPoisonVolley.callback=IMBA_Viscidus_ResetFrostHits; |
||
107 | IMBA_Viscidus_ResetPhysicalHits(); |
||
108 | end |
||
109 | elseif event=="CHAT_MSG_COMBAT_HOSTILE_DEATH" then |
||
110 | if string.find(arg1,IMBA_Viscidus_GlobDie_Msg) then |
||
111 | IMBA_Viscidus_GlobsLeft_Num2=IMBA_Viscidus_GlobsLeft_Num2-1; |
||
112 | IMBA_Viscidus_GlobsLeft_Num=IMBA_Viscidus_GlobsLeft_Num2; |
||
113 | IMBA_Viscidus_GlobsLeft:SetValText(IMBA_Viscidus_GlobsLeft_Num2); |
||
114 | IMBA_Viscidus_ResetFrostHits() |
||
115 | end |
||
116 | else |
||
117 | if string.find(arg1,"Viscidus") and (not string.find(arg1,"Glob of")) and (string.find(arg1,"hit") or string.find(arg1,"crit")) then |
||
118 | if (not IMBA_Viscidus_Frozen) and string.find(arg1, "Frost") then |
||
119 | IMBA_Viscidus_CounterHits:Decrement(); |
||
120 | elseif IMBA_Viscidus_Frozen and not (string.find(arg1, "Arcane") or string.find(arg1, "Fire") or string.find(arg1, "Frost") or string.find(arg1, "Holy") or string.find(arg1, "Nature") or string.find(arg1, "Shadow")) then |
||
121 | IMBA_Viscidus_CounterHits:Decrement(); |
||
122 | end |
||
123 | end |
||
124 | end |
||
125 | end |