https://forum.elysium-project.org/topic/34281-getting-debufftype-out-of-unitdebuff/?do=findComment&comment=315238
Not tested:
anyCurse = false;
for i = 1, 16 do
local debuffTexture, debuffApplications, debuffDispelType = UnitDebuff("player", i);
if debuffDispelType and debuffDispelType == "Curse" then
anyCurse = true;
return;
end
end