Changed PetButton KeyBound implementation to always show a proper name
Bindings reported will always be in the format "Pet Button 1 (action_name)" now. Note that bindings are always directly to the button, no matter whcih action is currently associated to it, not as [1] claims. [1]: http://jira.wowace.com/browse/BT-39
This commit is contained in:
+3
-1
@@ -206,7 +206,9 @@ end
|
||||
local actionTmpl = "Pet Button %d (%s)"
|
||||
function PetButtonPrototype:GetActionName()
|
||||
local id = self.id
|
||||
return format(actionTmpl, id, (GetPetActionInfo(id)) or "empty")
|
||||
local name, _, _, token = GetPetActionInfo(id)
|
||||
if token and name then name = _G[name] end
|
||||
return format(actionTmpl, id, name or "empty")
|
||||
end
|
||||
|
||||
function PetButtonPrototype:ClearSetPoint(...)
|
||||
|
||||
Reference in New Issue
Block a user