Fixed removing of keybinds from Stance and Pet bar

This commit is contained in:
Hendrik Leppkes
2008-11-01 14:37:05 +01:00
parent fe16bbc159
commit f4ee55d1a4
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -203,6 +203,18 @@ function PetButtonPrototype:SetKey(key)
SetBinding(key, format("BONUSACTIONBUTTON%d", self.id))
end
function PetButtonPrototype:ClearBindings()
local binding = format("BONUSACTIONBUTTON%d", self:GetID())
while GetBindingKey(binding) do
SetBinding(GetBindingKey(binding), nil)
end
binding = "CLICK "..self:GetName()..":LeftButton"
while GetBindingKey(binding) do
SetBinding(GetBindingKey(binding), nil)
end
end
local actionTmpl = "Pet Button %d (%s)"
function PetButtonPrototype:GetActionName()
local id = self.id
+12
View File
@@ -134,6 +134,18 @@ function StanceButtonPrototype:SetKey(key)
SetBinding(key, format("SHAPESHIFTBUTTON%d", self:GetID()))
end
function StanceButtonPrototype:ClearBindings()
local binding = format("SHAPESHIFTBUTTON%d", self:GetID())
while GetBindingKey(binding) do
SetBinding(GetBindingKey(binding), nil)
end
binding = "CLICK "..self:GetName()..":LeftButton"
while GetBindingKey(binding) do
SetBinding(GetBindingKey(binding), nil)
end
end
local actionTmpl = "Stance Button %d (%s)"
function StanceButtonPrototype:GetActionName()
local id = self:GetID()