< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来.
Group Functions (组队功能函数)
AcceptGroup() - Accept the invitation to party.
ConvertToRaid() - Converts party to raid.
DeclineGroup() - Decline the invitation to a party.
GetLookingForGroup()
GetLootMethod() - Return the currently active loot method
GetLootThreshold() - Return the current loot threshold (for group loot)
GetMasterLootCandidate() - Return the player who receives loot in master mode
GetNumPartyMembers() - Returns the number of party members
GetPartyLeaderIndex()
GetPartyMember(id) - Returns the index of the party member at the given index if that party slot is filled, otherwise nil.
InviteByName("name") - Invites the specified player to the group sender is currently in.
InviteToParty("unit") - Invite a unit to a party.
IsPartyLeader() - Returns true if the player is the party leader.
LeaveParty() - Quit the party.
PromoteByName("name") - Promotes by name the target.
PromoteToPartyLeader("unit") - Promote a unit to party leader.
SetLookingForGroup(flag)
SetLootMethod("method"{,"masterPlayer" or ,threshold}) - Set the current loot method
SetLootThreshold(threshold) - Set the threshold for group loot
SplitMoney("goldsilvercopper")
UninviteByName("name") - Uninvites (kicks) the target from the current group if player is group leader.
UninviteFromParty("unit") - Kick a unit from the party if player is group leader.
UnitInParty("unit") - Returns true if the unit is a member of your party.
UnitIsPartyLeader("unit") - Returns true if the unit is the leader of its party.
Guild Functions (公会功能函数)
AcceptGuild() - The player accepts the invitation to join a guild.
BuyGuildCharter("guildName") - Purchases a guild charter for guildName.
CanEditMOTD() - Returns true if you are allowed to edit the guild motd.
CanEditOfficerNote() - Returns true if you are allowed to edit a guild member’s officer note.
CanEditPublicNote() - Returns true if you are allowed to edit a guild member’s public note.
CanGuildDemote() - Returns true if you are allowed to demote a guild member.
CanGuildInvite() - Returns true if you are allowed to invite a new member to the guild.
CanGuildPromote() - ?.
CanGuildRemove() - ?.
CanViewOfficerNote() - ?.
CloseGuildRegistrar() - ?.
CloseGuildRoster() - ?.
CloseTabardCreation()
DeclineGuild() - ?.
GetGuildCharterCost() - Returns the cost of purchasing a guild charter.
GetGuildInfo("unit") - This function returns the name of the guild unit belongs to.
GetGuildRosterInfo(index) - This function is used to get info on members in the guild.
GetGuildRosterLastOnline(index) - ?.
GetGuildRosterMOTD() - ?.
GetGuildRosterSelection() - Returns the index of the current selected guild member.
GetGuildRosterShowOffline() - Returns true if showing offline members of the guild.
GetNumGuildMembers() - ?.
GetTabardCreationCost()
GetTabardInfo() -?.
GuildControlAddRank("name") - ?.
GuildControlDelRank - ?.
GuildControlGetNumRanks() - ?.
GuildControlGetRankFlags() - ?.
GuildControlGetRankName(index) - ?.
GuildControlSaveRank("name") - ?.
GuildControlSetRank(rank) - ?.
GuildControlSetRankFlag(index, enabled) - ?.
GuildDemoteByName("name") - ?.
GuildDisband() - ?.
GuildInfo() - Displays information about the guild you are a member of.
GuildInviteByName("name") - ?.
GuildLeave() - ?.
GuildPromoteByName("name") - ?.
GuildRoster() - Fetches the guild list and fires a GUILD_ROSTER_UPDATE event.
GuildRosterSetOfficerNote(index, "note") - ?.
GuildRosterSetPublicNote(index, "note") - ?.
GuildSetLeaderByName("name") - ?.
GuildSetMOTD("note") - ?.
GuildUninviteByName("name") - ?.
IsGuildLeader() - ?.
IsInGuild() - Lets you know whether you are in a guild.
SetGuildRosterSelection(index) - ?.
SetGuildRosterShowOffline(enabled) - Sets/Resets the show offline members flag.
SortGuildRoster("sort") - ?.
TurnInGuildCharter() - ?.
Honor Functions (荣誉系统函数)
GetInspectHonorData() - Return honor info for the inspected unit (if available).
GetInspectPVPRankProgress - ?.
GetPVPLastWeekStats() - Get your PvP/Honor statistics for last week.
GetPVPLifetimeStats() - Get your PvP/Honor statistics for your lifetime.
GetPVPRankInfo(rank{,unit}) - Get information about a specific PvP rank.
GetPVPRankProgress() - Get information about the PvP rank progress.
GetPVPSessionStats() - Get your PvP/Honor statistics for this session.
GetPVPThisWeekStats() - Get your PvP/Honor statistics for this week.
GetPVPYesterdayStats() - Get your PvP/Honor statistics for yesterday.
HasInspectHonorData() - Determine if the inspected unit’s honor data is available.
RequestInspectHonorData() - Request honor data for inspected unit.
UnitIsCivilian - ?.
UnitPVPName("unit") - ?.
UnitPVPRank("unit") - Get PvP rank information for requested unit.
Ignore Functions (黑名单函数)
AddIgnore("name") - Add a player to your ignore list.
AddOrDelIgnore("name") - Toggles the ignore state of the specified name.
DelIgnore("name") - Delete a player from your ignore list.
GetIgnoreName(index) - Get the name of the player on your ignore list at index.
GetNumIgnores() - Get the number of players on your ignore list.
GetSelectedIgnore()
SetSelectedIgnore(index)
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: