Before We Get Started
This chapter assumes that you're a .NET (Visual Basic or C#) developer who plays World of Warcraft, and maybe you've used Warcraft addons, but you've never written your own. There are many similar concepts that apply to both building Warcraft addons and building .NET applications, as you can see in Table 3-1.
Table 3-1. High-level comparison of Warcraft and .NET programming models
CATEGORY |
WARCRAFT ADDONS |
.NET |
---|---|---|
Application files and resources |
Table of Contents (.toc) |
Assembly manifest file |
Application metadata (name, author, version) |
Table of Contents |
AssemblyInfo |
UI |
FrameXML markup and widgets |
XAML markup and controls |
Code |
Lua |
VB/C# |
Programming model |
Event-based |
Event-based |
Libraries |
WoW Function APIs, third-party libraries |
.NET Framework, third-party libraries |
Storage |
SavedVariables |
Isolated storage/filesystem |
Referencing current object |
Self |
Me (VB); this (C#) |
Tools |
AddOn Studio for World of Warcraft |
Visual Studio Express Editions |
A Quick Tour of the Lua Programming Language
There are many nuances to the Lua programming language, but the following is a quick glance at its features. For a full reference on the Lua programming language, you can download the language reference from http://www.lua.org/manual/.
Note
World of Warcraft uses a slightly modified version of the Lua 5.1 runtime that adds some helper functions and removes operating system and file I/O functions.
Lua types
Lua defines five basic types: a Boolean (true/false), a number, ...
Get Coding4Fun now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.