魔獸世界百科全書
Advertisement

簡介[]

魔獸世界API,是由其遊戲製作公司Blizzard所提供的一套函式庫,目的在於透過巨集和插件對魔獸世界的遊戲介面上做互動和修改其介面內容。底下所列出的函式可能由於API開發者到目前的改動而非完整內容,通用函式列表是較為完整一份列表。如果您打算在這相關網頁撰寫內容,請先閱讀如何編輯本網頁。總結來說,請不要創造空的網頁,任意更新或連結本網頁,討論任何可能大幅變動網頁內容的相關討論。如果您需要閱讀相關文件,請看API駐解以及其規範。您也可以測試某個UI程式碼來找到各種函式在預設UI的執行範例。函式的名字可能跟在下列標籤之後:

  • PROTECTED - 這類型的函式只能被合乎安全規範的程式碼呼叫。更多細節請參閱Protected函式的章節
  • NOCOMBAT - 這類型的函式在遊戲戰鬥中不能被不合乎安全規範的程式碼呼叫。
  • HW - 這類型的函式只能於回應硬體事件的過程中被呼叫。(來自OnClick Handlers)
  • UI - 這類型函式被實作於Lua檔(FrameXML格式),但是被認為相當重要而列而此。
  • REMOVED - 這類型函式已經被魔獸世界API所淘汰,而且應該從列表中移除。僅為了歷史參考的目的,相關函式請參閱Removed函式章節

函式[]

這是wow-api中文化的成果

帳號[]

GetAccountExpansionLevel() - 傳回帳號的擴充等級。(0=魔獸世界, 1=燃燒的遠征, 2=巫妖王之怒)

下列函式只有在大陸伺服器可以用,原因是只有大陸有時間限制伺服器

GetBillingTimeRested() - 傳回帳號還可以玩的剩餘秒數。

PartialPlayTime() - 傳回1如果玩家是處於疲倦狀態(減少經驗值 戰利品)。

NoPlayTime() - 傳回1如果玩家是處於不健康狀態(沒有經驗值 戰利品)。

成就[]

成就:

CanShowAchievementUI()- 傳回是否可以顯示成就UI

ClearAchievementComparisonUnit() - 移除比較成就的目標。

GetAchievementCategory(achievementID) - 傳回成就ID分類的數字.

GetAchievementComparisonInfo(achievementID, comparisonNum) - 傳回成就比較狀態資訊.

GetAchievementCriteriaInfo(achievementID, criteriaNum) - 傳回Criteria的資訊

GetAchievementInfo((achievementID) or (category, offset) - 傳回成就的資訊

GetAchievementInfoFromCriteria(id) - 傳回一個從Criteria當作引數得到的資訊

GetAchievementLink(achievementID) - 傳回一個成就的連接

GetAchievementNumCriteria(achievementID) -傳回成就分項的數目

GetAchievementNumRewards(achievementID) - 傳回成就的獎勵

GetCategoryInfo(category) - 傳分類的資訊

GetCategoryList() - 傳回成就分類的清單.

GetCategoryNumAchievements(category) - 傳回特定成就分類玩成的成就數量.

GetComparisonAchievementPoints() - 傳會成就比較目標得到的成就點數.

GetComparisonCategoryNumAchievements(achievementID)

GetComparisonStatistic(achievementID) - 傳回成就分項的比較值

GetLatestCompletedAchievements() - 傳回五個最後完成的成就ID

GetLatestCompletedComparisonAchievements()

GetLatestUpdatedComparisonStats()

GetLatestUpdatedStats() - 傳回五個最後有更新過的成就分項

GetNextAchievement(achievementID)

GetNumComparisonCompletedAchievements() 傳回成就比較當中完成的數量

GetNumCompletedAchievements() - 傳回所有成就和完成的成就數量

GetPreviousAchievement(achievementID) - 傳回有關的成就.

GetStatistic(achievementID) - 傳回完成一個成就裡面的分項每個所需要的數量.

GetStatisticsCategoryList() - 傳回成就分項的清單

GetTotalAchievementPoints() - 傳回所有的成就點數總和

GetTrackedAchievements() - 傳回最近追蹤的成就的ID

GetNumTrackedAchievements() - 傳回目前追蹤的成就數量

RemoveTrackedAchievement(achievementID) - 停止成就追蹤

SetAchievementComparisonUnit(unitId) - 設定成就比較單位

AddTrackedAchievement(achievementId) - 加入追蹤一個成就

動作[]

以下函式用於操作按鍵(一般玩家操作將在下列行為函式中)

PROTECTED UI ActionButtonDown(id) - 按下特定按鈕(2.0 鎖住)

PROTECTED UI ActionButtonUp(id) - 放開特定按鈕 (2.0 鎖住)

ActionHasRange(slot) - 傳回動作是否有範圍限制(如果是傳回1, 不是傳回nil)

UI BonusActionButtonDown - Trigger the specified bonus(pet or minion) action button.

UI BonusActionButtonUp - Release the specified bonus(pet or minion) action button.

PROTECTEDCameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - Protected)

PROTECTED CameraOrSelectOrMoveStop(stickyFlag) - End "Left click" in the 3D world. (1.10 - Protected)

NOCOMBAT ChangeActionBarPage() - Changes the current action bar page.

GetActionBarPage() - Return the current action bar page. CURRENT_ACTIONBAR_PAGE is obsolete.

GetActionBarToggles() - Return the toggles for each action bar.

GetActionCooldown(slot) - This returns the cooldown values of the specified action..

GetActionCount(slot) - Get the count (bandage/potion/etc) for an action, returns 0 if none or not applicable.

GetActionInfo(slot) - Returns type, id, subtype.

GetActionText(slot) - Get the text label (macros, etc) for an action, returns nil if none.

GetActionTexture(slot) - Gets the texture path for the specified action.

GetBonusBarOffset() - Determine which page of bonus actions to show.

GetMouseButtonClicked() -Returns the name of the button that triggered a mouse down/up/click/doubleclick event. (NEW 2.0.3)

GetMultiCastBarOffset() - Returns the page offset of the multicast action IDs (NEW in 3.2)

GetPossessInfo(index) - Returns texture, name, enabled.

HasAction(slot) - Returns 1 if the player has an action in the specified slot, nil otherwise.

IsActionInRange(slot,unit) - Test if an action is in range (1=yes, 0=no, nil=not applicable).

IsAttackAction(slot) - Return 1 if an action is an 'attack' action (flashes during combat), nil otherwise.

IsAutoRepeatAction(slot) - Return 1 if an action is auto-repeating, nil otherwise.

IsCurrentAction(slot) - Return 1 if an action is the one currently underway, nil otherwise.

IsConsumableAction(slot) - Return 1 if an action is consumable (i.e. has a count), nil otherwise.

IsEquippedAction(slot) - Return 1 if an action is equipped (i.e. connected to an item that must be equipped), nil otherwise.

IsUsableAction(slot) - Return 1 if an action can be used at present, nil otherwise.

PetHasActionBar() - Determine if player has a pet with an action bar.

PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.

PickupPetAction(slot) - Drags an action from the specified pet action bar slot into the cursor.

PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.

SetActionBarToggles(show1,show2,show3,show4, alwaysShow) - Set show toggle for each action bar - 'alwaysShow' added in 1.12

StopAttack() - Turns off auto-attack, if currently active. Has no effect is the player does not currently have auto-attack active.

PROTECTED TurnOrActionStart() - Begin "Right Click" in the 3D world. (1.10 - Protected)

PROTECTED TurnOrActionStop() - End "Right Click" in the 3D world. (1.10 - Protected)

PROTECTED UseAction(slot, checkCursor, onSelf) - This instructs the interface to use the action associated with the specified ID, optionally on the player (regardless of target)(2.0 - Protected).

行為[]

以下函式用於操作玩家行為(並且不能被包含且不能略過確認的動作)

AcceptDuel() -玩家接受決鬥的邀請.

PROTECTED AttackTarget() - 攻擊目標.

CancelDuel() - 拒絕玩家決鬥的邀請

CancelLogout() - 取消等待時間.

ClearTutorials() - 清除說明.

ConfirmSummon() - 接受招喚的邀請.

PROTECTED DescendStop() - 玩家停止下降(當游泳/飛行時). -- V2.1增加

Dismount() - 玩家離開載具. -- V2.0.3增加

FlagTutorial("tutorial") - 標誌說明.

PROTECTED ForceLogout() - 快速登出.


ForceQuit() - 快速離開遊戲, 呼略倒數計時.

GetSummonConfirmAreaName() - 取得招喚地區名稱.

GetSummonConfirmSummoner() - 取得招喚者名稱.

GetSummonConfirmTimeLeft() - 取得招喚剩餘時間.

Logout - 登出遊戲.

Quit - 離開遊戲, 非Lua語言.

RandomRoll(low, high) - 擲骰子(介於兩個數字間).

SetPVP(arg1) - 設定玩家PVP模式 (1:開啟, 0:關閉)

PROTECTED SitStandOrDescendStart() - 玩家坐下, 站, 或者降落 -- V2.1增加

PROTECTED StartDuel("name") - 邀請某玩家決鬥(名稱) -- V2.0 保護

TogglePVP() - 切換PVP模式.

ToggleSheath() - 取/收武器.

UseSoulstone() - 使用靈魂石, 令自己死而復生.

AddOn[]

DisableAddOn(index or "AddOnName") - Disable the specified AddOn for subsequent sessions.

DisableAllAddOns() - Disable all AddOns for subsequent sessions.

EnableAddOn(index or "AddOnName") - Enable the specified AddOn for subsequent sessions.

EnableAllAddOns() - Enable all AddOns for subsequent sessions.

GetAddOnDependencies(index or "AddOnName") - Get dependency list for an AddOn.

GetAddOnInfo(index or "AddOnName") - Get information about an AddOn.

GetAddOnMetadata(index or "name", "variable") - Retrieve metadata from addon's TOC file.

GetNumAddOns() - Get the number of user supplied AddOns.

IsAddOnLoaded(index or "AddOnName") - Returns true if the specified AddOn is loaded.

IsAddOnLoadOnDemand(index or "AddOnName") - Test whether an AddOn is load-on-demand.

LoadAddOn(index or "AddOnName") - Request loading of a Load-On-Demand AddOn.

ResetDisabledAddOns()

競技場[]

AcceptArenaTeam() - Accepts a pending Arena team invitation.

ArenaTeamInviteByName(teamIndex, playerName) - Invites the specified player to the specified arena team.

ArenaTeamSetLeaderByName(teamIndex, playerName) - Sets new Team Leader to the specified arena team.

ArenaTeamLeave(teamIndex) - Leaves the specified arena team.

ArenaTeamRoster(teamIndex) - Sends a request to the server to request the most recent information on a specific Arena Team that you are in.

ArenaTeamUninviteByName(teamIndex, playerName) - Removes the specified played from the specified arena team.

ArenaTeamDisband(teamIndex) - Disbands the arena team without any warning! Requires you to be the leader of the team. (Known to be implemented as of 2.1.3, but may have existed before).

DeclineArenaTeam() - Declines a pending Arena team invitation.

GetArenaCurrency() - Gets the amount of arena points a player currently has to spend.

GetArenaTeam(teamIndex) - Returns information regarding the players arena team, nil if the player is not in the passed team

GetArenaTeamGdfInfo() - ? New in 3.0.8

GetArenaTeamRosterInfo(teamIndex, playerIndex) - Returns information regarding a player from the specified team. This requires a call to

ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.

GetBattlefieldTeamInfo(index) - Gets info about a registered Arena Team at the end of an arena match.

GetCurrentArenaSeason() - Gets the current Arena season.

GetInspectArenaTeamData(index) - Retrieves all the data associated with the inspected player's arena team located at index.

GetNumArenaTeamMembers(teamIndex, showOffline) - Gets the number of arena team members. This requires a call to ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.

GetPreviousArenaSeason() - Gets the previous Arena season.

IsActiveBattlefieldArena() - Returns true if in an Arena Match, also Returns true for the second argument if it's a registered match.

IsArenaTeamCaptain(teamIndex) - Returns a value based on whether the player is the arena team captain.

IsBattlefieldArena() - Returns true if the battlemaster you're talking to can queue you for arenas

IsInArenaTeam() - Returns true if you are a member of an arena team.

拍賣[]

CalculateAuctionDeposit(runTime) - Returns the required deposit for the current selling item given the specified duration (minutes).

CanCancelAuction(index) - Returns 1 if auction can be canceled.

CanSendAuctionQuery() - Return 1 if auction search button would be active, nil otherwise.

CancelAuction(index) - Cancel the specified auction (on the "owner" list).

ClickAuctionSellItemButton() - Puts the currently 'picked up' item into the 'create auction' slot.

CloseAuctionHouse() - Will close the AuctionFrame if opened.

GetAuctionHouseDepositRate() - Returns the deposit rate (percentage) for the currently open auction house (Possibly out-dated by

CalculateAuctionDeposit()

GetAuctionInvTypes(classIndex, subclassIndex) - Returns types of subcategories items.

GetAuctionItemClasses() - Returns major auction item categories.

GetAuctionItemInfo("type", index) - Returns details about the specified auction item.

GetAuctionItemLink("type", index) - Returns an itemLink for the specified auction item.

GetAuctionItemSubClasses(classIndex) - Returns subcategories in the nth auction category.

GetAuctionItemTimeLeft("type", index) - Returns the time left status of the specified auction item.

GetAuctionSellItemInfo() - Returns information about the current selling item (or nil if none selected).

GetBidderAuctionItems(page) - Returns details about an auction item on which the user is bidding (possibly out-dated by GetAuctionItemInfo("bidder", item))

GetNumAuctionItems("type") - Returns the size of the specified auction item list.

GetOwnerAuctionItems(page) - Returns details about an auction item of which the user is the owner (possibly out-dated by GetAuctionItemInfo("owner", item))

GetSelectedAuctionItem("type") - Returns the index (1-50) of the selected auction item or 0 if none is selected.

IsAuctionSortReversed("type", "sort") - Returns 1 if the specified auction list and sort is reversed, nil otherwise.

PlaceAuctionBid("type", index, bid) - Place a bid on the selected auction item.

QueryAuctionItems("name", minLevel, maxLevel, invTypeIndex, classIndex, subclassIndex, page, isUsable, qualityIndex) - Performs a search of the auction house with the specified characteristics.

SetSelectedAuctionItem("type", index) - Selects a specific item in the auction house.

SortAuctionItems("type", "sort") - Request that the specified auction list be sorted by a specific column.

StartAuction(minBid, buyoutPrice, runTime) - Starts the auction you have created in the Create Auction panel.

UI AuctionFrameAuctions.duration - Set the amount of time the auction will run for in minutes.

銀行[]

BankButtonIDToInvSlotID(buttonID, isBag) - Returns the ID number of a bank button or bag in terms of inventory slot ID.

CloseBankFrame() - 關閉銀行視窗(若以打開).

GetBankSlotCost(numSlots) - 回傳下個銀行空格所需花費金額.

GetNumBankSlots() - 回傳已購買銀行空格, 若全購買則標記.

PurchaseSlot() - 購買銀行空格(若尚有空位).

美容院[]

ApplyBarberShopStyle() - Purchase and apply the cosmetic changes.

BarberShopReset() - Reset any changes made in the Barber Shop.

CancelBarberShop() - Exit the Barber Shop chair.

GetBarberShopStyleInfo()

GetBarberShopTotalCost() - Returns the total costs of the cosmetic changes.

GetFacialHairCustomization()

GetHairCustomization()

SetNextBarberShopStyle()

戰場[]

AcceptAreaSpiritHeal() - Accept a spirit heal.

AcceptBattlefieldPort(index, acceptFlag) - Accept or reject an offered battlefield port.

CancelAreaSpiritHeal() - Cancel a spirit heal.

CanJoinBattlefieldAsGroup() - returns nil if the player can not do a group join for a battlefield.

CheckSpiritHealerDist() - Return true if you are in range with spirit healer while dead.

CloseBattlefield() - Closes the queue for battlefield window.

GetAreaSpiritHealerTime() - Returns the time left until the next resurrection by the Sprit Guide.

GetBattlefieldEstimatedWaitTime(index) - Get the estimated wait for entry into the battlefield.

GetBattlefieldFlagPosition(index) - Get the map position and texture of the flag.

GetBattlefieldInfo(index) - Returns detailed information on the Battlefield you last opened a queue window for.

GetBattlefieldInstanceExpiration() - Get shutdown timer for the battlefield instance.

GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield.

GetBattlefieldInstanceRunTime() - In milliseconds, the time since battleground started (seems to be queried from server because it is not in sync with time()).

GetBattlefieldMapIconScale() - Scale of the landmark icons on the battlefield minimap.

GetBattlefieldPortExpiration(index) - Get the remaining seconds before the battlefield port expires.

GetBattlefieldPosition(index) - Get the map position and name of a player in the battleground not in your raid.

GetBattlefieldScore(index) - Get score information about a player.

GetBattlefieldStatData(playerIndex, slotIndex) - Get information for a player from a column thats specific to a battleground (like Warsong Gulch flag captures).

GetBattlefieldStatInfo(index) - Get the battleground specific column for the score board.

GetBattlefieldStatus(index) - Get the battlefield's current status.

GetBattlefieldTimeWaited(index) - Get time waited in queue in milliseconds.

GetBattlefieldWinner() - Get the battlefields winner.

GetBattlegroundInfo() - Returns information about a battleground type.

GetHonorCurrency() - Gets the amount of honor points the player currently has to spend.

GetNumBattlefieldFlagPositions() - Get the number of flag positions available from GetBattlefieldFlagPosition().

GetNumBattlefieldPositions() - Get the number of positions available from GetBattlefieldPosition().

GetNumBattlefields() - Get the number of running battlefields for the last battleground queue window you opened.

GetNumBattlefieldScores() - Returns the number of scores(players) listed in the battlefield scoreboard.

GetNumBattlefieldStats() - Get the number of battleground specific columns.

GetNumWorldStateUI() - Get the number of WorldState UI's.

GetSelectedBattlefield() - Get the selected battlefield to join first.

GetWintergraspWaitTime() - Get the number of seconds until the next Wintergrasp battle. Returns nil if battle is in progress.

GetWorldStateUIInfo(i) - Get score and flag status within a battlefield.

IsPVPTimerRunning()

JoinBattlefield(index, joinAs) - Queue for a battleground either solo or as a group.

LeaveBattlefield() - Leave the current battlefield

ReportPlayerIsPVPAFK("unit") - Reports the specified player as AFK in a battleground.

RequestBattlefieldPositions() - Request new data for GetBattlefieldPosition().

RequestBattlefieldScoreData() - Request new data for GetBattlefieldScore().

RequestBattlegroundInstanceInfo(index) - Requests data about the available instances of a battleground.

SetBattlefieldScoreFaction(faction) - Set the faction to show on the battlefield scoreboard.

SetSelectedBattlefield(index) - Select the battlefield instance you want to join or the first one that becomes available.

ShowBattlefieldList(index) - Displays a queue window for the specified battlefield. Only works if you are already in a queue for the battlefield. Index corresponds to location in queue array.

Binding Functions[]

AcceptAreaSpiritHeal() - Accept a spirit heal.

AcceptBattlefieldPort(index, acceptFlag) - Accept or reject an offered battlefield port.

CancelAreaSpiritHeal() - Cancel a spirit heal.

CanJoinBattlefieldAsGroup() - returns nil if the player can not do a group join for a battlefield.

CheckSpiritHealerDist() - Return true if you are in range with spirit healer while dead.

CloseBattlefield() - Closes the queue for battlefield window.

GetAreaSpiritHealerTime() - Returns the time left until the next resurrection by the Sprit Guide.

GetBattlefieldEstimatedWaitTime(index) - Get the estimated wait for entry into the battlefield.

GetBattlefieldFlagPosition(index) - Get the map position and texture of the flag.

GetBattlefieldInfo(index) - Returns detailed information on the Battlefield you last opened a queue window for.

GetBattlefieldInstanceExpiration() - Get shutdown timer for the battlefield instance.

GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield.

GetBattlefieldInstanceRunTime() - In milliseconds, the time since battleground started (seems to be queried from server because it is not in sync with time()).

GetBattlefieldMapIconScale() - Scale of the landmark icons on the battlefield minimap.

GetBattlefieldPortExpiration(index) - Get the remaining seconds before the battlefield port expires.

GetBattlefieldPosition(index) - Get the map position and name of a player in the battleground not in your raid.

GetBattlefieldScore(index) - Get score information about a player.

GetBattlefieldStatData(playerIndex, slotIndex) - Get information for a player from a column thats specific to a battleground (like Warsong Gulch flag captures).

GetBattlefieldStatInfo(index) - Get the battleground specific column for the score board.

GetBattlefieldStatus(index) - Get the battlefield's current status.

GetBattlefieldTimeWaited(index) - Get time waited in queue in milliseconds.

GetBattlefieldWinner() - Get the battlefields winner.

GetBattlegroundInfo() - Returns information about a battleground type.

GetHonorCurrency() - Gets the amount of honor points the player currently has to spend.

GetNumBattlefieldFlagPositions() - Get the number of flag positions available from GetBattlefieldFlagPosition().

GetNumBattlefieldPositions() - Get the number of positions available from GetBattlefieldPosition().

GetNumBattlefields() - Get the number of running battlefields for the last battleground queue window you opened.

GetNumBattlefieldScores() - Returns the number of scores(players) listed in the battlefield scoreboard.

GetNumBattlefieldStats() - Get the number of battleground specific columns.

GetNumWorldStateUI() - Get the number of WorldState UI's.

GetSelectedBattlefield() - Get the selected battlefield to join first.

GetWintergraspWaitTime() - Get the number of seconds until the next Wintergrasp battle. Returns nil if battle is in progress.

GetWorldStateUIInfo(i) - Get score and flag status within a battlefield.

IsPVPTimerRunning()

JoinBattlefield(index, joinAs) - Queue for a battleground either solo or as a group.

LeaveBattlefield() - Leave the current battlefield

ReportPlayerIsPVPAFK("unit") - Reports the specified player as AFK in a battleground.

RequestBattlefieldPositions() - Request new data for GetBattlefieldPosition().

RequestBattlefieldScoreData() - Request new data for GetBattlefieldScore().

RequestBattlegroundInstanceInfo(index) - Requests data about the available instances of a battleground.

SetBattlefieldScoreFaction(faction) - Set the faction to show on the battlefield scoreboard.

SetSelectedBattlefield(index) - Select the battlefield instance you want to join or the first one that becomes available.

ShowBattlefieldList(index) - Displays a queue window for the specified battlefield. Only works if you are already in a queue for the battlefield. Index corresponds to location in queue array.

Buff/Debuff[]

CancelUnitBuff("unit", index or "spell" ,"filter" or "rank") - 移除特定單位的特定增益("單位", "編號/法術名稱", "等級").

CancelItemTempEnchantment(weaponHand) - 取消臨時性武器副魔 (1:主手, 2:副手).

GetWeaponEnchantInfo() - 回傳主手/副手副魔.

UnitAura("unit", index or "buffName" ,filter) - 回傳特定單位的增益/減益訊息.

UnitBuff("unit", index or "buffName" ,castable) - 回傳特定單位的增益.

UnitDebuff("unit", index or "buffName" ,removable) - 回傳特定單位的減益.

行事曆[]

CalendarAddEvent() - 增加新事件 (指能新增新事件)

CalendarCanAddEvent() - 若玩家可以新增事件, 回傳真

CalendarCanSendInvite() - 若玩家可以邀請, 回傳真

CalendarCloseEvent() - 不儲存且關閉所指定事件

CalendarContextDeselectEvent() - 取消事件. V3.0.8 新增

CalendarContextEventCanComplain(monthOffset, day, eventIndex) - 若玩家可回報垃圾事件, 回傳真

CalendarContextEventCanEdit(monthOffset, day, eventIndex) - 若玩家可編輯事件, 回傳真

CalendarContextEventClipboard() - 事件剪貼簿

CalendarContextEventComplain(monthOffset, day, eventIndex) - 提報垃圾事件

CalendarContextEventCopy(monthOffset, day, eventIndex) - 複製事件到剪貼簿

CalendarContextEventPaste(monthOffset, day) - 貼上簡貼簿到事件

CalendarContextEventRemove(monthOffset, day, eventIndex) - 刪除事件

CalendarContextGetEventIndex() - 取得事件編號. V3.0.8 新增

CalendarContextInviteAvailable(monthOffset, day, eventIndex) - 接受邀請事件.

CalendarContextInviteDecline(monthOffset, day, eventIndex) - 拒絕邀請事件.

CalendarContextInviteIsPending(monthOffset, day, eventIndex) - 若玩家對邀請事件無回應, 回傳真.

CalendarContextInviteModeratorStatus(monthOffset, day, eventIndex) - 事件邀請主持人.

CalendarContextInviteRemove(monthOffset, day, eventIndex) - 自行事曆中移除事件.

CalendarContextInviteStatus(monthOffset, day, eventIndex) - 回傳邀請狀態.

CalendarContextSelectEvent(monthOffset, day, eventIndex) - 回傳所指定事件. V3.0.8 新增

CalendarDefaultGuildFilter() - returns minLevel, maxLevel

CalendarEventAvailable() - Accepts the inviation to the currently open event

CalendarEventCanEdit() - Returns true if the event can be edited

CalendarEventClearAutoApprove() - Turns off automatic confirmations

CalendarEventClearLocked() - Unlocks the event

CalendarEventClearModerator()

CalendarEventDecline() - Declines the invitation to the currently open event

CalendarEventGetInvite(inviteeIndex) - Returns status information for an invitee for the currently opened event

CalendarEventGetInviteSortCriterion() - returns criterion, reverse

CalendarEventGetNumInvites() - Returns the number of invitees for the currently opened event

CalendarEventGetRepeatOptions() - Returns opt1, opt2

CalendarEventGetSelectedInvite() - returns inviteIndex

CalendarEventGetStatusOptions() - Returns ??

CalendarEventGetTextures(eventType) - Returns title1, tex1, expLvl1, title2, tex2, expLvl2, ...

CalendarEventGetTypes() - Returns name1, name2, ...

CalendarEventHasPendingInvite() - Returns true if the player has an unanswered invitation to the currently selected event

CalendarEventHaveSettingsChanged() - Returns true if the currently open event has been modified

CalendarEventInvite("Player") - Invite player to currently selected event

CalendarEventIsModerator() - ?

CalendarEventRemoveInvite(inviteIndex)

CalendarEventSelectInvite(inviteIndex)

CalendarEventSetAutoApprove()

CalendarEventSetDate(month, day, year)

CalendarEventSetDescription(description)

CalendarEventSetLocked()

CalendarEventSetLockoutDate(lockoutDate) - ??

CalendarEventSetLockoutTime(lockoutTime) - ??

CalendarEventSetModerator(index)

CalendarEventSetRepeatOption(repeatoption)

CalendarEventSetSize - ??

CalendarEventSetStatus(index, status) - Sets the invitation status of a player to the current event

CalendarEventSetTextureID(textureIndex)

CalendarEventSetTime(hour, minute)

CalendarEventSetTitle(title)

CalendarEventSetType(type)

CalendarEventSortInvites(criterion)

CalendarGetAbsMonth() - returns month, year

CalendarGetDate() - Call this only after PLAYER_ENTERING_WORLD event

CalendarGetDayEvent(monthOffset, day, eventIndex)

CalendarGetEventIndex() - returns monthOffset, day, index

CalendarGetEventInfo() - Returns detailed information about an event selected with CalendarOpenEvent()

CalendarGetFirstPendingInvite(monthOffset, day) - returns eventIndex

CalendarGetHolidayInfo(monthOffset, day, eventIndex)

CalendarGetMaxCreateDate() - returns maxWeekday, maxMonth, maxDay, maxYear

CalendarGetMaxDate() - returns maxWeekday, maxMonth, maxDay, maxYear

CalendarGetMinDate() - returns minWeekday, minMonth, minDay, minYear

CalendarGetMinHistoryDate() - returns minWeekday, minMonth, minDay, minYear

CalendarGetMonth(monthOffset) - returns month, year

CalendarGetMonthNames() - returns a list of the month names

CalendarGetNumDayEvents(monthOffset, day)

CalendarGetNumPendingInvites() - returns count

CalendarGetRaidInfo (monthOffset, day, eventIndex) - returns name, calendarType, raidID, hour, minute, difficulty

CalendarGetWeekdayNames() - returns a list of the weekday names

CalendarIsActionPending() - returns isPending

CalendarNewEvent() - Creates and selected a new event

CalendarNewGuildEvent(minLevel, maxLevel, minRank) - Replaces the invite list of the selected new event with the specified guild members

CalendarOpenEvent(monthOffset, day, eventIndex) - Selects an existing event

CalendarRemoveEvent() - Removes the selected event from the calendar (invitees only)

CalendarSetAbsMonth(month, year) - Sets the reference month and year for functions which use a month offset

CalendarSetMonth(monthOffset)

CalendarUpdateEvent() - Saves the selected event (existing events only, requires hardware input to call)

OpenCalendar() - New in 3.0.8

視角[]

Mouse Look refers to holding down the right mouse button and controlling the movement direction. Shifting the view by holding down the left mouse button is not covered by these APIs.

PROTECTED CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - Protected)

