using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace Chop { public class Habbo { private int mID; private string mName; private string mFigure; private string mPoolFigure; private string mPassword; private string mMotto; private int mCredits; private int mTickets; private int mFilms; private char mGender; private GameClient mClient; // Maybe not needed? public int Credits { get { return mCredits; } } public static Habbo Parse(DataRow row, GameClient client) { Habbo habbo = new Habbo(); habbo.mID = Convert.ToInt32(row["id"]); habbo.mName = row["name"].ToString(); habbo.mFigure = row["figure"].ToString(); habbo.mPoolFigure = row["poolfigure"].ToString(); habbo.mPassword = row["password"].ToString(); habbo.mMotto = row["motto"].ToString(); habbo.mCredits = Convert.ToInt32(row["credits"]); habbo.mTickets = Convert.ToInt32(row["tickets"]); habbo.mFilms = Convert.ToInt32(row["films"]); habbo.mGender = Convert.ToChar(row["gender"]); habbo.mClient = client; return habbo; } public string ToFuseString() { Response r = new Response(); r.AppendString(mClient.ID); r.AppendString(mName); r.AppendString(mFigure); r.AppendString(mGender); r.AppendString(mMotto); r.AppendWired(mTickets); r.AppendString(mPoolFigure); r.AppendWired(mFilms); return r.ToString(); } } }