Check if any buff/debuff by type
LuaScript:
anyPoison = false;
for i=1,40 do
local name, rank, icon, count, debuffAuraType = UnitAura("player", i);
if name and debuffAuraType and debuffAuraType == "Poison" then
anyPoison = true;
return;
end
end
- you can replace player by UnitId
- Replace 53817 by your spell id.
Research:
true
Var:
anyPoison
Wow API: http://wow.gamepedia.com/API_UnitAura
You can change "player" by "target" or "pet" or... to check target, pet... buff/debuff.
You can change "Poison" by "Magic", "Disease", "Curse".