PROTECTED CameraOrSelectOrMoveStop(stickyFlag) - End "Left click" in the 3D world. (1.10 - Protected)

CameraZoomIn(increment) - Zooms the camera into the viewplane by increment.

CameraZoomOut(increment) - Zooms the camera out of the viewplane by increment.

FlipCameraYaw(degrees) - Rotates the camera about the Z-axis by the angle amount specified in degrees.

IsMouselooking() - Returns 1 if mouselook is currently active, nil otherwise.

MouselookStart()

MouselookStop()

MoveViewDownStart() - Begins rotating the camera downward.

MoveViewDownStop() - Stops rotating the camera after MoveViewDownStart() is called.

MoveViewInStart() - Begins zooming the camera in.

MoveViewInStop() - Stops zooming the camera in after MoveViewInStart() is called.

MoveViewLeftStart() - Begins rotating the camera to the Left.

MoveViewLeftStop() - Stops rotating the camera after MoveViewLeftStart() is called.

MoveViewOutStart() - Begins zooming the camera out.

MoveViewOutStop() - Stops zooming the camera out after MoveViewOutStart() is called.

MoveViewRightStart() - Begins rotating the camera to the Right.

MoveViewRightStop() - Stops rotating the camera after MoveViewRightStart() is called.

MoveViewUpStart() - Begins rotating the camera upward.

