< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来
Mail Functions (邮件功能函数)
Globals associated with Mail. Events associated with Mail.
REMOVED 已失效 AddSendMailCOD() - This does not appear to exist any longer. --Bug ,
REMOVED 已失效 AddSendMailMoney() - This does not appear to exist any longer. --Bug ,
CheckInbox() - ?.
ClearSendMail() - This clears the text in the send mail tab and places the COD item in the inventory. --Bug ,
ClickSendMailItemButton() - This seems to just simulate a click on the send item mail slot (will pickup the item there). --Bug ,
CloseMail() - Closes the mail window. --Bug ,
DeleteInboxItem(index) - ?.
DropCursorMoney - Drops the amount of money held by the cursor.
GetCoinIcon(amount)
GetInboxHeaderInfo(index) - Returns information about a message in the inbox.
GetInboxItem(index) - Returns description of the attachment attached to message at (index).
GetInboxNumItems() - Returns the number of messages in your inbox.
GetInboxText(index) - Returns the message text of message at (index).
GetNumPackages() - Not yet fully implemented. Currently it always returns 1. --Bug ,
GetNumStationeries() - Not yet fully implemented. Currently it always returns 2. --Bug ,
GetPackageInfo(index) - Not yet fully implemented. Currently an index of 1 returns "Test Package". --Bug ,
GetSelectedStationeryTexture() - Not yet fully implemented. Currently it returns "STATIONERYTEST" when the mailbox is open. --Bug ,
GetSendMailCOD() - ?.
GetSendMailItem() - ?.
GetSendMailMoney() - ?.
GetSendMailPrice() - ?.
GetStationeryInfo(index) - Not yet fully implemented. Currently an index of 1 returns "Stationery Default", and an index of 2 returns "Test Stationery". --Bug
HasNewMail() - Returns nil if there is no new mail. --Bug ,
InboxItemCanDelete(index) - ?.
REMOVED PickupSendMailCOD(amount) - This does not appear to exist any longer. --Bug ,
REMOVED PickupSendMailMoney(amount) - This does not appear to exist any longer. --Bug ,
ReturnInboxItem(index) - ?.
SelectPackage(index) - Not yet fully implemented. It does nothing visible. --Bug ,
SelectStationery(index) - Not yet fully implemented. It does nothing visible. --Bug ,
SendMail("target", "subject", "body") - If the mailbox is open, this sends mail. --Buttahcup
SetSendMailCOD(amount) - ?.
SetSendMailMoney(amount) - ?.
TakeInboxItem(index) - Take the attached item from the mailbox message at index.
TakeInboxMoney(index) - ?.
TakeInboxTextItem(index) - ?.
Mapping Functions (世界地图函数)
These functions are related to display of the world map.
GetCorpseMapPosition() - Returns the postion off the corpse on the current world map.
GetCurrentMapContinent() - Returns the number of the continent the world map is currently showing.
GetCurrentMapZone() - Returns the number of the zone the world map is currently showing.
GetMapContinents() - Returns the continent names.
GetMapInfo() - Returns the name and size of the current world map.
GetMapLandmarkInfo(landmarkIndex) - Returns information about a landmark on the current world map.
GetMapOverlayInfo(overlayIndex) - Returns information about an overlay on the current world map.
GetMapZones(continentIndex) - Returns the zone names of a continent.
GetNumMapLandmarks() - Returns the number of landmarks on the current world map.
GetNumMapOverlays() - Returns the number of overlays on the current world map.
GetPlayerMapPosition("unit") - Returns the postion of a unit on the current world map.
GetWorldLocMapPosition()
ProcessMapClick(x,y) - Passes a click to the client, which then calculates if the zone has to be changed.
RequestBattlefieldPositions() - ?.
SetMapToCurrentZone() - Sets the current world map to the zone the player is presently in.
SetMapZoom(continentIndex{,zoneIndex}) - Sets the current world map to a specific continent and optionally zone.
SetupWorldMapScale() - Configures scale of world map to best fill screen.
UI ToggleMinimap - Turns the minimap display on/off.
UI ToggleWorldMap - Turns the world map on/off.
UpdateMapHighlight(x,y) - Provides map rollover information for highlighting.
Math Functions (计算功能)
These math functions are compatability references to the LUA math library (which is available via math.), some with conversion wrappers.
__pow(x, y) - returns x to the power of y
abs(value) - Returns the absolute value of the number.
acos(value) - Returns the arc cosine of the value in degrees.
asin(value) - Returns the arc sine of the value in degrees.
atan(value) - Returns the arc tangent of the value in degrees.
atan2(x,y) - Returns the arc tangent of X/Y in degrees.
ceil(value) - Returns the ceiling of value.
acos(degrees) - Returns the cosine of the degree value.
deg(radians) - Returns the degree equivalent of the radian value.
exp(value) - Returns the exponent of value.
floor(value) - Returns the floor of value.
frexp(num) - Extract mantissa and exponent from a floating point number.
ldexp(value, exponent) - Load exponent of a floating point number.
log(value) - Returns the logarithm of value.
log10(value) - Returns the base-10 logarithm of value.
max(value{,values...}) - Returns the numeric maximum of the input values.
min(value{,values...}) - Returns the numeric minimum of the input values.
mod(value,modulus) - Returns floating point modulus of value.
rad(degrees) - Returns the radian equivalent of the degree value.
random({{lower,}upper}) - Returns a random number (optionally bounded integer value)
randomseed(seed) - Seed the pseudo random number generator
sin(degrees) - Returns the sine of the degree value.
sqrt(value) - Return the square root of value.
tan(degrees) - Returns the tangent of the degree value.
Meeting Stone Functions(集合石功能)
GetMeetingStoneStatusText()
IsInMeetingStoneQueue()
Merchant Functions (NPC商人功能)
BuyMerchantItem(index {,qty}) - Buys an item from a merchant.
BuybackItem() - Buys the last sold item back.
CanMerchantRepair() - Returns true if the merchant can repair items.
CloseMerchant() - Closes the merchant window.
GetBuybackItemInfo()
GetMerchantItemInfo(index) - Returns information about an item.
GetMerchantItemLink(index) - Returns a link to an item.
GetMerchantItemMaxStack(index) - Returns the maximum number of items in a stack.
GetMerchantNumItems() - Returns the number of items the merchant sells.
GetRepairAllCost()
HideRepairCursor()
InRepairMode()
PickupMerchantItem(index) - Places the item on the cursor.
RepairAllItems()
ShowMerchantSellCursor(index) - Changes the cursor to the merchant sell cursor.
ShowRepairCursor()
感谢WOWWIKI提供英文函数资料
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: