private void Init() { db = new DbHandler(); int[] dosh = db.GetMoney(c.GetID()); copper = dosh[0]; silver = dosh[1]; gold = dosh[2]; platinum = dosh[3]; UpdateDisplay(); }
public DetailScreen(BattleScribe.Classes.Character character, Image i) { InitializeComponent(); feats = new List <Feat>(); raceFeatures = new List <Feature>(); db = new DbHandler(); charRaces = new List <CharacterRace>(); skills = new List <Skill>(); imgChar.Source = i.Source; langs = new List <Language>(); spells = new List <Spell>(); itemsInInv = new List <Item>(); cClass = new CharacterClass(); equipList = new List <Item>(); charId = character.GetID(); imageArray = new byte[0]; c = db.GetCharacterById(charId); cClass = db.GetClassById(c.GetClass()); skills = db.GetSkillsByCharId(charId); langs = db.GetLangsByCharId(charId); spells = db.GetSpellsByCharId(charId); c.SetKnownSpells(spells); c.SetSkillList(skills); c.SetLangList(langs); Init(); c.SetImage(i); }
public void SaveInventory() { db.InsertInventory(allItems, c.GetID()); }