12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

126 Part II ■ <strong>Programming</strong> in <strong>World</strong> <strong>of</strong> <strong>Warcraft</strong>## Author: My Name Here## Notes: This is my sample addonMyAddon.xmlMyAddon.luaEach line beginning with ## contains a definition <strong>of</strong> some sort <strong>of</strong> metadata.For example, the ## Title metadata is displayed on the addon selectionscreen, <strong>and</strong> ## Notes contains a longer description that is displayed when youmouse over the addon in that list. The lines after the directives are simply alist <strong>of</strong> files to be loaded by the addon.## Interface:## Interface: 30300The interface version directive (## Interface: 30300 in this example)provides a basic versioning mechanism that the client uses <strong>for</strong> the addonselection screen. The game client uses this number to verify that an addon iscompatible with the current game version. If the version is not compatible, thegame will label it with one <strong>of</strong> two states:Out <strong>of</strong> date—This state indicates that there has been a patch to the gameclient since the addon was written. This is strictly just a warning; theaddons may work just fine if you check ‘‘Load out <strong>of</strong> date AddOns’’ atthe top <strong>of</strong> the screen. The version number typically only changes whenthere is an actual change to the API, so this warning should be heeded.Incompatible—When a major change happens to the game client (suchas an expansion pack), the addon selection screen will display this status<strong>and</strong> will refuse to load the addon. A new version <strong>of</strong> the addon should bedownloaded to ensure it operates correctly in the new API.Figure 8-1 shows two addons, one flagged as out <strong>of</strong> date <strong>and</strong> the otheras incompatible. TinyPad could be loaded by checking the Load out <strong>of</strong> dateAddOns checkbox, but nothing can <strong>for</strong>ce the incompatible addon to load.Figure 8-1: Addon selection screenJust because an addon is listed as out <strong>of</strong> date doesn’t mean there’s anythingparticularly wrong with it, only that the game client has been patched since the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!