Commit 47124d06 authored by Azilroka's avatar Azilroka
Browse files

Properly deal with #1345

parent ee6ad9ae
......@@ -210,11 +210,7 @@ function AB:BindUpdate(button, spellmacro)
if not bind.button.name then return; end
bind.button.id = tonumber(button:GetID());
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
bind.button.bindstring = (spellmacro=="STANCE" and "SHAPESHIFTBUTTON" or "BONUSACTIONBUTTON")..bind.button.id;
GameTooltip:SetOwner(bind, "ANCHOR_NONE");
GameTooltip:Point("BOTTOM", bind, "TOP", 0, 1);
......@@ -242,13 +238,13 @@ function AB:BindUpdate(button, spellmacro)
if not bind.button.name then return; end
bind.button.action = tonumber(button.action);
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
if bind.button.keyBoundTarget then
bind.button.bindstring = bind.button.keyBoundTarget
else
local modact = 1+(bind.button.action-1)%12;
if bind.button.action < 25 or bind.button.action > 72 then
if bind.button.name == 'ExtraActionButton1' then
bind.button.bindstring = "EXTRAACTIONBUTTON1";
elseif bind.button.action < 25 or bind.button.action > 72 then
bind.button.bindstring = "ACTIONBUTTON"..modact;
elseif bind.button.action < 73 and bind.button.action > 60 then
bind.button.bindstring = "MULTIACTIONBAR1BUTTON"..modact;
......
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