Lua wow插件

?找回密码
?注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 10781|365滚球盘最终比分_365滚球数据_365滚球动画: 1
打印 上一主题 下一主题

【资料】函数:暴雪魔兽世界函数(中文) [复制链接]

Rank: 9Rank: 9Rank: 9

在线时间
2699 小时
注册时间
2008-9-15
积分
2522
跳转到指定楼层
1#
发表于 2009-7-9 15:58:16 |只看该作者 |倒序浏览
魔兽世界API函数:http://wiki.cwowaddon.com/WoWAPI
LUA 函数:http://wiki.cwowaddon.com/Lua%E5%87%BD%E6%95%B0

其他资料:
http://www.cnblogs.com/apexaddon/articles/1486622.html
http://blog.csdn.net/firebird321/archive/2008/05/23/2474053.aspx
http://wiki.cwowaddon.com/
http://www.wowwiki.com/index.php/World_of_Warcraft_API#Action_Functions
http://hi.baidu.com/misstis/blog/item/36eb53230b7589509822edb7.html

行为函数 (Activity Functions)


这个部分的函数会引发玩家角色的动作(未在别处加以保护, 非简单确认步骤)






插件函数 (AddOn Functions)






竞技场函数(Arena Functions)


  • ArenaTeamInviteByName(teamIndex, playerName) - Invites the specified player 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).
    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
    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.
    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.
    GetBattlefieldTeamInfo(index) - Gets info about a registered Arena Team at the end of an arena match.
    GetCurrentArenaSeason() - Gets the current 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




拍卖函数 (Auction Functions)






银行函数 (Bank Functions)






战场函数 (Battlefield Functions)






绑定函数(Binding Functions)






增减益函数 (Buff/Debuff Functions)


请勿混淆 buffId buffIndex, 这是不同概念!






视角函数 (Camera Functions)


下列 API 仅对鼠标观察模式提供的按下右键和控制移动方向功能. 不支持按下鼠标左键切换视角.






频道函数 (Channel Functions)


这些是针对聊天频道的函数. 同时参看聊天窗口函数 (Chat Window Functions) 和通信函数 (Communication Functions) 部分.






角色函数 (Character Functions)






聊天窗口函数 (Chat Window Functions)


下列是聊天窗口管理函数. 情同时参考频道函数 (Channel Functions) 通信函数(Communication Functions) 部分.






评论函数 (Commentator Functions)


此类别的函数都是被保护的.据推测这些函数是用来观看竞技场比赛的






交流函数 (Communication Functions)


主要与其他玩家进行交流设置的函数.另外你可以参考频道函数和聊天窗口函数.


  • DoEmote("emote"[, "target"]) - 做出表情, 对目标做出表情.
    GetDefaultLanguage("unit") - 返回目标单位登陆后默认的语言.
    GetLanguageByIndex(index) - Returns the language specified by the index.
    GetNumLaguages() - 返回你的角色能够说的语言数量(怀疑打错了).
    RandomRoll(low, high) - lowhigh之间产生一个随机数.
    SendAddonMessage("prefix", "text", "type") - 在隐藏的频道中发送信息. - (添加于 1.12)
    SendChatMessage("text"[, "type"[, language[, targetPlayer]]]) - 发送信息.




包裹函数 (Container/Bag Functions)


此类别的函数主要管理你的背包 (背包, 物品袋).你也可以参考背包函数和银行函数.






手艺函数 (Crafting Functions)


此类函数代替老的制作物品类函数,除此之外还有附魔和猎人宠物窗口 (你可以参考商业技能函数)附魔在界面打开的情况这些函数只有在使用时才能生效。你可以使用GetCraftSkillLine()来获取当前打开的商业技能面板中的技能。






光标函数 (Cursor Functions)






调试函数 (Debugging Functions)


  • debugprofilestart() - starts a timer for profiling during debugging.
    debugprofilestop() - return the time in milliseconds since the last call to debugprofilestart()
    FrameXML_Debug(flag) - Sets FrameXML logging state which is output to /WoW Folder/Logs/FrameXML.log
    GetDebugStats()
    debugstack(start, count1, count2) - Returns a string representation of the current calling stack (as of 1.9)




禁用函数 (Disabled Functions)


这些函数存在, 但被完全禁用了.






试衣间函数 (Dressing Room Functions)


控制试衣间界面的函数. 新增于版本1.7.






附魔函数 (Enchanting Functions)






声望函数 (Faction Functions)


  • CollapseFactionHeader(index) - Collapse a faction header row.
    ExpandFactionHeader(index) - Expand a faction header row.
    FactionToggleAtWar(index) - Toggle the At War flag for a faction.
    GetFactionInfo(index) - Gets details for a specific faction/faction header.
    GetNumFactions() - Returns the number of lines in the faction display.
    GetSelectedFaction() - Returns the row index of the currently selected faction in reputation window. (New in 1.10)
    GetWatchedFactionInfo() - Returns information about the currently watched faction. (New in 1.10)
    IsFactionInactive(index) - Returns true if the faction is marked inactive. (New in 1.10)
    SetFactionActive(index) - Remove a faction from inactive group. (New in 1.10)
    SetFactionInactive(index) - Move a faction to inactive group. (New in 1.10)
    SetSelectedFaction(index) - Sets the currently selected faction in reputation window. (New in 1.10)
    SetWatchedFactionIndex(index) - Sets which faction should be watched in Blizzard reputation bar. (New in 1.10)
    UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "Alliance") - string returned is localization-independent (used in filepath)




框架管理 (Frame Management)


  • CreateFrame("frameType"[ ,"name"][, parent][, "inheritFrame"]) - Create a new frame of the specified type
    CreateFont("name") - Dynamically create a font object
    GetFramesRegisteredForEvent(event) - Returns a list of frames that are registered for the given event. - 新增于2.3
    GetNumFrames() - Get the current number of Frame (and derivative) objects
    EnumerateFrames(currentFrame) - Get the Frame which follows currentFrame
    GetMouseFocus() - Returns the frame that currently has the mouse focus.
    界面
    MouseIsOver - Determines whether or not the mouse is over the specified frame.
    PetActionBarFrame:Show(), :Hide() - Shows or hides the Pet Actionbar Frame for players with pets. (Workaround for the petbar issue)
    界面
    ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)
    界面
    UIFrameFadeIn(frame, fadeTime, startAlpha, endAlpha)
    界面
    UIFrameFlash(...)




好友函数 (Friend Functions)


  • AddFriend("playerName") - 添加一位玩家到好友列表.
    GetFriendInfo(index) - 返回对应好友的名字,等级,职业,位置和在线状态.
    GetNumFriends() - 返回你的好友数.
    GetSelectedFriend() - 返回你当前选中好友的索引号.
    RemoveFriend("name" or index) - 从好友列表中移除一位好友
    SetSelectedFriend(index) - Update the current selected friend.
    ShowFriends() - Request updated friends information from server.
    界面
    ToggleFriendsFrame([tabNumber]) - Opens/closes the friends pane (possibly on a specific tab).




GM 函数 (GM Functions)






闲聊函数 (Gossip Functions)






队伍函数 (Group Functions)


同样可以查看: 团队函数






公会函数 (Guild Functions)






公会银行函数(Guild Bank Function)


所有函数新增于版本2.3






荣誉函数 (Honor Functions)






屏蔽函数 (Ignore Functions)






检测函数 (Inspection Functions)






副本函数(Instance Functions)






背包函数 (Inventory Functions)


这些函数主要管理你的"背包",已装备的物品.同样可以查看包裹函数银行函数.






物品函数 (Item Functions)


这些函数主要利用物品链接或者是物品信息进行各种操作.同时还可以参考包裹函数以及背包函数.






物品描述函数 (Item Text Functions)


描述物品信息






按键绑定函数 (Key Binding Functions)


  • GetBinding(index) - Get action and key bindings for that index.
    GetBindingAction("key") - Get the action bound to that key.
    GetBindingKey("command") - Get the key(s) bound to that action.
    界面
    GetBindingText("key", "prefix") - Gets the string value for the key.
    GetCurrentBindingSet() - Queries if current set of key bindings is character or account specific
    GetNumBindings() - Get total number key bindings and headers.
    LoadBindings(which) - Loads default, account or character specific key binding set into memory from disk.
    RunBinding("command"[, "up"]) - Executes the key binding named "command"
    SaveBindings(which) - Saves account or character specific key bindings from memory to disk.
    SetBinding("key"[, "command"]) - Sets or unsets key bindings.
    SetConsoleKey("key") - Sets the console key (normally "`").




基础知识函数 (Knowledge Base Functions)






寻求组队函数(Looking For Group Functions)


用于寻求组队






地区函数 (Location Functions)


返回当前玩家所在区域信息






拾取函数 (Loot Functions)






彩票函数(Lottery Functions)






宏函数 (Macro Functions)






邮件函数 (Mail Functions)


邮件相关事件.




  • CheckInbox() - 从服务器接收数据放置到客户端的收件箱中.
    ClearSendMail() - 清除发送邮件表格并将附件放回包裹. --Bug 15:52, 6 Feb 2005 (EST)
    ClickSendMailItemButton() - This seems to just simulate a click on the send item mail slot (will pickup the item there). --Bug 18:59, 4 Feb 2005 (EST)
    CloseMail() - 关闭邮件窗口. --Bug 19:04, 4 Feb 2005 (EST)
    DeleteInboxItem(index) - Deletes the inbox item at index. It returns immediately, it does not seem to wait for the deletion to go through, giving the normal problems with rapid mail removal attempts.
    DropCursorMoney - Drops the amount of money held by the cursor.
    GetCoinIcon(amount)
    GetInboxHeaderInfo(index) - 返回收件箱标题信息.
    GetInboxItem(index) - Returns description of the attachment attached to message at (index).
    GetInboxNumItems() - 返回收件箱中邮件数.
    GetInboxText(index) - Returns the message text of message at (index). It also reads the inbox item, thus reducing its timeout to <= 3 days.
    GetInboxInvoiceInfo(index) - Returns informations about an auction house invoice. It also reads the inbox item, thus reducing its timeout to <= 3 days.
    GetNumPackages() - Not yet fully implemented. Currently it always returns 1. --Bug 16:28, 6 Feb 2005 (EST)
    GetNumStationeries() - Not yet fully implemented. Currently it always returns 1. --Mikk 17:03, 17 May 2006 (EDT)
    GetPackageInfo(index) - Not yet fully implemented. Currently an index of 1 returns "Test Package". --Bug 16:28, 6 Feb 2005 (EST)
    GetSelectedStationeryTexture() - Not yet fully implemented. Currently it returns "STATIONERYTEST" when the mailbox is open. --Bug 16:28, 6 Feb 2005 (EST)
    GetSendMailCOD() - ?.
    GetSendMailItem() - ?.
    GetSendMailMoney() - ?.
    GetSendMailPrice() - ?.
    GetStationeryInfo(index) - Not yet fully implemented. Currently an index of 1 returns "Default Stationery". --Mikk 17:03, 17 May 2006 (EDT)
    HasNewMail() - Returns nil if there is no new mail. --Bug 19:14, 4 Feb 2005 (EST)
    InboxItemCanDelete(index) - ?.
    ReturnInboxItem(index) - Returns to the sender the attached item in the mail message at the specified index.
    SelectPackage(index) - Not yet fully implemented. It does nothing visible. --Bug 16:28, 6 Feb 2005 (EST)
    SelectStationery(index) - Not yet fully implemented. It does nothing visible. --Bug 16:28, 6 Feb 2005 (EST)
    SendMail("target", "subject", "body") - If the mailbox is open, this sends mail. --Buttahcup 4 Feb 2005
    保护
    SetSendMailCOD(amount) - Make next mail sent using SendMail() COD target for amount. --Drundia 21:30, 25 April 2006 (EDT)
    保护
    SetSendMailMoney(amount) - Add money to next mail sent using SendMail(). --Drundia 21:30, 25 April 2006 (EDT)
    TakeInboxItem(index) - 收取收件箱中的附件.
    TakeInboxMoney(index) - 收取收件箱中的金钱. --Drundia 21:30, 25 April 2006 (EDT)
    TakeInboxTextItem(index) - Creates a permanent copy of letter (readable "Plain Letter") --Drundia 21:30, 25 April 2006 (EDT).




地图函数 (Mapping Functions)


下列是世界地图显示相关函数.








集合石函数 (Meeting Stone Functions)








商人函数 (Merchant Functions)








移动函数 (Movement Functions)


Use with caution - movement started by a script must be stopped by script. Keys/Mouse will not stop movement. These functions no longer work (fail silently) in patch 1.6 if NOT triggered from a hardware event (just like spell casts). As of patch 1.10 many of these functions were protected for use of only Blizzard signed code.




  • 保护
    CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - 保护)
    保护
    CameraOrSelectOrMoveStop([stickyFlag]) - End "Left click" in the 3D world. (1.10 - Protected)
    FollowByName("name"[, exactMatch]) - Follow a player with the specified player name
    FollowUnit("unit") - Follow an ally with the specified UnitID
    保护
    Jump() - The player jumps.
    保护
    MoveBackwardStart - The player begins moving backward at the specified time.
    保护
    MoveBackwardStop - The player stops moving backward at the specified time.
    保护
    MoveForwardStart - The player begins moving forward at the specified time.
    保护
    MoveForwardStop - The player stops moving forward at the specified time.
    保护
    StrafeLeftStart - The player begins strafing left at the specified time.
    保护
    StrafeLeftStop - The player stops strafing left at the specified time.
    保护
    StrafeRightStart - The player begins strafing right at the specified time.
    保护
    StrafeRightStop - The player stops strafing right at the specified time.
    保护
    ToggleAutoRun - Turns auto-run on or off
    ToggleMouseMove()
    保护
    ToggleRun - Toggle between running and walking.
    保护
    TurnLeftStart - The player starts turning left at the specified time.
    保护
    TurnLeftStop - The player stops turning left at the specified time.
    保护
    TurnOrActionStart() - Begin "Right Click" in the 3D world. (1.10 - 保护)
    保护
    TurnOrActionStop() - End "Right Click" in the 3D world. (1.10 - 保护)
    保护
    TurnRightStart - The player starts turning right at the specified time.
    保护
    TurnRightStop - The player stops turning right at the specified time.




音乐播放器 (Music Player Functions)


下列指令仅作用于 Mac iTunes








宠物函数 (Pet Functions)








Petition Functions








任务函数 (Quest Functions)


同时参考闲聊函数 (Gossip Functions)








团队函数 (Raid Functions)


See also: Group Functions








Security and Protection Functions


  • issecure() - Determine if the current environment is secure.
    issecurevariable([table] ,name) - Determine if the specified variable is secure.
    securecall(function or functionName, ...) - Call a function from a secure environment without risking secure status.
    hooksecurefunc([table], functionName, hookfunc) - Creates a secure 'post hook' for the named function. The hookfunc is invoked after the original function, and receives the same parameters. Return values from hookfunc are discarded. This is the only safe way to hook functions that execute protected functionality.
    InCombatLockdown() - Returns true if the in-combat AddOn restrictions are active.




设置函数 (Settings Functions)








技能函数 (Skill Functions)








施法函数 (Spell Functions)


spellID is the index of a spell in a spellbook. The indices increase from top to bottom, then left to right, then between categories (e.g.: General -> Discipline). spellIDs will change as players learn new spells and professions.








系统函数 (System Functions)




  • ConsoleExec("command") - Execute a console command.
    GetBuildInfo() - Returns information about current client build.
    界面
    geterrorhandler()
    GetFramerate() - Returns the current framerate (full precision)
    GetGameTime - Returns the time in-game.
    GetLocale() - 返回客户端的地区标识符,如 'enUS'
    GetCursorPosition() - Returns the cursor's position on the screen.
    GetNetStats() - Get bandwidth and latency network information.
    GetRealmName() - returns the name of the server a user is logged in to
    GetScreenHeight() - Returns the height of the window in pixels.
    GetScreenWidth() - Returns the width of the window in pixels.
    界面
    GetText() - Used to localize some client text.
    GetTime() - Returns the system uptime in seconds (millisecond precision).
    InCinematic()
    IsAltKeyDown() - Returns true if the alt key is currently depressed.
    IsControlKeyDown() - Returns true if the control key is currently depressed.
    IsLinuxClient() - Boolean - Returns true if WoW is being run on Linux
    IsMacClient() - Checks client system
    IsShiftKeyDown() - Returns true if the shift key is currently depressed.
    IsWindowsClient() - Returns true if WoW is being run on Windows.
    OpeningCinematic() - shows the opening movie for a player's race
    PlayMusic() - Plays the specified mp3.
    PlaySound() - Plays the specified built-in sound effect.
    PlaySoundFile() - Plays the specified sound file.
    ReloadUI() - Reloads the UI from source files
    RepopMe() - The "Release Spirit" button. Sends you to the graveyard when dead. -Moof
    RequestTimePlayed() - Request a summary of time played from the server.
    RestartGx() - Restarts the graphical engine. Needed for things such as resolution changes to take effect.
    RunScript("script") - Execute "script" as a block of LUA code.
    Screenshot() - Takes a screenshot.
    界面
    SecondsToTime - Converts a number of seconds into a readable days / hours / etc. formatted string.
    界面
    seterrorhandler(function)
    StopCinematic()
    StopMusic() - Stops the currently playing mp3.
    界面
    UIParentLoadAddOn("AddOnName") - Loads or Reloads the specified AddOn, and pops up an error message if it fails to load for any reason.
    界面
    TakeScreenshot() - Takes a screenshot.
    界面
    _ERRORMESSAGE(value) - Displays the script error dialog with optional text
    debuginfo() - Output win32 debug text. Freeware debug message viewer: DebugView (Has no effect on live server)
    getglobal("object") - Given an object name will return the object itself.
    界面
    message("text") - Displays a message box with your text message and an "Okay" button.
    setglobal("object", value) - set the global "object" to the given value.




