Example #1
0
        public bool Create()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("(charName, charClass, face, Inte, Agi, Vit, Str, Dex, statPointz, ownerID) ");
            sb.Append("VALUES (");
            sb.Append("'" + this.name + "',");
            sb.Append(this.cClass + ",");
            sb.Append(this.face + ",");
            sb.Append(this.inte + ",");
            sb.Append(this.agi + ",");
            sb.Append(this.vit + ",");
            sb.Append(this.str + ",");
            sb.Append(this.dex + ",");
            sb.Append(this.statPoints + ",");
            sb.Append(this.account.aID);
            sb.Append(")");
            int charID = MySQLTool.Create("chars", sb);

            this.cID = charID;

            sb.Clear();
            sb.Append("(charID) VALUES (" + charID + ")");
            MySQLTool.Create("chars_eq", sb);

            sb.Clear();
            sb.Append("(charID) VALUES (" + charID + ")");
            MySQLTool.Create("chars_inv", sb);

            sb.Clear();
            sb.Append("(charID) VALUES (" + charID + ")");
            MySQLTool.Create("chars_sbar", sb);

            sb.Clear();
            sb.Append("(charID) VALUES (" + charID + ")");
            MySQLTool.Create("chars_skill", sb);

            sb.Clear();
            sb.Append("(charID) VALUES (" + charID + ")");
            MySQLTool.Create("chars_com", sb);
            return(true);
        }