|
|
|
@ -1,8 +1,13 @@ |
|
|
|
|
local Tinkr, Bastion = ... |
|
|
|
|
|
|
|
|
|
---@class MythicPlusUtils |
|
|
|
|
local MythicPlusUtils = { |
|
|
|
|
debuffLogging = false, |
|
|
|
|
random = '' |
|
|
|
|
castLogging = false, |
|
|
|
|
random = '', |
|
|
|
|
loggedCasts = {}, |
|
|
|
|
loggedDebuffs = {}, |
|
|
|
|
kickList = {}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MythicPlusUtils.__index = MythicPlusUtils |
|
|
|
@ -12,117 +17,71 @@ function MythicPlusUtils:New() |
|
|
|
|
|
|
|
|
|
self.random = math.random(1000000, 9999999) |
|
|
|
|
self.kickList = { |
|
|
|
|
|
|
|
|
|
-- Algeth'ar Academy |
|
|
|
|
[388392] = true, -- Monotonous Lecture |
|
|
|
|
[396812] = true, -- Mystic Blast |
|
|
|
|
[377389] = true, -- Call of the Flock |
|
|
|
|
[396640] = true, -- Healing Touch |
|
|
|
|
[387843] = true, -- Astral Bomb |
|
|
|
|
[387955] = true, -- Celestial Shield |
|
|
|
|
[387910] = true, -- Astral Whirlwind |
|
|
|
|
|
|
|
|
|
-- Azure Vault |
|
|
|
|
-- [375602] = true, -- Erratic Growth |
|
|
|
|
[387564] = true, -- Mystic Vapors |
|
|
|
|
-- [386546] = true, -- Waking Bane |
|
|
|
|
[389804] = true, -- Heavy Tome |
|
|
|
|
[377488] = true, -- Icy Bindings |
|
|
|
|
|
|
|
|
|
-- Brackenhide |
|
|
|
|
[382249] = true, -- Earth Bolt |
|
|
|
|
[367500] = true, -- Hideous Cackle |
|
|
|
|
[377950] = true, -- Greater Healing Rapids |
|
|
|
|
[385029] = true, -- Screech |
|
|
|
|
[373804] = true, -- Touch of Decay |
|
|
|
|
[381770] = true, -- Gushing Ooze |
|
|
|
|
[374544] = true, -- Burst of Decay |
|
|
|
|
|
|
|
|
|
-- Halls of Infusion |
|
|
|
|
[374066] = true, -- Earth Shield |
|
|
|
|
[374339] = true, -- Demoralizing Shout |
|
|
|
|
[374045] = true, -- Expulse |
|
|
|
|
[374080] = true, -- Blasting Gust |
|
|
|
|
[389443] = true, -- Purifying Blast |
|
|
|
|
[395694] = true, -- Elemental Focus |
|
|
|
|
[374563] = true, -- Dazzle |
|
|
|
|
[385141] = true, -- Thunderstorm |
|
|
|
|
[374706] = true, -- Pyretic Burst |
|
|
|
|
[375384] = true, -- Rumbling Earth |
|
|
|
|
[375950] = true, -- Ice Shards |
|
|
|
|
[377348] = true, -- Tidal Divergence |
|
|
|
|
[377402] = true, -- Aqueous Barrier |
|
|
|
|
[387618] = true, -- Infuse |
|
|
|
|
|
|
|
|
|
-- Neltharus |
|
|
|
|
[378282] = true, -- Molten Core |
|
|
|
|
[372615] = true, -- Ember Reach |
|
|
|
|
[395427] = true, -- Burning Roar |
|
|
|
|
[372538] = true, -- Melt |
|
|
|
|
[384161] = true, -- Mote of Combustion |
|
|
|
|
[382795] = true, -- Molten Barrier |
|
|
|
|
|
|
|
|
|
-- Nokhud |
|
|
|
|
[384365] = true, -- Disruptive Shout |
|
|
|
|
[386024] = true, -- Tempest |
|
|
|
|
[387411] = true, -- Death Bolt Volley |
|
|
|
|
[387606] = true, -- Dominate |
|
|
|
|
[376725] = true, -- Storm Bolt |
|
|
|
|
[384808] = true, -- Guardian Wind |
|
|
|
|
[383823] = true, -- Rally the Clan (CC to interrupt) |
|
|
|
|
[387135] = true, -- Arcing Strike (CC to interrupt) |
|
|
|
|
[373395] = true, -- Bloodcurdling Shout |
|
|
|
|
|
|
|
|
|
-- Ruby Life Pools |
|
|
|
|
[373017] = true, -- Roaring Blaze |
|
|
|
|
[392398] = true, -- Crackling Detonation |
|
|
|
|
[392451] = true, -- Flashfire |
|
|
|
|
[385310] = true, -- Lightning Bolt |
|
|
|
|
[375602] = true, -- Erratic Growth |
|
|
|
|
-- [386546] = true, -- Waking Bane |
|
|
|
|
-- [387564] = true, -- Mystic Vapors |
|
|
|
|
[373932] = true, -- Illusionary Bolt |
|
|
|
|
[386546] = true, -- Waking Bane |
|
|
|
|
|
|
|
|
|
-- Uldaman |
|
|
|
|
[369675] = true, -- Chain Lightning |
|
|
|
|
[369674] = true, -- Stone Spike |
|
|
|
|
[369823] = true, -- Spiked Carapace |
|
|
|
|
[369603] = true, -- Defensive Bulwark |
|
|
|
|
[369399] = true, -- Stone Bolt |
|
|
|
|
[369400] = true, -- Earthen Ward |
|
|
|
|
[396812] = true, -- https://www.wowhead.com/spell=396812/mystic-blast |
|
|
|
|
[388392] = true, -- https://www.wowhead.com/spell=388392/monotonous-lecture |
|
|
|
|
[388863] = true, -- https://www.wowhead.com/spell=388863/mana-void |
|
|
|
|
[388862] = true, -- https://www.wowhead.com/spell=388862/surge |
|
|
|
|
[377389] = true, -- https://www.wowhead.com/spell=377389/call-of-the-flock |
|
|
|
|
[388623] = true, -- https://www.wowhead.com/spell=388623/branch-out |
|
|
|
|
[396640] = true, -- https://www.wowhead.com/spell=396640/healing-touch |
|
|
|
|
[387975] = true, -- https://www.wowhead.com/spell=387975/arcane-missiles |
|
|
|
|
[387843] = true, -- https://www.wowhead.com/spell=387843/astral-bomb |
|
|
|
|
|
|
|
|
|
-- Court of Stars |
|
|
|
|
[211401] = true, -- Drifting Embers |
|
|
|
|
[211464] = true, -- Fel Detonation |
|
|
|
|
[207980] = true, -- Disintegration Beam |
|
|
|
|
[208165] = true, -- Withering Soul |
|
|
|
|
[207881] = true, -- Infernal Eruption |
|
|
|
|
[211401] = true, -- https://wowhead.com/spell=211401 |
|
|
|
|
[207980] = true, -- https://wowhead.com/spell=207980 |
|
|
|
|
[208165] = true, -- https://wowhead.com/spell=208165 |
|
|
|
|
[207881] = true, -- https://wowhead.com/spell=207881 |
|
|
|
|
[209413] = true, -- https://wowhead.com/spell=209413 |
|
|
|
|
|
|
|
|
|
-- Halls of Valor |
|
|
|
|
[198595] = true, -- Thunderous Bolt |
|
|
|
|
[198959] = true, -- Etch |
|
|
|
|
[192288] = true, -- Searing Light |
|
|
|
|
[199726] = true, -- Unruly Yell |
|
|
|
|
[198750] = true, -- Surge |
|
|
|
|
[198595] = true, -- https://wowhead.com/spell=198595 |
|
|
|
|
[198959] = true, -- https://wowhead.com/spell=198959 |
|
|
|
|
[215433] = true, -- https://wowhead.com/spell=215433 |
|
|
|
|
[192288] = true, -- https://wowhead.com/spell=192288 |
|
|
|
|
[199726] = true, -- https://wowhead.com/spell=199726 |
|
|
|
|
[198750] = true, -- https://wowhead.com/spell=198750 |
|
|
|
|
|
|
|
|
|
-- Ruby Life Pools |
|
|
|
|
[372749] = true, -- https://wowhead.com/spell=372749 |
|
|
|
|
[373803] = true, -- https://wowhead.com/spell=373803 |
|
|
|
|
[373017] = true, -- https://wowhead.com/spell=373017 |
|
|
|
|
[392398] = true, -- https://wowhead.com/spell=392398 |
|
|
|
|
[392451] = true, -- https://wowhead.com/spell=392451 |
|
|
|
|
[385310] = true, -- https://wowhead.com/spell=385310 |
|
|
|
|
|
|
|
|
|
-- Shadowmoon Burial Grounds |
|
|
|
|
[152818] = true, -- Shadow Mend |
|
|
|
|
[153153] = true, -- Dark Communion (CC to interrupt) |
|
|
|
|
[156776] = true, -- Rending Voidlash |
|
|
|
|
[156722] = true, -- Void Bolt |
|
|
|
|
[398206] = true, -- Death Blast |
|
|
|
|
[156718] = true, -- Necrotic Burst |
|
|
|
|
[153524] = true, -- Plague Spit |
|
|
|
|
[152818] = true, -- https://wowhead.com/spell=152818 |
|
|
|
|
[156776] = true, -- https://wowhead.com/spell=156776 |
|
|
|
|
[156722] = true, -- https://wowhead.com/spell=156722 |
|
|
|
|
[398206] = true, -- https://wowhead.com/spell=398206 |
|
|
|
|
[153524] = true, -- https://wowhead.com/spell=153524 |
|
|
|
|
[156718] = true, -- https://wowhead.com/spell=156718 |
|
|
|
|
|
|
|
|
|
-- Temple of the Jade Serpent |
|
|
|
|
[397888] = true, -- Hydrolance |
|
|
|
|
[114646] = true, -- Haunting Gaze |
|
|
|
|
[395859] = true, -- Haunting Scream |
|
|
|
|
[396073] = true, -- Cat Nap |
|
|
|
|
[397914] = true, -- Defiling Mist |
|
|
|
|
|
|
|
|
|
[315584] = true |
|
|
|
|
[397888] = true, -- https://wowhead.com/spell=397888 |
|
|
|
|
[395859] = true, -- https://wowhead.com/spell=395859 |
|
|
|
|
[396073] = true, -- https://wowhead.com/spell=396073 |
|
|
|
|
[397914] = true, -- https://wowhead.com/spell=397914 |
|
|
|
|
|
|
|
|
|
-- The Azure Vault |
|
|
|
|
[375602] = true, -- https://wowhead.com/spell=375602 |
|
|
|
|
[387564] = true, -- https://wowhead.com/spell=387564 |
|
|
|
|
[373932] = true, -- https://wowhead.com/spell=373932 |
|
|
|
|
[386546] = true, -- https://wowhead.com/spell=386546 |
|
|
|
|
[389804] = true, -- https://wowhead.com/spell=389804 |
|
|
|
|
[377488] = true, -- https://wowhead.com/spell=377488 |
|
|
|
|
[377503] = true, -- https://wowhead.com/spell=377503 |
|
|
|
|
|
|
|
|
|
-- NO |
|
|
|
|
[384365] = true, -- https://wowhead.com/spell=384365 |
|
|
|
|
[386012] = true, -- https://wowhead.com/spell=386012 |
|
|
|
|
[386024] = true, -- https://wowhead.com/spell=386024 |
|
|
|
|
[387411] = true, -- https://wowhead.com/spell=387411 |
|
|
|
|
[387606] = true, -- https://wowhead.com/spell=387606 |
|
|
|
|
[373395] = true, -- https://wowhead.com/spell=373395 |
|
|
|
|
[376725] = true, -- https://wowhead.com/spell=376725 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Bastion.EventManager:RegisterWoWEvent('UNIT_AURA', function(unit, auras) |
|
|
|
@ -136,7 +95,8 @@ function MythicPlusUtils:New() |
|
|
|
|
if #addedAuras > 0 then |
|
|
|
|
for i = 1, #addedAuras do |
|
|
|
|
local aura = Bastion.Aura:CreateFromUnitAuraInfo(addedAuras[i]) |
|
|
|
|
if not aura:IsBuff() then |
|
|
|
|
|
|
|
|
|
if not self.loggedDebuffs[aura:GetSpell():GetID()] and not aura:IsBuff() then |
|
|
|
|
WriteFile('bastion-MPlusDebuffs-' .. self.random .. '.lua', [[ |
|
|
|
|
AuraName: ]] .. aura:GetName() .. [[ |
|
|
|
|
AuraID: ]] .. aura:GetSpell():GetID() .. "\n" .. [[ |
|
|
|
@ -147,6 +107,44 @@ function MythicPlusUtils:New() |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
Bastion.EventManager:RegisterWoWEvent('UNIT_SPELLCAST_START', function(unitTarget, castGUID, spellID) |
|
|
|
|
if not self.castLogging then |
|
|
|
|
return |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if self.loggedCasts[spellID] then |
|
|
|
|
return |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local name = GetSpellInfo(spellID) |
|
|
|
|
|
|
|
|
|
self.loggedCasts[spellID] = true |
|
|
|
|
|
|
|
|
|
WriteFile('bastion-MPlusCasts-' .. self.random .. '.lua', [[ |
|
|
|
|
CastName: ]] .. name .. [[ |
|
|
|
|
CastID: ]] .. spellID .. "\n" .. [[ |
|
|
|
|
]], true) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
Bastion.EventManager:RegisterWoWEvent('UNIT_SPELLCAST_CHANNEL_START', function(unitTarget, castGUID, spellID) |
|
|
|
|
if not self.castLogging then |
|
|
|
|
return |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if self.loggedCasts[spellID] then |
|
|
|
|
return |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local name = GetSpellInfo(spellID) |
|
|
|
|
|
|
|
|
|
self.loggedCasts[spellID] = true |
|
|
|
|
|
|
|
|
|
WriteFile('bastion-MPlusCasts-' .. self.random .. '.lua', [[ |
|
|
|
|
CastName: ]] .. name .. [[ |
|
|
|
|
CastID: ]] .. spellID .. "\n" .. [[ |
|
|
|
|
]], true) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
return self |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -154,6 +152,10 @@ function MythicPlusUtils:ToggleDebuffLogging() |
|
|
|
|
self.debuffLogging = not self.debuffLogging |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function MythicPlusUtils:ToggleCastLogging() |
|
|
|
|
self.castLogging = not self.castLogging |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function MythicPlusUtils:CastingCriticalKick(unit, percent) |
|
|
|
|
local castingSpell = unit:GetCastingOrChannelingSpell() |
|
|
|
|
|
|
|
|
|