天赋函数 (Talent Functions)








目标函数 (Targetting Functions)




补充


这些目标函数都是
受保护的函数(PROTECTED)仅能在安全代码(secure code)中才能调用他们






Taxi Functions








系统界面函数 (Toggle Functions)








商业技能函数 (TradeSkill Functions)








交易函数 (Trading Functions)








训练函数 (Training Functions)








Uncategorized Functions


Add functions whose group is not clear to this section, please remember to follow the Example Function template!








对象函数 (Unit Functions)


These are functions which act on one or more units. Units are identified by UnitIds. 这些是某个或某些单位(对象)行为的函数.UnitUnitId是不同的.




  • AssistUnit("unit") - Instructs your character to assist the specified unit. --协助指定单位
    CheckInteractDistance("unit",distIndex) --测试与指定单位的距离
    DropItemOnUnit("unit") - Drops an item from the cursor onto a unit. --对指定单位使用选定物品
    FollowUnit("unit") - Follow an ally with the specified UnitID --跟随指定单位
    InviteToParty("unit") - Invite a unit to a party by its unit id (likely "target") --邀请指定单位加入小队
    IsUnitOnQuest(questIndex, "unit") - Determine if the specified unit is on the given quest. --判断指定单位是否有此任务
    SpellCanTargetUnit("unit") - Returns true if the spell awaiting target selection can be cast on the specified unit. --判断是否能对指定单位使用技能
    SpellTargetUnit("unit") - Casts the spell awaiting target selection on the specified unit. --对指定单位使用选定技能
    StartDuelUnit("unit") - Challenge a unit to a duel. --对指定单位发出决斗邀请
    TargetUnit("unit") - Selects the specified unit as the current target. --选择指定单位作为当前目标
    UnitAffectingCombat("unit") - Determine if the unit is in combat or has aggro. (returns nil if "false" and 1 if "true") --判断指定单位是否在战斗状态
    UnitArmor("unit") - Returns the armor statistics relevant to the specified unit. --返回指定单位的护甲值
    UnitAttackBothHands("unit") - Returns information about the unit's melee attacks. --返回指定单位的近战攻击技能等级
    UnitAttackPower("unit") - Returns the unit's melee attack power and modifiers. --返回指定单位的近战攻击强度
    UnitAttackSpeed("unit") - Returns the unit's melee attack speed for each hand. --返回指定单位主副手的近战攻击速度
    UnitBuff("unit", index[, showCastable]) - Retrieves info about a buff of a certain unit. --返回指定单位身上指定编号的Buff信息( [, showCastable]可以不填,0或者1.1那么只返回玩家可以释放的Buff的信息)
    UnitCanAssist("unit", "otherUnit") - Returns true if the first unit can assist the second, false otherwise. --指定两个单位,判断第一单位能否协助第二单位
    UnitCanAttack("unit", "otherUnit") - Returns true if the first unit can attack the second, false otherwise. --指定两个单位,判断第一单位能否攻击第二单位
    UnitCanCooperate("unit", "otherUnit") - Returns true if the first unit can cooperate with the second, false otherwise. --指定两个单位,判断两个单位能否组队
    UnitCharacterPoints("unit") - Returns the number of unspent talent points for the specified unit -- usually 0. --返回指定单位的剩余天赋点数
    UnitClass("unit") - Returns the class name of the specified unit (e.g., "Warrior" or "Shaman"). --返回指定单位的职业(例如:圣骑士,萨满祭祀)
    UnitClassification("unit") - Returns the classification of the specified unit (e.g., "elite" or "worldboss"). --返回指定单位的厉害程度(例如:精英,世界BOSS)
    UnitCreatureFamily("unit") - Returns the type of creature of the specified unit (e.g., "Crab"). --返回指定单位的物种(例如:螃蟹)
    UnitCreatureType("unit") - Returns the classification type of creature of the specified unit (e.g., "Beast"). --返回指定单位的物种分类(例如:野兽)
    UnitDamage("unit") - Returns the damage statistics relevant to the specified unit. --返回指定单位的伤害值
    UnitDebuff("unit", index[, showDispellable]) - Retrieves info about a debuff of a certain unit. --返回指定单位身上指定编号的DeBuff信息( [, showDispellable]可以不填,0或者1.1则只返回玩家可以清除的DeBuff的信息)
    UnitDefense("unit") - Returns the base defense skill of the specified unit. --返回指定单位的基础防御技能等级
    UnitExists("unit") - Returns true if the specified unit exists, false otherwise. --判断指定单位是否在游戏中
    UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "Alliance") - string returned is localization-independent (used in filepath) --返回指定单位的阵营(例如:联盟)
    UnitHealth("unit") - Returns the current health, in points, of the specified unit. --返回指定单位的当前生命值
    UnitHealthMax("unit") - Returns the maximum health, in points, of the specified unit. --返回指定单位的最大生命值
    UnitInParty("unit") - Returns true if the unit is a member of your party. --判断指定单位是否在队伍中
    UnitInRaid("unit") - Returns 1 if unit is in your raid, nil if not. --判断指定单位是否在团队中
    UnitIsCharmed("unit") - Returns true if the specified unit is charmed, false otherwise. --判断指定单位是否同一个阵营
    UnitIsCivilian("unit") - Returns true if the unit is a civilian NPC. --判断指定单位是否平民
    UnitIsConnected("unit") - Returns 1 if the specified unit is connected or npc, nil if offline or not a valid unit. --判断指定单位是否在线
    UnitIsCorpse("unit") - Returns true if the specified unit is a corpse, false otherwise. --判断指定单位是否尸体
    UnitIsDead("unit") - Returns true if the specified unit is dead, nil if not. --判断指定单位是否死亡
    UnitIsDeadOrGhost("unit") - Returns true if the specified unit is dead or a ghost, nil if not. --判断指定单位是否死亡或灵魂状态
    UnitIsEnemy("unit", "otherUnit") - Returns true if the specified units are enemies, false otherwise. --指定两个单位,判断两个单位是否敌对
    UnitIsFriend("unit", "otherUnit") - Returns true if the specified units are friends (PC of same faction or friendly NPC), false otherwise. --指定两个单位,判断两个单位是否友好
    UnitIsGhost("unit") - Returns true if the specified unit is a ghost, false otherwise. --判断指定单位是否灵魂状态
    UnitIsPVP("unit") - Returns true if the specified unit is flagged for PVP, false otherwise. --判断指定单位是否PVP状态
    UnitIsPVPFreeForAll("unit") - Returns true if the specified unit is flagged for free-for-all PVP, false otherwise. --判断指定单位是否自由PVP状态
    UnitIsPartyLeader("unit") - Returns true if the unit is the leader of its party. --判断指定单位是否队长
    UnitIsPlayer("unit") - Returns true if the specified unit is a player character, false otherwise. --判断指定单位是否玩家
    UnitIsPlusMob("unit") - Returns true if the specified unit is a mob, more powerful than its nominal level, false otherwise (e.g., "elite" mobs) --判断指定单位是否比普通怪厉害(例如:精英)
    UnitIsTapped("unit") - Returns true if the specified unit is tapped, false otherwise. --判断指定单位是否已被攻击
    UnitIsTappedByPlayer("unit") - Returns true if the specified unit is tapped by the player himself, otherwise false. --判断指定单位是否已被其他玩家攻击
    UnitIsTrivial("unit") - Returns true if the specified unit is trivial (Trivial means the unit is "grey" to the player. false otherwise. --判断指定单位是否无价值(灰色物品)
    UnitIsUnit("unit", "otherUnit") - Determine if two units are the same unit. --指定两个单位,判断两个单位是否相同单位
    UnitIsVisible("unit") - 1 if visible, nil if not --判断指定单位是否能被看见(潜行,隐形)
    UnitLevel("unit") - Returns the level of a unit. --返回指定单位等级
    UnitMana("unit") - Returns the current mana (or energy,rage,etc), in points, of the specified unit. --返回指定单位能量值(包括魔法值,怒气值,能量值)
    UnitManaMax("unit") - Returns the maximum mana (or energy,rage,etc), in points, of the specified unit. --返回指定单位最大能量值
    UnitName("unit") - Returns the name (and realm name) of a unit. --返回指定单位名字
    UnitOnTaxi("unit") - Returns 1 if unit is on a taxi. --判断指定单位是否骑乘状态
    UnitPlayerControlled("unit") - Returns true if the specified unit is controlled by a player, false otherwise. --判断指定单位是否被玩家控制中
    UnitPlayerOrPetInParty("unit") - Returns 1 if the specified unit/pet is a member of the player's party, nil if not (returns 1 for "player" and "pet") - Added in 1.12 --判断指定单位是否同一队伍中的玩家或玩家宠物
    UnitPlayerOrPetInRaid("unit") - Returns 1 if the specified unit/pet is a member of the player's raid, nil if not (returns 1 for "player" and "pet") - Added in 1.12 --判断指定单位是否同一团队中的玩家或玩家宠物
    UnitPVPName("unit") - Returns unit's name with PvP rank prefix (e.g., "Corporal Allianceguy"). --返回指定单位军衔(例如:联盟元帅)
    UnitPVPRank("unit") - Get PvP rank information for requested unit. --返回指定单位军衔等级
    UnitPowerType("unit") - Returns a number corresponding to the power type (e.g., mana, rage or energy) of the specified unit. --返回指定单位的能量类别(例如:魔法,怒气,能量)
    UnitRace("unit") - Returns the race name of the specified unit (e.g., "Human" or "Troll"). --返回指定单位的种族(例如:人类,巨魔)
    UnitRangedAttack("unit") - Returns the ranged attack number of the unit. --返回指定单位的远程攻击技能等级
    UnitRangedAttackPower("unit") - Returns the ranged attack power of the unit. --返回指定单位的远程攻击强度
    UnitRangedDamage("unit") - Returns the ranged attack speed and damage of the unit. --返回指定单位的远程伤害值
    UnitReaction("unit", "otherUnit") - Returns a number corresponding to the reaction (aggressive, neutral or friendly) of the first unit towards the second unit. --指定两个单位,判断两个单位的关系(例如:中立,友好,敌对)
    UnitResistance("unit", "resistanceIndex") - Returns the resistance statistics relevant to the specified unit and resistance type. --返回指定单位指定魔法抗性的抗性值
    UnitSex("unit") - Returns a code indicating the gender of the specified unit, if known. (1=unknown, 2=male, 3=female) changed in 1.11! --返回指定单位的性别
    UnitStat("unit", statIndex) - Returns the statistics relevant to the specified unit and basic attribute (e.g., strength or intellect). --返回指定单位指定基础属性的属性值
    UnitXP("unit") - Returns the number of experience points the specified unit has in their current level. (only works on your player) --返回指定单位的当前经验值(只能作用于你自己)
    UnitXPMax("unit") - Returns the number of experience points the specified unit needs to reach their next level. (only works on your player) --返回指定单位到下个等级需要的经验值(只能作用于你自己)
    SetPortraitTexture(texture,"unit") - Paint a Texture object with the specified unit's portrait. --为指定单位设置一个纹理
    SetPortraitToTexture("texture", icon) - Paint a Texture object with the given Texture ? --为指定纹理设置一个纹理?




查询函数 (Who Functions)




  • GetNumWhoResults() - Return the number of entries resulting from your most recent /who query.
    GetWhoInfo(index)
    SendWho("filter") - Send a who request to the server.
    SetWhoToUI(toUIFlag) - Indicate that who request results should be delivered as WHO_LIST_UPDATE instead of to chat.
    SortWho(sortType) - Sorts an existing /who list; displays the Who List frame if not visible.


Vip

Rank: 1

在线时间
3 小时
注册时间
2012-1-30
积分
6
2#
发表于 2012-3-1 09:29:02 |只看该作者
真的好难啊~!
您需要登录后才可以回帖 登录 | 注册

Archiver|手机版|Lua wow插件 ??

GMT+8, 2019-10-8 09:13bet36备用线路 , Processed in 0.100705 second(s), 14 queries .

Powered by Discuz! X2 Licensed

? 2001-2011 Comsenz Inc.

回顶部