//MY Code begins execution here public static void begin(Form1 form) { dbForm = form; party = new Party(); npcs = new List <NPC>(); magicItems = new List <MagicItem>(); monsters = new Dictionary <String, Monster>(); //Load data from files Load.load(); dbForm.updateInformation(); SpellTable.initializeSpellTable(); MagicItemTable.initializeMagicItemTables(); TreasureTable.initializeTreasureTables(); }
public static void loadRandomTables() { Dictionary <String, NameTable> nameTables = new Dictionary <string, NameTable>(); nameTables.Add("humanNames", new NameTable("human")); nameTables.Add("elvenNames", new NameTable("elven")); nameTables.Add("dwarvenNames", new NameTable("dwarven")); nameTables.Add("halflingNames", new NameTable("halfling")); nameTables.Add("gnomishNames", new NameTable("gnomish")); nameTables.Add("gnollNames", new NameTable("gnoll")); MagicItemTable magicItemTable = new MagicItemTable(); magicItemTable.initializeMagicItemTables(); SpellTable spellTable = new SpellTable(); spellTable.initializeSpellTable(); HttpRuntime.Cache.Insert("names", nameTables, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, null); HttpRuntime.Cache.Insert("items", magicItemTable, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, null); HttpRuntime.Cache.Insert("spells", spellTable, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, null); }