< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来.
Inspection Functions (侦察功能函数)
CheckInteractDistance("unit",distIndex)
ClearInspectPlayer() - Reset inspect data once finished with it (Called on inspect window hide)
GetInspectHonorData() - Return honor info for the inspected unit (if available).
GetInspectPVPRankProgress - Get the PvP rank progress information from the inspected unit.
HasInspectHonorData() - Determine if the inspected unit’s honor data is available.
InspectUnit("unit") - Inspects the specified / selected "unit".
NotifyInspect("unit")
RequestInspectHonorData() - Request honor data for inspected unit.
Instance Functions (副本函数)
GetBattlefieldInstanceExpiration() - Get shutdown timer for the battlefield instance.
GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield
GetBattlefieldInstanceRunTime - ?.
GetInstanceBootTimeRemaining()
Inventory Functions (人物属性窗口功能函数)
These functions manage your inventory, that is those items you have equipped. See also Container Functions and Bank Functions.
AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
BankButtonIDToInvSlotID - Returns the ID number of a bank button in terms of inventory slot ID.
CancelPendingEquip(index)
ConfirmBindOnUse()
ContainerIDToInventoryID(containedID)
CursorCanGoInSlot(slot)
EquipCursorItem(x)
EquipPendingItem(slot)
GetInventoryAlertStatus(index)
GetInventoryItemBroken("unit",slot) - Determine if an inventory item is broken (no durability).
GetInventoryItemCooldown("unit",slot) - Get cooldown information for an inventory item.
GetInventoryItemCount("unit",slot) - Determine the quantity of an item in an inventory slot.
GetInventoryItemLink("unit",slot) - Get a link string for an inventory item.
GetInventoryItemQuality("unit",slot) - Return the quality of an inventory item.
GetInventoryItemTexture("unit",slot) - Return the texture for an inventory item.
GetInventorySlotInfo(slot) - Get the info for a named inventory slot (slot ID and texture)
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
HasWandEquipped - ?.
IsInventoryItemLocked(id)
PickupBagFromSlot(slot)
PickupInventoryItem(index)
SetInventoryPortaitTexture - ?.
REMOVED SetInventoryPortraitTexture()
UpdateInventoryAlertStatus()
UseInventoryItem(id) - Use an item in a specific inventory slot.
Item Functions (游戏物品函数)
These functions are those which operate on item links or item information directly. See also Container Functions, and Inventory Functions.
GetAuctionItemLink("type", index) - Returns a link string for the specified auction item.
GetContainerItemLink(index,slot) - Returns the item link of the item located in bag# and slot#.
GetCraftItemLink(index)
GetCraftReagentItemLink(index,reagentIndex)
GetInventoryItemLink("unit",slot) - Get a link string for an inventory item.
GetItemInfo(itemID | "itemlink") - Returns information about an item.
GetMerchantItemLink(index) - Returns a link to an item.
GetQuestItemLink - Returns a link to a quest reward item.
GetQuestLogItemLink - ?.
GetTradePlayerItemLink(id) - Returns link to a trade item.
GetTradeSkillItemLink(index) - Gets the link string for a trade skill item.
GetTradeSkillReagentItemLink(index, reagentId) - Gets the link string for a trade skill reagent.
GetTradeTargetItemLink(id) - Returns link to a trade item.
OffhandHasWeapon() - Determine if your offhand carries a weapon.
SetItemRef(itemLink) - Displays an item link box.
Item Text Functions (物品说明文本函数)
These functions relate to item text (books, etc)
CloseItemText() - Close an open item text (book, plaque, etc).
ItemTextGetCreator() - Get the creator of the current text (if player-created).
ItemTextGetItem() - Get the name of the text.
ItemTextGetMaterial() - Get the material on which the text is printed.
ItemTextGetPage() - Get the page number of the currently viewed page.
ItemTextGetText() - Get the page contents of the currently viewed page.
ItemTextHasNextPage() - Determine if there is another page after the current one.
ItemTextNextPage() - Request the next page of the text.
ItemTextPrevPage() - Request the previous page of the text.
感谢WOWWIKI提供英文函数资料
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: