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:
Hendrik Leppkes
2008-09-22 19:12:23 +02:00
parent aa1867ad90
commit 39a8132031
+3 -1
View File
@@ -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(...)