public Character AddCharacter(Int32 characterId) { Character ch = new Character(_user, characterId, NextCharacterNo()); Items.Add(ch); ch.InsertToDB(); return ch; }
public void LoadFromDB(DataReader reader) { Items.Clear(); while (reader.Read()) { Int32 characterNo = reader.GetInt32(0); Int32 characterId = reader.GetInt32(1); Character ch = new Character(_user, characterId, characterNo); ch.Level = reader.GetInt16(2); ch.Exp = reader.GetInt32(3); ch.GradeId = reader.GetInt16(4); ch.PromotionId = reader.GetInt16(5); Items.Add(ch); } }