< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来.
These functions manage containers (bags, backpack). See also Inventory Functions and Bank Functions.
ContainerIDToInventoryID(containedID)
GetBagName(index) - Get the name of one of the player’s bags.
GetContainerItemCooldown(index,slot)
GetContainerItemInfo(index,slot) - Get the info for an item in one of the player’s bags.
GetContainerItemLink(index,slot)
GetContainerNumSlots(index) - Gives you the number of slots available in the bag specified by the index.
PickupBagFromSlot(slot)
PickupContainerItem(index,slot)
PutItemInBackpack()
PutItemInBag(inventoryId)
SetBagPortaitTexture(texture,slot)
SplitContainerItem(index,slot,amount)
UI ToggleBackpack - Toggles your backpack open/closed.
UI ToggleBag - Opens or closes the specified bag.
UseContainerItem(bag,slot) - Uses an item located in bag# and slot#.
Crafting Functions (专业技能函数?)
See TradeSkill Functions - these superseded the old crafting functions for most (but not all - Enchanting) skills.
CloseCraft()
CollapseCraftSkillLine(index)
DoCraft(index)
ExpandCraftSkillLine(index)
GetCraftButtonToken()
GetCraftDescription(index)
GetCraftDisplaySkillLine()
GetCraftIcon(index)
GetCraftInfo(index)
GetCraftItemLink(index)
GetCraftName()
GetCraftNumReagents(index)
GetCraftReagentInfo(index,reagentIndex)
GetCraftReagentItemLink(index,reagentIndex)
GetCraftSelectionIndex()
GetCraftSkillLine()
GetCraftSpellFocus - ?.
GetNumCrafts()
SelectCraft(index)
Cursor Functions (鼠标指针函数)
AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
CursorCanGoInSlot(slot)
CursorHasItem() - Returns true if the cursor currently holds an item
CursorHasMoney() - true/false
CursorHasSpell() - true/false
DeleteCursorItem()
DropCursorMoney - Drops the amount of money held by the cursor.
DropItemOnUnit("unit") - Drops an item from the cursor onto a unit.
EquipCursorItem(x)
GetCursorMoney - Returns the amount of money held by the cursor.
GetCursorPosition() - Get the cursor location on the screen
HideRepairCursor()
InRepairMode()
PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
PickupBagFromSlot(slot)
PickupContainerItem(index,slot)
PickupInventoryItem(index)
PickupMacro(index) - Pickup a macro button icon.
PickupMerchantItem(index) - Places the item on the cursor.
PickupPetAction(index) - ?.
PickupPlayerMoney - Picks up an amount of money from the player.
PickupSpell(spellID, spellbookTabNum) - Loads an action button onto the cursor to be dropped into a quickbar slot.
PickupStablePet(index) - ?.
PickupTradeMoney(amount)
PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.
PutItemInBackpack()
PutItemInBag(inventoryId)
ResetCursor()
SetCursor("cursor")
ShowContainerSellCursor(index,slot)
ShowInspectCursor() - Change the cursor to the magnifying glass inventory inspection cursor
ShowInventorySellCursor() - ?.
ShowMerchantSellCursor(index) - Changes the cursor to the merchant sell cursor.
ShowRepairCursor()
Debugging Functions (错误调试函数)
FrameXML_Debug(flag) - Sets FrameXML logging state which is output to /WoW Folder/Logs/FrameXML.log
GetDebugStats()
Disabled Functions (已禁用函数)
These functions are present but have been disabled entirely.
AppendToFile - ?.
DeleteFile() - ?
ReadFile() - ?.
Enchanting Functions(附魔功能函数)
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
ReplaceEnchant()
ReplaceTradeEnchant - Confirm the replacement of an enchantment via trade.
Faction Functions
CollapseFactionHeader(index)
ExpandFactionHeader(index)
FactionToggleAtWar(index)
GetFactionInfo(index)
GetNumFactions()
UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "
Friend Functions (交友功能函数)
AddFriend - Add a friend to your friend list.
GetFriendInfo(index) - Returns information of players on your FriendsList.
GetNumFriends()
GetSelectedFriend()
RemoveFriend("name" or index)
SetSelectedFriend(index)
ShowFriends()
UI ToggleFriendsFrame - Opens/closes the friends pane.
GM Functions
DeleteGMTicket()
GMRequestPlayerInfo() - access denied (darn)
GetGMStatus()
GetGMTicket()
GetGMTicketCategories()
NewGMTicket(type,"text")
REMOVED 已失效 ReportBug("text") - REMOVED IN 1300
REMOVED 已失效 ReportNote("text") - REMOVED IN 1300
REMOVED 已失效 ReportSuggestion("text","category") - REMOVED IN 1300
Stuck - Informs the game engine that the player is Stuck.
UpdateGMTicket(type,"text")
Gossip Functions
CloseGossip()
GetGossipActiveQuests - ?.
GetGossipAvailableQuests - ?.
GetGossipOptions()
GetGossipText()
SelectGossipActiveQuest - ?.
SelectGossipAvailableQuest - ?.
SelectGossipOption(index)
感谢WOWWIKI提供英文函数资料
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: