Deathknight: "Show flash instead" for Soul Reaper
ckaotik opened this issue ยท 2 comments
The very old version of ABA allowed to check "Show flash instead" and would then display the ants trail when the enemy target is below 35% health. (i.e. I'd like to change this from hint
to flash
)
Currently, this checkbox only affects the display of the applied debuff LPS-DEATHKNIGHT-6.0.0-4
and not the availability hint.
When I tried adding this behavior as my own custom rule, all I get are lua errors :(
3x AdiButtonAuras\rules\UserRules.lua:83: bad argument #2 to 'xpcall' (value expected)
[C]:: ?
AdiButtonAuras\rules\UserRules.lua:83: in function <AdiButtonAuras\rules\UserRules.lua:55>
[C]:: ?
AdiButtonAuras\core\Core.lua:370: in function <AdiButtonAuras\core\Core.lua:365>
(tail call): ?
(tail call): ?
(tail call): ?
[C]:: ?
[string "safecall Dispatcher[2]"]:9: in function <[string "safecall Dispatcher[2]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0-59.lua:799: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:614>
(tail call): ?
[C]:: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...terface\Masque\Libs\AceGUI-3.0\AceGUI-3.0-34.lua:314: in function 'Fire'
...ue\Libs\12AceGUI-3.0-34\widgets\AceGUIWidget-DropDown.lua:442: in function <...ue\Libs\AceGUI-3.0\widgets\AceGUIWidget-DropDown.lua:433>
(tail call): ?
[C]:: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...terface\Masque\Libs\AceGUI-3.0\AceGUI-3.0-34.lua:314: in function 'Fire'
...s\6AceGUI-3.0-34\widgets\AceGUIWidget-DropDown-Items.lua:351: in function <...s\AceGUI-3.0\widgets\AceGUIWidget-DropDown-Items.lua:341>
I just said "New rule" and chose DEATHKNIGHT class restriction which gave me an example based on Soul Reaper. I then changed .hint to .flash. But even with .hint it's throwing the error.
-- Sample rule using Configure
-- See https://github.com/Adirelle/AdiButtonAuras/blob/master/doc/Rules.textile for more details
return Configure {
-- Unique Id
"SoulReaper",
-- Description
"Shows Hint when target is below 35% health.",
-- Spells to modify
{
114866, -- Soul Reaper (Blood)
130735, -- Soul Reaper (Frost)
130736, -- Soul Reaper (Unholly)
},
-- 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.flash = true
end
end
}