Code:
local immunitybuff = {
33786, -- Cyclone
710, -- Banish
19263, -- Deterrence
47585, -- Dispersion
642, -- Divine Shield
45438, -- Ice Block
45182, -- Cheating Death
105784, -- Alizabal(25)
105738, -- Alizabal(10)
105784, -- Alizabal(10)
104995, -- Alizabal(10)
109554, -- Hagara(25)
109562, -- Hagara(25)
109553, -- Hagara(10)
109561, -- Hagara(10)
105256, -- Hagara(10)
105409, -- Hagara(10)
109552, -- Hagara(RF)
109560, -- Hagara(RF)
82320, -- High Prophet Barim
100686, -- Echo of Sylvanas
97977 -- Zandalari Archon/Hierophant/Juggernaut
}
local magicimmune = {
48707, -- Anti-Magic Shell
31224, -- Cloak of Shadows
51052 -- Anti-Magic Zone
}
local physicalimmune = {
1022 -- Hand of Protection
}
local snared = {
45524, -- Chains of Ice
55666, -- Desecration
50040, -- Chillbains
50041, -- Chillbains
58179, -- Infected Wounds
61391, -- Typhoon
35101, -- Concussive Barrage
5116, -- Concussive Shot
54644, -- Frost Breath
11113, -- Blast Wave
6136, -- Chilled
120, -- Cone of Cold
116, -- Frostbolt
44614, -- Frostfire
31589, -- Slow
63529, -- Dazed - Avenger Shield
15407, -- Mind Flay
31125, -- Blade Twisting
3409, -- Crippling Poison
26679, -- Deadly Throw
3600, -- Earthbind
8056, -- Frost Shock
8034, -- Frostbrand Attack
18118, -- Aftermath
18223, -- Curse of Exhaustion
63311, -- Shadowsnare
1715, -- Hamstring
12323, -- Piercing Howl
29703, -- Dazed
46924, -- Bladestorm
54216 -- Master's Call
}
local healingreduction = {
12294, -- Mortal Strike
82654, -- Widow Venom
54680, -- Monstrous Bite
13219 -- Wound Poison
}
local immobilized = {
339, -- Entangling Roots
45334, -- Feral Charge Effect (Bear)
19306, -- Counterattack
19184, -- Entrapment
19185, -- Entrapment
50245, -- Pin
54706, -- Venom Web Spray
4167, -- Web
33395, -- Freeze
122, -- Frost Nova
83302, -- Improved Cone of Cold
55080, -- Shattered Barried
87194, -- Paralysis
64695, -- Earthgrab
63685, -- Freeze
93986, -- Aura of Foreboding
23694, -- Improved Hamstring
39965, -- Frost Grenade
55536, -- Frostweave Net
13099, -- Net-o-Matic
46924, -- Bladestorm
54216 -- Master's Call
}
local stunned = {
47481, -- Gnaw
5211, -- Bash
22570, -- Maim
9005, -- Pounce
24394, -- Intimidation
91797, -- Monstrous Blow
50519, -- Sonic Blast
44572, -- Deep Freeze
12355, -- Impact
83047, -- Improved Polymorph
853, -- Hammer of Justice
1833, -- Cheap Shot
408, -- Kidney Shot
39796, -- Stoneclaw Stun
89766, -- Axe Toss
54786, -- Demon Leap
30283, -- Shadowfury
93974, -- Aura of Foreboding
7922, -- Charge Stun
12809, -- Concussion Blow
20253, -- Intercept
46968, -- Shockwave
85388, -- Throwdown
56, -- Stun
20549 -- War Stomp
}
function F_isimmune(unit)
for i=1,#immunitybuff do
if UnitAura(unit,GetSpellInfo(immunitybuff[i])) then return true end
end
return false
end
function F_ismagicimmune(unit)
for i=1,#magicimmune do
if UnitAura(unit,GetSpellInfo(magicimmune[i])) then return true end
end
return false
end
function F_isphysicalimmune(unit)
for i=1,#physicalimmune do
if UnitAura(unit,GetSpellInfo(physicalimmune[i])) then return true end
end
return false
end
function F_issnared(unit)
for i=1,#snared do
if UnitAura(unit,GetSpellInfo(snared[i])) then return true end
end
return false
end
function F_ishardtoheal(unit)
for i=1,#healingreduction do
if UnitDebuffID(unit,healingreduction[i]) then return true end
end
return false
end
function F_isrooted(unit)
for i=1,#immobilized do
if UnitAura(unit,GetSpellInfo(immobilized[i])) then return true end
end
return false
end
function F_isstunned(unit)
for i=1,#stunned do
if UnitAura(unit,GetSpellInfo(stunned[i])) then return true end
end
return false
end
--local slows = {
-- 102355, --Faerie Swarm
-- 339, --Roots
-- 58180, --Infected Wounds
-- 12323, --Piercing Howl
-- 1715, --Hamstring
-- 5116, --Concussive Shot
-- 110300, --Judgement talent Debuff
-- 118223, --Curse of Exhaustion
-- 120, --Cone of Cold
-- 31589, --Mage Slow
-- 8056, --Frost Shock
-- 116947, --Earthbind totem
-- 50435, --Chillbanes
-- 45524, --Chains of Ice
-- 3409 --Crippling Poison
--}
--local snares = {
-- 122, --Frost Nova
-- 102051, --Frostjaw
-- 116, --Frostbolt Slow
-- 33395, --Water Elemental Freeze
-- 64685, --Earth totem
-- 63685 --Frost Shock Freeze
--}
--function HasSlow(var1)
-- for i=1,#slows do
-- local slow = UnitDebuffID(var1,slows[i])
--
-- if slow then
-- return true
-- end
-- end
-- return false
--end
--function HasSnare(var1)
-- for i=1,#snares do
-- local snare = UnitDebuffID(var,snares[i])
--
-- if snare then
-- return true
-- end
-- end
-- return false
--end