View Single Post
02/02/22, 03:52 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Just as a heads-up:

You could even strip the [number] indices at the table in lua if the values are non-gap numbers 1, 2, 3, 4, 5, ... n
Lua Code:
  1. local CURRENCY_CHANGE_REASON_STRINGS = {
  2.    "CURRENCY_CHANGE_REASON_ABILITY_UPGRADE_PURCHASE",
  3.    "CURRENCY_CHANGE_REASON_ACHIEVEMENT",
  4.     -- all the other values
  5.    "CURRENCY_CHANGE_REASON_VENDOR_REPAIR",
  6. }
If there is a gap though you need the number as else it will just always increase by 1 autoamtically and get out of sync with the real values of the constants!

I guess, as you generate the entries via python code you will just always create the indices
  Reply With Quote