MoveViewUpStop() - Stops rotating the camera after MoveViewUpStart() is called.

PROTECTED PitchDownStart() - Begins pitching the camera Downward.

PROTECTED PitchDownStop() - Stops pitching the camera after PitchDownStart() is called.

PROTECTED PitchUpStart() - Begins pitching the camera Upward.

PROTECTED PitchUpStop() - Stops pitching the camera after PitchUpStart() is called.

NextView() - Cycles forward through the five predefined camera positions.

PrevView() - Cycles backward through the five predefined camera positions.

ResetView(index) - Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index).

SaveView(index) - Replaces the specified (1-5) predefined camera positions with the current camera position.

SetView(index) - Sets camera position to a specified (1-5) predefined camera position

頻道[]

Mouse Look refers to holding down the right mouse button and controlling the movement direction. Shifting the view by holding down the left mouse button is not covered by these APIs.

PROTECTED CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - Protected)

PROTECTED CameraOrSelectOrMoveStop(stickyFlag) - End "Left click" in the 3D world. (1.10 - Protected)

CameraZoomIn(increment) - Zooms the camera into the viewplane by increment.

CameraZoomOut(increment) - Zooms the camera out of the viewplane by increment.

FlipCameraYaw(degrees) - Rotates the camera about the Z-axis by the angle amount specified in degrees.

