12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 27 ■ API <strong>Reference</strong> 633if ( frame:IsVisible() <strong>and</strong> MouseIsOver(frame) ) thenprint(frame:GetName() or string.<strong>for</strong>mat(“[Unnamed Frame: %s]“, itostring(frame)));endframe = EnumerateFrames(frame); -- Get the next frameendEnumerateServerChannelsReturns the available server channel names.... = EnumerateServerChannels()Returns:...—A list <strong>of</strong> strings, each the name <strong>of</strong> an available server channel (e.g. ‘‘General‘‘,‘‘Trade‘‘, ‘‘<strong>World</strong>Defense‘‘, ‘‘GuildRecruitment‘‘, ‘‘LookingForGroup‘‘)(string)EquipCursorItemPuts the item on the cursor into a specific equipment slot.EquipCursorItem(slot)If the item on the cursor can be equipped but does not fit in the given slot, theitem is automatically equipped in the first available slot in which it fits (as withAutoEquipCursorItem()). Thus, this function is most useful when dealingwith items which can be equipped in more than one slot: containers, rings,trinkets, <strong>and</strong> (<strong>for</strong> dual-wielding characters) one-h<strong>and</strong>ed weapons.Causes an error message (UI_ERROR_MESSAGE) if the item on the cursor cannotbe equipped. Does nothing if the cursor does not contain an item.Arguments:slot—An inventory slot number, as can be obtained from GetInventorySlotInfo (number, inventoryID)EquipItemByNameAttempts to equip an arbitrary item.EquipItemByName(itemID) or EquipItemByName(“itemName“) or iEquipItemByName(“itemLink“)ConfirmationThe item is automatically equipped in the first available slot in which it fits. Toequipaniteminaspecificslot,seeEquipCursorItem().Causes an error message (UI_ERROR_MESSAGE) if the specified item cannot beequipped. Does nothing if the specified item does not exist or is not in theplayer’s possession.Arguments:itemID—An item’s ID (number)itemName—An item’s name (string)itemLink—An item’s hyperlink, or any string containing the itemString portion<strong>of</strong> an item link (string)EquipPendingItemConfirms equipping a bind-on-equip item.EquipPendingItem(index)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!