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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1360 Index ■ B–BBagBuddy_Update()adding OnEvent h<strong>and</strong>ler, 249–250altering, 248–249tracking new inventory items, 246–248using items from inventory, 253–254writing new sorting function, 248BagBuddyItemTemplate, 175BagBuddy.lua codeframe templates, 184frames <strong>and</strong> graphics, 168tracking new inventory items, 246–251widgets, 233–237<strong>WoW</strong> API, 204–205BagBuddy.toc code, 168BagBuddy.xml codeframe templates, 184–186frames <strong>and</strong> graphics, 168–169widgets, 237–241bags"bag" attribute, 1325bag IDs, 193–194watching <strong>for</strong> changes in player’s, 354writing bag scanner, 198–201bank functions, 1031–1032BankButtonIDToInvSlotID, 563barbershop functions, 1032BarberShopReset, 563battefield functions, 1032–1035behavior, altering. See function hookingbeneficial spells, casting, 290–291, 298best practices, 1305–1327avoiding adding files while WOW is running,1325–1326avoiding entering | into chat edit box, 1326avoiding missing frames, 1326avoiding requesting data be<strong>for</strong>ePLAYER_LOGIN, 1327breaking apart long functions, 1309checking expected conditions first, 1319–1320consistent programming style, 1309–1310failure to check API returns, 1326–1327failure to check Logs/FrameXML.log file, 1326failure to clear existing anchor points, 1327local variables, 1310–1311minimizing unnecessary garbage, 1311–1317named constants instead <strong>of</strong> literals, 1307–1308recycling objects, 1317–1318recycling tables, 1318–1319reworking repetitive code, 1308–1309shortcut evaluation, 1320–1322variable name exceptions, 1307variable names, meaningful, 1306–1307<strong>WoW</strong> environment, 1323–1325BindEnchant, 563–564binding, API meta-type, 545binding keys <strong>and</strong> clicks to addon code. See keybindingBindings.xml, 332–334BindingTest.lua, 332–334BindingTest.toc, 330BindingTest.xml, 330–331bitfieldAPI meta-type, 544–545combat logs, 389–390bits, combat logs <strong>and</strong>, 389BlessedMenus code, 496–499Blizzardaddons, 8–10disabled addons <strong>of</strong>, 6–7interface art, 85internal functions, 1035XML User Interface Customization tool, 85–86Blizzard_DebugTools addon, 254–255blocks, scope, 36BLP2 (.blp) graphics <strong>for</strong>mat, 86, 134, 373boolean values <strong>and</strong> operators, 33–35BossIDs library, 1336bracket ([[ ]]) quote marks, 30–31branchesGit <strong>and</strong> Mercurial terminology, 1344–1345Subversion, 1340–1341buff functions, 1035BUILDING_DAMAGE, combat events, 391BUILDING_HEAL, combat events, 392Burning Crusade expansion pack to <strong>WoW</strong>, 6button templatescreating <strong>for</strong> BagBuddy, 174–177TabButtonTemplate, 182UICheckButtonTemplate, 181UIPanelButtonTemplate, 180UIPanelCloseButton template, 180UIRadioButton template, 183Button widget. See buttonsbuttonsaction. See action buttonsadding to dropdown menus, 433–434adding toggle button to dropdown menus,432–433CombatTrackerFrame, 271creating clickable, 212–219navigation, multiple pages, 219–224reference guide, 1164–1170testing textures, 384as widget type, 227–228buttons, interactive, 207–212overview <strong>of</strong>, 207–208setting frame scripts via Lua, 209setting frame scripts via XML, 208showing item tooltips, 210–212using function attribute, 209BuybackItem, 564–565BuyGuildBankTab, 564BuyGuildCharter, 564BuyMerchantItem, 564

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

Saved successfully!

Ooh no, something went wrong!