BigWigsRazuvious = AceAddon:new({
name = "BigWigsRazuvious",
cmd = AceChatCmd:new({}, {}),
zonename = "Naxx",
enabletrigger = GetLocale() == "koKR" and "Instructor Razuvious"
or "Instructor Razuvious",
loc = {
bossname = "Instructor Razuvious",
disabletrigger = "Instructor Razuvious dies.",
bosskill = "Razuvious has been defeated!",
startwarn = "Encounter started or Disrupting Shout!",
starttrigger1 = "Show them no mercy!",
starttrigger2 = "Sweep the leg... Do you have a problem with that?",
starttrigger3 = "You disappoint me, students!",
starttrigger4 = "You should have stayed home.",
starttirgger5 = "The time for practice is over! Show me what you have learned!",
shouttrigger = "lets loose a triumphant shout.",
shout10secwarn = "10 seconds until Disrupting Shout",
shout3secwarn = "3 seconds until Disrupting Shout",
shoutwarn = "Disrupting Shout",
shoutbar = "Disrupting Shout",
},
})
function BigWigsRazuvious:Initialize()
self.disabled = true
BigWigs:RegisterModule(self)
end
function BigWigsRazuvious:Enable()
self.disabled = nil
self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH")
self:RegisterEvent("CHAT_MSG_MONSTER_YELL")
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("CHAT_MSG_MONSTER_EMOTE")
end
function BigWigsRazuvious:Disable()
self.disabled = true
self:UnregisterAllEvents()
end
function BigWigsRazuvious:CHAT_MSG_COMBAT_HOSTILE_DEATH()
if (arg1 == self.loc.disabletrigger) then
self:TriggerEvent("BIGWIGS_MESSAGE", self.loc.bosskill, "Green")
self:Disable()
end
end
function BigWigsRazuvious:CHAT_MSG_MONSTER_EMOTE()
-- ace:print("emote: ["..arg1.."]")
--if (string.find(arg1, self.loc.shouttrigger)) then
if (arg2 == self.loc.bossname) then
self:TriggerEvent("BIGWIGS_MESSAGE", self.loc.shoutwarn, "Orange")
self:TriggerEvent("BIGWIGS_DELAYEDMESSAGE_START", self.loc.shout10secwarn, 15, "Yellow")
self:TriggerEvent("BIGWIGS_DELAYEDMESSAGE_START", self.loc.shout3secwarn, 22, "Yellow")
self:TriggerEvent("BIGWIGS_BAR_START", self.loc.shoutbar, 25, 1, "Yellow", "Interface\\Icons\\Ability_Ensnare")
end
end
function BigWigsRazuvious:CHAT_MSG_MONSTER_YELL()
if (arg1 == self.loc.starttrigger1 or arg1 == self.loc.starttrigger2 or arg1 == self.loc.starttrigger3 or arg1 == self.loc.starttrigger4 or arg1 == self.loc.starttrigger5) then
--if (arg2 == self.loc.bossname) then
self:TriggerEvent("BIGWIGS_MESSAGE", self.loc.startwarn, "Orange")
self:TriggerEvent("BIGWIGS_DELAYEDMESSAGE_START", self.loc.shout10secwarn, 15, "Yellow")
self:TriggerEvent("BIGWIGS_DELAYEDMESSAGE_START", self.loc.shout3secwarn, 22, "Yellow")
self:TriggerEvent("BIGWIGS_BAR_START", self.loc.shoutbar, 25, 1, "Yellow", "Interface\\Icons\\Ability_Ensnare")
end
end
--function BigWigsRazuvious:PLAYER_REGEN_DISABLED()
-- see if anyone's targetting the silly spider
--local foundboss = nil
--for i = 1,40 do
-- local unit = "raid"..i.."target"
-- if( UnitExists(unit) and
-- UnitName(unit) and not UnitIsCorpse(unit) and
-- not UnitIsDead(unit) and
-- UnitName(unit) == self.loc.bossname) then
-- foundboss = TRUE
-- end
--end
--if foundboss then
-- self:TriggerEvent("BIGWIGS_MESSAGE", self.loc.startwarn, "Orange")
--- self:TriggerEvent("BIGWIGS_DELAYEDMESSAGE_START", self.loc.shout7secwarn, 18, "Yellow")
-- self:TriggerEvent("BIGWIGS_BAR_START", self.loc.shoutbar, 25, 1, "Yellow", "Interface\\Icons\\Ability_Ensnare")
--end
--end
--------------------------------
-- Load this bitch! --
--------------------------------
BigWigsRazuvious:RegisterForLoad()