View Single Post
03-19-14, 06:46 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
SecureHandlers and 'equipmentset'

Holla everyone

I'm working on my action bar addon an would like to support equipment sets from the Blizz equipment manager.

I've found the following code in SecureHandlers.lua:

Lua Code:
  1. local function PickupAny(kind, target, detail, ...)
  2.     if (kind == "clear") then
  3.         ClearCursor();
  4.         kind, target, detail = target, detail, ...;
  5.     end
  6.  
  7.     if kind == 'action' then
  8.         PickupAction(target);
  9.     elseif kind == 'bag' then
  10.         PickupBagFromSlot(target)
  11.     elseif kind == 'bagslot' then
  12.         PickupContainerItem(target, detail)
  13.     elseif kind == 'inventory' then
  14.         PickupInventoryItem(target)
  15.     elseif kind == 'item' then
  16.         PickupItem(target)
  17.     elseif kind == 'macro' then
  18.         PickupMacro(target)
  19.     elseif kind == 'merchant' then
  20.         PickupMerchantItem(target)
  21.     elseif kind == 'petaction' then
  22.         PickupPetAction(target)
  23.     elseif kind == 'money' then
  24.         PickupPlayerMoney(target)
  25.     elseif kind == 'spell' then
  26.         PickupSpell(target)
  27.     elseif kind == 'companion' then
  28.         PickupCompanion(target, detail)
  29.     elseif kind == 'equipmentset' then
  30.         PickupEquipmentSet(target);
  31.     end
  32. end
  33. function SecureHandler_OnDragEvent(self, snippetAttr, button)
  34.     local body = self:GetAttribute(snippetAttr);
  35.     if (body) then
  36.         PickupAny( SecureHandler_Self_Execute(self,
  37.                                               "self,button,kind,value,...",
  38.                                               body, button, GetCursorInfo()) );
  39.     end
  40. end

Doesn't that mean that a frame that inherits SecureActionButtonTemplate will support the type 'equipmentset'?

Unfortunatly something like
Lua Code:
  1. frame:SetAttribute("type", "equipmentset")
  2. frame:SetAttribute("equipmentset", "<nameofavalidset>")
does not work.

Does someone know if "equipmentset" actually is a valid value for "type"?
  Reply With Quote