爱问知识人 爱问教育 医院库

魔兽世界是用什么程序语言编写的?

魔兽世界是用什么程序语言编写的?

如题

提交回答
好评回答
  • 2007-03-14 13:07:40
      魔兽世界内置了LUA这个脚本语言, 使用它可以制作更高级得宏(LUA自己提供得函数等等在魔兽得环境中只能用做辅助作用,比如你想在屏幕显示出目标怪物还剩多少生命值,你不可能在LUA本身语言库中找到任何函数来直接得出结果,而只有使用魔兽世界自身提供给开发者的相关函数), 在魔兽世界里面,你可以使用魔兽提供的函数编出任何符合LUA脚本语言语法规则的宏(由于魔兽世界里面对宏的字符个数有限制,所以为了编写更强大的宏就出现了插件,让宏成为插件被魔兽启动时导入。
      )。 LUA同时支持过程序和面向对象编程,提供一系列的数据结构,包括数组、链表、集合、散列表等;语言内置正则表达式;提供多线程支持。 由此可以看出LUA虽然只是一脚本语言,魔兽世界也为我们内置了它。 我们就可以做出任何我们想得到、在LUA语言范畴里也能达到的任何东西。
       关于LUA的语法,这里限于篇幅,不可能一一描述,建议你去LUA的官方网站( )、文档( 那里有你想知道的关于LUA这一脚本语言的任何东西 对于魔兽开发团队自己所写得函数在哪里有个明确得列表,真不好意思,我也不知道```-。- 不过我记得在更新文档中有一些``如"1。
      10。0升级补丁说明" 中有些相关的东西(具体得魔兽函数库建议查找专业网站) 用户界面 声望页面将有很大改观: 你现在可以点击声望面板里的某个阵营,以查看细节信息和相关选项。 你现在可以在以前显示经验值的地方选择显示一条某个阵营声望槽,如果你还没有到60级,那么可以显示两条更细的槽,经验和声望。
       你可以将任何阵营标记为“不显示”。这些阵营的条目会被挪到声望面板的最下面,以防你对它们进行了错误的操作。 你的经验条在60级以后就不会再显示了。这个位置将留给声望系统。 Shift-R现在会显示最后一个收到你所发出的信息的人,而不是最后一个给你发信息的人。
       购买银行的包位现在会有确认行。 所有的套装奖励,无论你是否有足够的套装组件数量都会显示,不过你尚不能得到的奖励效果会用灰色字体显示,同时会说明几件组件才能得到该奖励。 将鼠标放在邮箱的物品上将可以使你不打开邮件也能查看物品属性。
       团队选项“显示可施放的增益魔法”现在可以正常工作了。 如果使用“/who”命令查询名字后,由于查询结果很少而导致其在聊天界面直接显示,那么它们将可以被被右键点击,并显示邀请/悄悄话菜单。 修正了一个导致小队或团队中的生命值/法力值显示不能及时更新的错误。
       修正了角色专用宏会被通用宏覆盖的错误。 你不能修改暴雪XML和Lua文件了。 插件和宏将无法激发或获取可以导致角色移动的命令了。 SpellStopCasting()需要输入才能工作,就像你手动施放法术一样。 切换宠物的自动施放技能需要输入才能工作,就像你手动命令宠物一样。
       新的API功能 frame = CreateFrame("frameType" [,"name"] [, parent]) -- 动态创建指定类的新Frame font = CreateFont("name") -- 动态创建Font对象 num = GetNumFrames() -- 获取当前已创建Frame的数量 nextFrame = EnumerateFrames(currentFrame) -- 获取currentFrame后的Frame(内部顺序,使用currentFrame=nil获得第一个Frame) seterrorhandler(errfunc) -- 设置一个新的脚本错误管理器(将错误信息作为参数的功能) errfunc = geterrorhan version, buildnum, builddate = GetBuildInfo() 新的对象方法(由所有font,Frame,texture和fontstring继承) type = Object:GetObjectType() isType = Object:IsObjectType("type") 新的Font对象 name = Font:GetName() a = Font:GetAlpha() Font:SetAlpha(a) font = Font:GetFontObject() -- 获取Font的'parent'。
       Font:SetFontObject(font or nil) -- 设置Font的'parent' Font:CopyFontObject(font) -- 设置Font的属性与目标Font相同 fontFile, fontHeight, flags = Font:GetFont() wasFound = Font:SetFont("fontFile", fontHeight [, flags]) -- 如果指定Font为真,则返回1,否则返回nil(不作改变) r,g,b,a = Font:GetTextColor() Font:SetTextColor(r, g, b [, a]) r,g,b,a = Font:GetShadowColor() Font:SetShadowColor(r, g, b [, a]) x,y = Font:GetShadowOffset() Font:SetShadowOffset(x, y) Font:SetSpacing(spacing) spacing = Font:GetSpacing() Font:SetJustifyH("LEFT" or "CENTER" or "RIGHT") justifyh = Font:GetJustifyH() Font:SetJustifyV("TOP" or "MIDDLE" or "BOTTOM") justifyv = Font:GetJustifyV() 新的LayoutFrame方法(由所有Frame, Texture和Fontstring继承) x,y = LayoutFrame:GetCenter() x = LayoutFrame:GetLeft() x = LayoutFrame:GetRight() y = LayoutFrame:GetTop() y = LayoutFrame:GetBottom() width = LayoutFrame:GetWidth() LayoutFrame:SetWidth(width) height = LayoutFrame:GetHeight() LayoutFrame:SetHeight(height) numPoints = LayoutFrame:GetNumPoints() "point",relativeObject,"relativePoint",xOfs,yOfs = LayoutFrame:GetPoint(index) LayoutFrame:SetPoint("point" [, LayoutFrame] [, "relativePoint"] [, offsetX, offsetY]) LayoutFrame:SetAllPoints(LayoutFrame) LayoutFrame:ClearAllPoints() 新的Texture方法 parent = Texture:GetParent() Texture:SetParent(parent or "parent") layer = Texture:GetDrawLayer() Texture:SetDrawLayer("layer") blendMode = Texture:GetBlendMode() Texture:SetBlendMode("blendMode") -- blendMode是"DISABLE", "BLEND", "ALPHAKEY", "ADD", "MOD"之一 r,g,b,a = Texture:GetVertexColor() isFound = Texture:SetTexture("path") -- 如果路径找到,则返回1,否则nil 新的FontString方法 parent = FontString:GetParent() FontString:SetParent(parent or "parent") layer = FontString:GetDrawLayer() FontString:SetDrawLayer("layer") font = FontString:GetFontObject() FontString:SetFontObject(font or nil) fontFile, fontHeight, flags = FontString:GetFont() wasFound = FontString:SetFont("fontFile", fontHeight [, flags]) -- 如果指定Font找到,则返回1,否则nil(不作改变) a = FontString:GetAlpha() r,g,b,a = FontString:GetTextColor() FontString:SetTextColor(r, g, b [, a]) r,g,b,a = FontString:GetShadowColor() FontString:SetShadowColor(r, g, b [, a]) x,y = FontString:GetShadowOffset() FontString:SetShadowOffset(x, y) spacing = FontString:GetSpacing() FontString:SetSpacing(spacing) justifyh = Font:GetJustifyH() FontString:SetJustifyH("LEFT" or "CENTER" or "RIGHT") justfiyv = FontString:GetJustifyV() FontString:SetJustifyV("TOP" or "MIDDLE" or "BOTTOM") 新的针对所有Frame的方法 texture = Frame:CreateTexture(["name"] [,"layer"]) -- 为某个Frame创建一个新的子Texture目标 fontstring = Frame:CreateFontString(["name"] [,"layer"]) -- 为某个Frame创建一个新的子Fontstring目标 numRegions = Frame:GetNumRegions() -- 返回Frame中附加的区域数量(Textures/FontStrings) a, b, c, 。
      。。 = Frame:GetRegions() -- 返回Frame中附加的区域 新的MessageFrames,ScrollingMessageFrames和EditBoxes的方法 font = Frame:GetFontObject() Frame:SetFontObject(font or nil) fo wasFound = Frame:SetFont("fontFile", fontHeight [, flags]) -- 如果指定font为真则返回真,否则nil(不作改变) r,g,b,a = Frame:GetTextColor() Frame:SetTextColor(r, g, b [, a]) r,g,b,a = Frame:GetShadowColor() Frame:SetShadowColor(r, g, b [, a]) x,y = Frame:GetShadowOffset() Frame:SetShadowOffset(x, y) spacing = Frame:GetSpacing() Frame:SetSpacing(spacing) justifyh = Font:GetJustifyH() Frame:SetJustifyH("LEFT" or "CENTER" or "RIGHT") justfiyv = Frame:GetJustifyV() Frame:SetJustifyV("TOP" or "MIDDLE" or "BOTTOM") 新的SimpleHTML方法 ("header" is "H1" "H2" or "H3") font = SimpleHTML:GetFontObject(["header"]) SimpleHTML:SetFontObject(["header",] font or nil) fontFile, fontHeight, flags = SimpleHTML:GetFont(["header"]) wasFound = SimpleHTML:SetFont(["header",] "fontFile", fontHeight [, flags]) -- 如果指定font为真则返回真,否则nil(不作改变) r,g,b,a = SimpleHTML:GetTextColor(["header"]) SimpleHTML:SetTextColor(["header",] r, g, b [, a]) r,g,b,a = SimpleHTML:GetShadowColor(["header"]) SimpleHTML:SetShadowColor(["header",] r, g, b [, a]) x,y = SimpleHTML:GetShadowOffset(["header"]) SimpleHTML:SetShadowOffset(["header",] x, y) spacing = SimpleHTML:GetSpacing(["header"]) SimpleHTML:SetSpacing(["header",] spacing) justifyh = SimpleHTML:GetJustifyH(["header"]) SimpleHTML:SetJustifyH(["header",] "LEFT" or "CENTER" or "RIGHT") justfiyv = SimpleHTML:GetJustifyV(["header"]) SimpleHTML:SetJustifyV(["header",] "TOP" or "MIDDLE" or "BOTTOM") 新的Button方法 font = Button:GetTextFontObject() Button:SetTextFontObject(font or nil) font = Button:GetDisabledFontObject() Button:SetDisabledFontObject(font or nil) font = Button:GetHighlightFontObject() Button:SetHighlightFontObject(font or nil) Button:SetNormalTexture("texturePath" or TextureObject) -- 添加了Texture对象选项 Button:SetPushedTexture("texturePath" or TextureObject) -- 添加了Texture对象选项 Button:SetDisabledTexture("texturePath" or TextureObject) -- 添加了Texture对象选项 Button:SetHighlightTexture("texturePath" or TextureObject) -- 添加了Texture对象选项 新的Slider方法 orientation = Slider:GetOrientation() -- 返回slider定位 Slider:SetOrientation("orientation") -- 设置slider定位("HORIZONTAL","VERTICAL") 新的StatusBar方法 orientation = StatusBar:GetOrientation() -- 返回bar定位 StatusBar:SetOrientation("orientation") -- 设置bar定位("HORIZONTAL","VERTICAL") filename = StatusBar:GetStatusBarTexture() r, g, b, a = StatusBar:GetStatusBarColor() 新的ScrollingMessageFrame方法 ScrollingMessageFrame:SetFading(isFading) -- 从ScrollingMessageFrame:EnableFading()重命名而来 isFading = ScrollingMessageFrame:GetFading() duration = ScrollingMessageFrame:GetFadeDuration() -- 获取字符串消隐的时长 visTime = ScrollingMessageFrame:GetTimeVisible() -- 获取字符串消隐前的时长 新的Minimap方法 Minimap:SetMaskTexture("file") -- 为小地图遮照设置texture Minimap:SetIconTexture("file") -- 为小地图POI图标设置texture Minimap:SetBlipTexture("file") -- 为小地图追踪箭头设置texture debugprofilestart() ——在debug期间开始一个压型计时器。
       millis = debugprofilestop() - 调用debugprofilestart()返回毫秒。 新的用户界面元素成员功能 handlerFunction = Frame:GetScript("handler") Frame:SetScript("handler", function) Frame:SetBackdrop(nil) / Frame:SetBackdrop({bgFile = "bgFile", edgeFile = "edgeFile", tile = false, tileSize = 0, edgeSize = 32, insets = { left = 0, right = 0, top = 0, bottom = 0 }}) FontString:SetFont("font", size [, "flags"])。
       StatusBar:SetStatusBarTexture("file" [, "layer"]) lines = ScrollingMessageFrame:GetMaxLines() ScrollingMessageFrame:SetMaxLines(lines) ScrollingMessageFrame:EnableFading([isEnabled]) (Defaults to true) ScrollingMessageFrame:SetFadeDuration(seconds) ScrollingMessageFrame:SetTimeVisible(seconds) ScrollingMessageFrame:Clear() lines = EditBox:GetHistoryLines() EditBox:SetHistoryLines(lines) EditBox:SetIgnoreArrows([isIgnored]) (Defaults to true) r,g,b,a = FontString:GetTextColor() 插件保存变量 保存变量不再会将存储数字变为单位精度。
       Infinite/Nan值不再会导致错误的 a文件。 聊天和战斗纪录 脚本功能ChatFrameLog()和ToggleCombatLogFileWrite()已经废弃。 增加脚本功能:isLogging=LoggingChat([newState]) (返回新的数值(如果没有争议那么就返回现有值)) 增加脚本功能:isLogging=LoggingCombat([newState]) (返回新的数值(如果没有争议那么就返回现有值)) 新的斜杠命令/chatlog将可以触发聊天纪录(/combatlog触发战斗纪录 聊天纪录文件和战斗纪录文件分别是Logs\WoWChatLog。
      txt和Logs\WoWCombatLog。txt 聊天和战斗纪录会不断延伸而不是覆盖。 你现在可以在被没有看到的生物攻击的时候收到战斗纪录和伤害反馈。 当你召唤一只被驯化的深苔幼蛛之后,你将无法知道是否已经孵化。 修正了在不同的地方链接一件物品会导致断线的问题。
       捡拾的物品现在名称颜色显示正确。 。

    柳***

    2007-03-14 13:07:40

其他答案

类似问题

换一换

相关推荐

正在加载...
最新资料 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):