IsMouselooking() - Returns 1 if mouselook is currently active, nil otherwise.

MouselookStart()

MouselookStop()

MoveViewDownStart() - Begins rotating the camera downward.

MoveViewDownStop() - Stops rotating the camera after MoveViewDownStart() is called.

MoveViewInStart() - Begins zooming the camera in.

MoveViewInStop() - Stops zooming the camera in after MoveViewInStart() is called.

MoveViewLeftStart() - Begins rotating the camera to the Left.

MoveViewLeftStop() - Stops rotating the camera after MoveViewLeftStart() is called.

MoveViewOutStart() - Begins zooming the camera out.

MoveViewOutStop() - Stops zooming the camera out after MoveViewOutStart() is called.

MoveViewRightStart() - Begins rotating the camera to the Right.

MoveViewRightStop() - Stops rotating the camera after MoveViewRightStart() is called.

MoveViewUpStart() - Begins rotating the camera upward.

MoveViewUpStop() - Stops rotating the camera after MoveViewUpStart() is called.

PROTECTED PitchDownStart() - Begins pitching the camera Downward.

PROTECTED PitchDownStop() - Stops pitching the camera after PitchDownStart() is called.

PROTECTED PitchUpStart() - Begins pitching the camera Upward.

PROTECTED PitchUpStop() - Stops pitching the camera after PitchUpStart() is called.

