Skip to content

Instantly share code, notes, and snippets.

@fubaWoW
Created February 16, 2025 03:38
Show Gist options
  • Save fubaWoW/61559bc2a723e9792ab3d6195d15a3fa to your computer and use it in GitHub Desktop.
Save fubaWoW/61559bc2a723e9792ab3d6195d15a3fa to your computer and use it in GitHub Desktop.
function (self, unitId, unitFrame, envTable, modTable)
-- Only proceed if the unit is an enemy
if unitFrame.ActorType ~= "friendlyplayer" and unitFrame.ActorType ~= "friendlynpc" then
envTable.spec = GetSpecialization()
-- Check if the class is not Warlock (class ID 9)
if envTable.class ~= 9 then
-- Assign kick ability based on class and specialization
envTable.kickId = modTable.kickIndex[envTable.class][envTable.spec]
else
-- Warlock logic for interrupt abilities
if envTable.spec == 1 or envTable.spec == 3 then -- Affliction or Destruction
if IsSpellKnown(19647, true) then -- Felhunter present
envTable.kickId = 119910 -- Spell Lock
else
-- Check for Grimoire of Sacrifice
local spellInfo = C_Spell.GetSpellInfo(108503) -- get SpellInfo for "108503" what is "Grimoire of Sacrifice"
local spellName = spellInfo and spellInfo.name -- get "localized" name for "Grimoire of Sacrifice"
if spellName then
local auraData = C_UnitAuras.GetAuraDataBySpellName("player", spellName)
-- Confirm the player has the "Grimoire of Sacrifice" buff
if auraData and auraData.isHelpful and auraData.sourceUnit == "player" then
envTable.kickId = 132409 -- Spell Lock
else
envTable.kickId = nil
end
end
end
elseif envTable.spec == 2 then -- Demonology
if IsSpellKnown(89766, true) then -- Felguard present
envTable.kickId = 119914
elseif IsSpellKnown(19647, true) then -- Felhunter present
envTable.kickId = 119910
else
envTable.kickId = nil
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment