diff PetActionButton.lua @ 288:d931fa418e17

Merge LBF fix to default
author Flick
date Fri, 01 Jul 2011 14:32:17 -0700
parents 499ca4edf033
children 276165a0e860
line wrap: on
line diff
--- a/PetActionButton.lua	Fri Jul 01 14:31:41 2011 -0700
+++ b/PetActionButton.lua	Fri Jul 01 14:32:17 2011 -0700
@@ -31,10 +31,11 @@
 
 local _onReceiveDrag = -- function(self, button, kind, value, ...)
 [[
-  if kind then -- pet spells on the cursor return nil from GetCursorInfo(), which is very strange
+  if kind == "petaction" then
+    return "petaction", self:GetAttribute("action")
+  else
     return kind, value, ...
   end
-  return "petaction", self:GetAttribute("action")
 ]]
 
 --
@@ -81,6 +82,8 @@
 function Pet:New( config, bar, idx, idHint )
   self = Super.New(self, config, bar, idx, "SecureActionButtonTemplate, ActionButtonTemplate" )
 
+  local name = self:GetFrame():GetName()
+
   local f = self:GetFrame()
   if not f.autoCastTexture then
     -- store autocast stuff with the frame for recycling