vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | IMBA_GROBBULUS_SLIMESPRAY_MSG = "Grobbulus ?'s Slime Spray" |
2 | IMBA_GROBBULUS_SLIMESPRAY_TIME = 30; |
||
3 | |||
4 | IMBA_GROBBULUS_POISONCLOUD_MSG = "Grobbulus casts Poison Cloud." |
||
5 | IMBA_GROBBULUS_POISONCLOUD_TIME = 15; |
||
6 | |||
7 | IMBA_GROBBULUS_INJECTION_MSG = "^([^%s]+) ([^%s]+) afflicted by Mutating Injection" |
||
8 | IMBA_GROBBULUS_INJECTION_MSGR = "Mutating Injection fades from ([^%s]+)[.]" |
||
9 | |||
10 | if (GetLocale()=="frFR") then |
||
11 | --Translation by A.su.K.A |
||
12 | IMBA_GROBBULUS_POISONCLOUD_MSG = "Grobbulus lance Nuage de poison." |
||
13 | |||
14 | IMBA_GROBBULUS_INJECTION_MSG = "^([^%s]+) ([^%s]+) les effets de Injection mutante." |
||
15 | IMBA_GROBBULUS_INJECTION_MSGR = "Injection mutante sur ([^%s]+)[.] vient de se dissiper." |
||
16 | end |
||
17 | |||
18 | function IMBA_Grobbulus_RegenActivator() |
||
19 | IMBA_Grobbulus:Show(); |
||
20 | end |
||
21 | |||
22 | function IMBA_Grobbulus_RegisterEvents() |
||
23 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"); |
||
24 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE"); |
||
25 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"); |
||
26 | |||
27 | this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE"); |
||
28 | this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE"); |
||
29 | this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE"); |
||
30 | |||
31 | this:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF"); |
||
32 | |||
33 | this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER"); |
||
34 | this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_PARTY"); |
||
35 | this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF"); |
||
36 | end |
||
37 | |||
38 | function IMBA_Grobbulus_UnregisterEvents() |
||
39 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"); |
||
40 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE"); |
||
41 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE"); |
||
42 | |||
43 | this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE"); |
||
44 | this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE"); |
||
45 | this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE"); |
||
46 | |||
47 | this:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF"); |
||
48 | |||
49 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER"); |
||
50 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_PARTY"); |
||
51 | this:UnregisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF"); |
||
52 | end |
||
53 | |||
54 | function IMBA_Grobbulus_OnLoad() |
||
55 | this:SetBackdropBorderColor(1, 1, 1, 1); |
||
56 | this:SetBackdropColor(0.0,0.0,0.0,0.6); |
||
57 | |||
58 | |||
59 | IMBA_Grobbulus_Title:SetText("Grobbulus Timers"); |
||
60 | |||
61 | IMBA_Grobbulus_TimerPoisonCloud:SetBarText("Poison Cloud"); |
||
62 | IMBA_Grobbulus_TimerSlimeSpray:SetBarText("Slime Spray"); |
||
63 | |||
64 | |||
65 | IMBA_AddAddon("Grobbulus", "Timer for Poison Cloud, Slime Spray, and announce/marking of injection", IMBA_LOCATIONS_NAXX_ABOM, "IMBA_Grobbulus_RegenActivator", nil,nil,"IMBA_Grobbulus"); |
||
66 | IMBA_AddOption2("Grobbulus","AnnounceInjection","Announce Mutating Injection"); |
||
67 | IMBA_AddOption2("Grobbulus","MarkInjection","Mark Mutating Injectee"); |
||
68 | end |
||
69 | |||
70 | |||
71 | |||
72 | function IMBA_Grobbulus_OnEvent(event) |
||
73 | 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 |
||
74 | if string.find(arg1,IMBA_GROBBULUS_SLIMESPRAY_MSG) then |
||
75 | IMBA_Grobbulus_TimerSlimeSpray:StartTimer(IMBA_GROBBULUS_SLIMESPRAY_TIME) |
||
76 | end |
||
77 | elseif event=="CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF" then |
||
78 | if string.find(arg1,IMBA_GROBBULUS_POISONCLOUD_MSG) then |
||
79 | IMBA_Grobbulus_TimerPoisonCloud:StartTimer(IMBA_GROBBULUS_POISONCLOUD_TIME) |
||
80 | end |
||
81 | elseif (event == "CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE") or (event == "CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE") or (event == "CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE") then |
||
82 | local iStart, iEnd, sPlayer, sType = string.find(arg1, IMBA_GROBBULUS_INJECTION_MSG); |
||
83 | if ( sPlayer and sType ) then |
||
84 | if ( sPlayer == "You" and sType == "are" ) then |
||
85 | IMBA_RangeChecker_Active=true; |
||
86 | IMBA_AddRaidAlert("** "..UnitName("player").." is Injected **",IMBA_CheckVar("Grobbulus","AnnounceInjection"),true); |
||
87 | if IMBA_CheckVar("Grobbulus","MarkInjection") then |
||
88 | SetRaidTarget("player",8); |
||
89 | end |
||
90 | |||
91 | else |
||
92 | if IsRaidLeader() or IsRaidOfficer() then |
||
93 | SendChatMessage("You've been injected!", "WHISPER", nil, sPlayer); |
||
94 | end |
||
95 | |||
96 | IMBA_AddRaidAlert("** "..sPlayer.." is Injected **",IMBA_CheckVar("Grobbulus","AnnounceInjection"),IMBA_CheckVar("Grobbulus","AnnounceInjection")); |
||
97 | if IMBA_CheckVar("Grobbulus","MarkInjection") then |
||
98 | local markUnit=IMBA_FindPlayerUnitByName(sPlayer) |
||
99 | if UnitExists(markUnit) then |
||
100 | SetRaidTarget(markUnit,8); |
||
101 | end |
||
102 | end |
||
103 | end |
||
104 | return; |
||
105 | end |
||
106 | elseif IMBA_CheckVar("Grobbulus","MarkInjection") and ((event == "CHAT_MSG_SPELL_AURA_GONE_OTHER") or (event == "CHAT_MSG_SPELL_AURA_GONE_SELF") or (event == "CHAT_MSG_SPELL_AURA_GONE_PARTY")) then |
||
107 | local iStart, iEnd, sPlayer = string.find(arg1, IMBA_GROBBULUS_INJECTION_MSGR); |
||
108 | if ( sPlayer ) then |
||
109 | if ( sPlayer == "you" ) then |
||
110 | SetRaidTarget("player",0); |
||
111 | else |
||
112 | local markUnit=IMBA_FindPlayerUnitByName(sPlayer) |
||
113 | if UnitExists(markUnit) then |
||
114 | SetRaidTarget(markUnit,0); |
||
115 | end |
||
116 | end |
||
117 | return; |
||
118 | end |
||
119 | end |
||
120 | end |