Advertisement
abjoco

Garrosh BigWigs

Aug 11th, 2019
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.51 KB | None | 0 0
  1. function mod:UNIT_SPELLCAST_SUCCEEDED(unitId, spellName, _, _, spellId)
  2.         if spellId == 145235 then -- throw axe at heart , transition into first intermission
  3.             if phase == 1 then
  4.                 self:Bar(-8305, 25, CL.intermission, "SPELL_HOLY_PRAYEROFSHADOWPROTECTION")
  5.                 self:CancelTimer(waveTimer)
  6.                 waveTimer = nil
  7.                 self:StopBar(-8292) -- Kor'kron Warbringer aka add waves
  8.                 self:StopBar(-8298) -- Siege Engineer
  9.                 self:StopBar(-8294) -- Farseer
  10.                 self:StopBar(144758) -- Desecrate
  11.                 self:StopBar(144821) -- Warsong
  12.                 self:UnregisterEvent("UPDATE_MOUSEOVER_UNIT")
  13.             end
  14.         elseif spellId == 144866 then -- Enter Realm of Y'Shaarj -- actually being pulled
  15.             self:StopBar(144758) -- Desecrate
  16.             self:StopBar(67229) -- Mind Control
  17.             self:StopBar(CL.count:format(self:SpellName(144985), whirlingCounter)) -- Whirling Corruption
  18.             self:Message(-8305, "Neutral", nil, CL.intermission, "SPELL_HOLY_PRAYEROFSHADOWPROTECTION")
  19.             self:Bar(-8305, 210, CL.intermission, "SPELL_HOLY_PRAYEROFSHADOWPROTECTION")
  20.             self:Bar(-8305, 62, CL.over:format(CL.intermission), "SPELL_HOLY_PRAYEROFSHADOWPROTECTION")
  21.             whirlingCounter = 1
  22.             annihilateCounter = 1
  23.             hopeTimer = false
  24.         elseif spellId == 144956 then -- Jump To Ground -- exiting intermission
  25.             if phase == 2 then
  26.                 if hopeTimer then self:CancelTimer(hopeTimer) end
  27.                 desecrateCounter = 1
  28.                 self:Bar(144758, 10) -- Desecrate
  29.                 self:Bar(145065, 15, 67229, 145065) -- Mind Control
  30.                 self:Bar(144985, 30, CL.count:format(self:SpellName(144985), whirlingCounter)) -- Whirling Corruption
  31.                 self:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", nil, "boss1", "boss2", "boss3")
  32.                 -- warn for empowered abilities
  33.                 local power = UnitPower("boss1")
  34.                 while power >= warnPower do -- can he hit 100 energy before p3? that would be some shenanigans
  35.                     self:DelayedMessage("stages", 2, "Attention", L.empowered_message:format(abilities[warnPower]), false, "Info")
  36.                     warnPower = warnPower + 25
  37.                 end
  38.             else -- first time, don't start timers yet
  39.                 phase = 2
  40.                 warnPower = 25
  41.             end
  42.         elseif spellId == 145647 then -- Realm of Y'Shaarj -- phase 3
  43.             phase = 3
  44.             mcCounter = 1
  45.             desecrateCounter = 1
  46.             self:Message("stages", "Neutral", nil, CL.phase:format(phase), false)
  47.             self:StopBar(CL.intermission)
  48.             self:Bar(144985, 48, CL.count:format(self:SpellName(144985), whirlingCounter)) -- Whirling Corruption
  49.             if self:Heroic() then
  50.                 -- XXX lets try to improve this, because it looks like if it is not cast within 32 sec, then it is going to be closer to 40 than to 30 need more Transcriptor log
  51.                 mindControl = nil
  52.                 self:ScheduleTimer(mindControlMagic, 32, 145065)
  53.                 self:Bar(145065, 31, 67229, 145065) -- Mind Control
  54.             else
  55.                 self:Bar(145065, 29, 67229, 145065) -- Mind Control
  56.             end
  57.             self:CDBar(144758, 21) -- Desecrate -- on heroic 21-23
  58.         elseif spellId == 146984 then -- phase 4 Enter Realm of Garrosh
  59.             phase = 4
  60.             self:Message("stages", "Neutral", nil, CL.phase:format(phase), false)
  61.             self:StopBar(CL.intermission)
  62.             self:StopBar(CL.count:format(self:SpellName(144985), whirlingCounter)) -- Whirling Corruption
  63.             self:StopBar(144758) -- Desecrate
  64.             self:StopBar(67229) -- Mind Control
  65.             self:Bar(147209, 30, CL.count:format(self:SpellName(147209), 1)) -- Malice
  66.             self:Bar("bombardment", 69, CL.count:format(L.bombardment, 1), 147120) -- Bombardment
  67.             self:RegisterUnitEvent("UNIT_POWER_FREQUENT", nil, "boss1")
  68.         elseif spellId == 147126 then -- Clump Check
  69.             self:Bar("clump_check", 3, spellName, spellId)
  70.         end
  71.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement