TellMeWhen

TellMeWhen

25M Downloads

AoE hint condition

Raidfather opened this issue ยท 0 comments

commented

Hey, I noticed that Hekili can tell if someone is in AoE combat or not to suggest relevant abilities

I'm not sure how they do it, but I cobbled together this janky hack to do something similar in a lua condition for myself

local found = false
local count = 0
for i = 1, 10 do
    local unit = "nameplate" .. i
    if UnitExists(unit) then
        local name = UnitName(unit)
        local fren = UnitIsFriend("player", unit)
        local inCombat = UnitAffectingCombat(unit)
        found = true
        if not fren and inCombat then
            count = count + 1
        end
    end
end
return count >= 2

I'm wondering what the perf impact is for this, and if it'd be possible to integrate something like this into the TellMeWhen core so that multiple icons could get the info without having to do it themselves