vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 IMBA_HUHU_NOXIOUSPOISON_MSG = "is afflicted by Noxious Poison."
2 IMBA_HUHU_NOXIOUSPOISON_TIME = 10;
3  
4 IMBA_HUHU_WYVERNSTING_MSG = "is afflicted by Wyvern Sting."
5 IMBA_HUHU_WYVERNSTING_TIME = 25;
6  
7 IMBA_HUHU_FRENZY_MSG = "goes into a frenzy!"
8 IMBA_HUHU_FRENZY_TIME = 10
9  
10 IMBA_HUHU_ENRAGE_MSG = "goes into a berserker rage!"
11  
12 function IMBA_Huhu_RegenActivator()
13 IMBA_Huhu:Show();
14 end
15  
16 function IMBA_Huhu_RegisterEvents()
17 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE");
18 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE");
19 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE");
20 this:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE");
21 this:RegisterEvent("CHAT_MSG_MONSTER_EMOTE");
22 end
23  
24 function IMBA_Huhu_UnregisterEvents()
25 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE");
26 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE");
27 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE");
28 this:UnregisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE");
29 this:UnregisterEvent("CHAT_MSG_MONSTER_EMOTE");
30 end
31  
32 function IMBA_Huhu_OnLoad()
33 this:SetBackdropBorderColor(1, 1, 1, 1);
34 this:SetBackdropColor(0.0,0.0,0.0,0.6);
35  
36  
37 IMBA_Huhu_Title:SetText("Huhuran Timers");
38  
39 IMBA_Huhu_TimerFrenzy:SetBarText("Frenzy");
40 IMBA_Huhu_TimerNoxiousPoison:SetBarText("Noxious Poison");
41 IMBA_Huhu_TimerWyvernSting:SetBarText("Wyvern Sting");
42  
43  
44 IMBA_AddAddon("Princess Huhuran", "Timers for Frenzy, Noxious Poison, and Wyvern Sting", IMBA_LOCATIONS_AQ40, "IMBA_Huhu_RegenActivator", nil,nil,"IMBA_Huhu");
45 IMBA_AddOption2("Princess Huhuran","AnnounceFrenzy","Announce Frenzy");
46 IMBA_AddOption2("Princess Huhuran","AnnounceEnrage","Announce Enrage");
47 end
48  
49  
50  
51 function IMBA_Huhu_OnEvent(event)
52 if string.find(event,"CHAT_MSG_SPELL_PERIODIC") then
53 if string.find(arg1,IMBA_HUHU_NOXIOUSPOISON_MSG) then
54 IMBA_Huhu_TimerNoxiousPoison:StartTimer(IMBA_HUHU_NOXIOUSPOISON_TIME,false);
55 elseif string.find(arg1,IMBA_HUHU_WYVERNSTING_MSG) then
56 IMBA_Huhu_TimerWyvernSting:StartTimer(IMBA_HUHU_WYVERNSTING_TIME,false);
57 end
58 elseif (event == "CHAT_MSG_MONSTER_EMOTE") then
59 if string.find(arg1,IMBA_HUHU_ENRAGE_MSG) then
60 IMBA_AddRaidAlert("** Princess Huhuran is Enraged **",IMBA_CheckVar("Princess Huhuran","AnnounceEnrage"),IMBA_CheckVar("Princess Huhuran","AnnounceEnrage"));
61 elseif string.find(arg1,IMBA_HUHU_FRENZY_MSG) then
62 IMBA_Huhu_TimerFrenzy:StartTimer(IMBA_HUHU_FRENZY_TIME);
63 IMBA_AddRaidAlert("** Princess Huhuran is Frenzied! Tranq Shot **",IMBA_CheckVar("Princess Huhuran","AnnounceFrenzy"),IMBA_CheckVar("Princess Huhuran","AnnounceFrenzy"));
64 end
65 end
66 end