From 39a8132031bc559228674452683af055e9d8c2cc Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Mon, 22 Sep 2008 19:12:23 +0200 Subject: [PATCH] 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 --- PetButton.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PetButton.lua b/PetButton.lua index 41f3465..d7cd399 100644 --- a/PetButton.lua +++ b/PetButton.lua @@ -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(...)