Quantcast WoWInterface - View Single Post - Static initialising a table
View Single Post
02-09-18, 02:40 PM   #4
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 412
Lua Code:
  1. local lSpellNamesAndIds = {
  2.      ["PALADIN"] = {
  3.           ["Retribution"] = {
  4.                ["Judgment"] =  231663,
  5.                ["Templars-verdict"] = 85256,
  6.                ["crusader-strike"] = 231667,
  7.           },
  8.      },
  9.      ["DRUID"] = {
  10.           ["Balance"] = {
  11.                ["Starfall"] = 231663,
  12.                ["Sunrise"] = 85256,
  13.           },
  14.      },
  15. };

Since you said your values are fictitious, this might not be useful advice, but there's certainly no need to create tables for every spell containing only the name and the ID.
__________________
  Reply With Quote