Commit effd6851 authored by Merathilis's avatar Merathilis
Browse files

Deal with: elvui/elvui#1345

@Azilroka, have a look plx.
parent 80e9c015
......@@ -210,7 +210,11 @@ function AB:BindUpdate(button, spellmacro)
if not bind.button.name then return; end
bind.button.id = tonumber(button:GetID());
bind.button.bindstring = (spellmacro=="STANCE" and "SHAPESHIFTBUTTON" or "BONUSACTIONBUTTON")..bind.button.id;
if not bind.button.id or bind.button.id < 1 or bind.button.id > 10 then
bind.button.bindstring = "CLICK "..bind.button.name..":LeftButton";
else
bind.button.bindstring = (spellmacro=="STANCE" and "SHAPESHIFTBUTTON" or "BONUSACTIONBUTTON")..bind.button.id;
end
GameTooltip:SetOwner(bind, "ANCHOR_NONE");
GameTooltip:Point("BOTTOM", bind, "TOP", 0, 1);
......@@ -238,7 +242,9 @@ function AB:BindUpdate(button, spellmacro)
if not bind.button.name then return; end
bind.button.action = tonumber(button.action);
if bind.button.keyBoundTarget then
if (not bind.button.action or bind.button.action < 1 or bind.button.action > 132) and not (bind.button.keyBoundTarget) then
bind.button.bindstring = "CLICK "..bind.button.name..":LeftButton";
elseif bind.button.keyBoundTarget then
bind.button.bindstring = bind.button.keyBoundTarget
else
local modact = 1+(bind.button.action-1)%12;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment