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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

836 Part IV ■ <strong>Reference</strong>Non-Blizzard code is allowed to per<strong>for</strong>m certain UI actions (such as changingsecure template attributes or moving/showing/hiding secure frames) only ifthe player is not in combat; this function can be used to determine whethersuch actions are currently available.Returns:inLockdown—1 if the user interface is protected due to combat; otherwise nil(1nil)InRepairModeReturns whether the item repair cursor mode is currently active.inRepair = InRepairMode()Repair mode is entered by calling ShowRepairCursor() <strong>and</strong> exited by callingHideRepairCursor(); while in repair mode, calling PickupContainerItem() or PickupInventoryItem() will attempt to repair the item (<strong>and</strong>deduct the cost <strong>of</strong> such from the player’s savings) instead <strong>of</strong> putting it on thecursor.Returns:inRepair—1 if repair mode is currently active; otherwise nil (1nil)InboxItemCanDeleteReturns whether a message in the player’s inbox can be deleted.canDelete = InboxItemCanDelete(mailID)Arguments:mailID—Index <strong>of</strong> a message in the player’s inbox (between 1 <strong>and</strong>GetInboxNumItems()) (number)Returns:canDelete—1 if the message can be deleted; otherwise nil (1nil)InitiateTradeOffers to trade with a given unit.InitiateTrade(“unit“) or InitiateTrade(“name“)The trade process does not begin immediately; once the server has determinedboth clients can trade, the TRADE_SHOW event fires.ProtectedArguments:unit—A unit with which to trade (string, unitID)name—The name <strong>of</strong> a unit with which to trade; only valid <strong>for</strong> nearby units in theplayer’s party/raid (string)InteractUnitInteracts with (as with right-clicking on) a unit.InteractUnit(unit)Arguments:unit—The unit to interact with (unitid)

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

Saved successfully!

Ooh no, something went wrong!