AdiButtonAuras

AdiButtonAuras

404k Downloads

User Rule for Assassination Rogue Dispatch does not function.

casualc opened this issue ยท 4 comments

commented

As title suggests, using below code does not enable flash or highlight of any kind for the Dispatch ability (111240).

-- Sample rule using Configure
-- See https://github.com/Adirelle/AdiButtonAuras/blob/master/doc/Rules.textile for more details

return Configure {

-- Unique Id
"Dispatch",

-- Description
"Shows Hint when target is below 35% health.",

-- Spells to modify
{
    111240, -- Dispatch
},

-- Unit(s) to watch
"enemy",

-- Event(s) to watch
{ "UNIT_HEALTH", "UNIT_HEALTH_MAX" },

-- Callback
function(units, model)
    if UnitHealth(units.enemy) / UnitHealthMax(units.enemy) < 0.35 then
        model.hint = true
    end
end

}

commented

This rule shows a hint when the enemy is below 35%, not a flash. You either change your hint settings in-game or use model.highlight = "flash" instead of model.hint = true. Beware that a hint is the prefered method and that Mutilate procs may flash Dispatch too (can't confirm, away from wow for a few more days)

You also don't need a table if you have a single spell to modify and by UNIT_HEALTH_MAX you probably mean UNIT_MAXHEALTH.

commented

You also have to test for units.enemy, because it can be nil (when no enemy are targeted), which will cause an error.

 if units.enemy and UnitHealth(units.enemy) / UnitHealthMax(units.enemy) < 0.35 then
commented

This issue made me revisit the warrior equivalent in the default rules.

commented

Closing for lack of activity. Please re-open if there is something to add.