NextView() - Cycles forward through the five predefined camera positions.

PrevView() - Cycles backward through the five predefined camera positions.

ResetView(index) - Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index).

SaveView(index) - Replaces the specified (1-5) predefined camera positions with the current camera position.

SetView(index) - Sets camera position to a specified (1-5) predefined camera position

角色[]

聊天視窗[]

溝通[]

同伴(載具/觀賞寵物)[]

載具/觀賞寵物相關, 於3.0中介紹.

CallCompanion(TypeID, slotid) - 招喚同伴.

DismissCompanion(TypeID) - 解散同伴.

GetCompanionInfo(TypeID, slotid) - 回傳特定同伴的訊息.

GetNumCompanions(TypeID) - 取得特定同伴的名稱.

GetCompanionCooldown(TypeID, index) - 回傳特定同伴的冷卻時間.

PickupCompanion(TypeID, index) - 移動滑鼠到特訂同伴.

容器/背包[]

管理背包. 另見庫存/銀行

ContainerIDToInventoryID(bagID)

GetBagName(bagID) - 取得玩家容器名稱.

GetContainerItemCooldown(bagID, slot)

GetContainerItemInfo(bagID, slot) -取得玩家容器中特定位置的資訊.

GetContainerItemLink(bagID, slot) - 取得玩家特定容器中特訂位子的物品連結.

GetContainerNumSlots(bagID) - 取得玩家特定容器中的空位.

GetContainerNumFreeSlots(bagID) - 取得玩家特定容器中的剩餘空位. V2.4 增加

HasKey() - 玩家有鑰匙圈則回傳1; 回傳0.

UI OpenAllBags() - 打開所有背包.

UI CloseAllBags() - 關閉所有背包.

PickupBagFromSlot(slot) - 取出特定空位的背包, 並移到滑鼠.

PickupContainerItem(bagID,slot)

PutItemInBackpack() - 嘗試把物品放進大背包 (背包空位:0).

PutItemInBag(inventoryId) - 嘗試把物品放進背包.

UI PutKeyInKeyRing() - 嘗試把物品放進鑰匙圈.

SplitContainerItem(bagID,slot,amount)

UI ToggleBackpack() - 切換背包的開關.

UI ToggleBag(bagID) - 打開/關閉特定的背包.

PROTECTED (Situational) UseContainerItem(bagID, slot[, onSelf]) - Uses an item located in bag# and slot#. (Warning: If a vendor window is open, using items in your pack may sell them!) - 'onSelf' added in 1.12

貨幣[]

游標[]

除錯[]

ConsoleAddMessage(message) - New in 3.0.8

debugprofilestart() - starts a timer for profiling during debugging.

debugprofilestop() - return the time in milliseconds since the last call to debugprofilestart()

debugstack(start, count1, count2) - Returns a string representation of the current calling stack (as of 1.9)

FrameXML_Debug(flag) - Sets FrameXML logging state which is output to /WoW Folder/Logs/FrameXML.log

GetDebugStats()

getprinthandler()

print(...)

setprinthandler(func)

tostringall(...)

table.wipe(table) - removes all entires from table

wipe(table) - alias for table.wipe

更衣間[]

地城搜尋器[]

交易[]

裝備管理員[]

Faction Functions[]

Frame Management[]

FrameXML API[]

好友[]

Glyph Functions[]

GM[]

Gossip Functions[]

團隊[]

公會[]

公會銀行[]

榮譽系統[]

忽略[]

Inspection Functions[]

副本[]

背包物品[]

物品[]

物品文字[]

Knowledge Base Functions[]

區域[]

尋找團隊[]

戰利品[]

巨集[]

郵件[]

地圖[]

商人[]

移動[]

音樂播放器[]

寵物[]

Petition Functions[]

任務[]

團隊[]

團隊瀏覽器[]

Recruit-a-Friend Functions[]

Script Profiling Functions[]

安全與保護[]

設定[]

技能[]

施法[]

系統[]

天賦[]

目標[]

Taxi Functions[]

Toggle Functions[]

交易技能[]

追蹤技能[]

Trading Function[]

Training Functions[]

單位[]

坐騎[]

語音交談[]

Who指令[]

函式(英文版)[]

翻譯原網站函式庫:http://www.wowwiki.com/World_of_Warcraft_API

所有項目 (1)

E
Advertisement