public void Save() { StringBuilder sb = new StringBuilder(); sb.Append(" charName = '" + name + "'"); sb.Append(", charClass = " + cClass); sb.Append(", removeState = " + deleteState); sb.Append(", invPages = " + invPages); sb.Append(", face = " + face); sb.Append(", effect = " + effect); sb.Append(", faction = " + faction); sb.Append(", level = " + level); sb.Append(", curHP = " + curHP); sb.Append(", curMP = " + curMP); sb.Append(", curSP = " + curSP); sb.Append(", coin = " + coin); sb.Append(", fame = " + fame); sb.Append(", locX = '" + position[0]); sb.Append("', locY = '" + position[1]); sb.Append("', map = " + map); sb.Append(", Inte = " + inte); sb.Append(", Agi = " + agi); sb.Append(", Vit = " + vit); sb.Append(", Str = " + str); sb.Append(", Dex = " + dex); sb.Append(", statPointz = " + statPoints); sb.Append(", skillPointz = " + skillPoints); sb.Append(", karmaMessagingTimes = " + karmaMessagingTimes); sb.Append(", gmShoutMessagingTimes = " + gmShoutMessagingTimes); MySQLTool.Save("chars", sb, "charID", this.cID); MySQLTool.SaveEquipments(this); MySQLTool.SaveInventories(this); //MySQLTool.SaveCargo(this); MySQLTool.SaveSkills(this); MySQLTool.SaveSkillBar(this); MySQLTool.SaveCommunities(this); }
public static int createEquipments(Character chr) { switch (chr.getcClass()) { case 1: { chr.getEquipment().getEquipments().Add(0, new Item(210110101)); chr.getEquipment().getEquipments().Add(1, new Item(207114101)); chr.getEquipment().getEquipments().Add(3, new Item(202110103)); chr.getEquipment().getEquipments().Add(4, new Item(203110102)); chr.getEquipment().getEquipments().Add(6, new Item(209114101)); chr.getEquipment().getEquipments().Add(7, new Item(201011002)); chr.getEquipment().getEquipments().Add(9, new Item(208114101)); chr.getEquipment().getEquipments().Add(10, new Item(208114101)); chr.getEquipment().getEquipments().Add(11, new Item(206110102)); break; } case 2: { chr.getEquipment().getEquipments().Add(0, new Item(210220101)); chr.getEquipment().getEquipments().Add(1, new Item(207224101)); chr.getEquipment().getEquipments().Add(3, new Item(202220103)); chr.getEquipment().getEquipments().Add(4, new Item(203220102)); chr.getEquipment().getEquipments().Add(6, new Item(209225101)); chr.getEquipment().getEquipments().Add(7, new Item(201011008)); chr.getEquipment().getEquipments().Add(9, new Item(208224101)); chr.getEquipment().getEquipments().Add(10, new Item(208224101)); chr.getEquipment().getEquipments().Add(11, new Item(206220102)); break; } case 3: { chr.getEquipment().getEquipments().Add(0, new Item(210130101)); chr.getEquipment().getEquipments().Add(1, new Item(207134101)); chr.getEquipment().getEquipments().Add(3, new Item(202130103)); chr.getEquipment().getEquipments().Add(4, new Item(203130102)); chr.getEquipment().getEquipments().Add(6, new Item(209135101)); chr.getEquipment().getEquipments().Add(7, new Item(201011014)); chr.getEquipment().getEquipments().Add(9, new Item(208134101)); chr.getEquipment().getEquipments().Add(10, new Item(208134101)); chr.getEquipment().getEquipments().Add(11, new Item(206130102)); break; } case 4: { chr.getEquipment().getEquipments().Add(0, new Item(210140101)); chr.getEquipment().getEquipments().Add(1, new Item(207144101)); chr.getEquipment().getEquipments().Add(3, new Item(202140103)); chr.getEquipment().getEquipments().Add(4, new Item(203140102)); chr.getEquipment().getEquipments().Add(6, new Item(209140101)); chr.getEquipment().getEquipments().Add(7, new Item(201011020)); chr.getEquipment().getEquipments().Add(9, new Item(208144101)); chr.getEquipment().getEquipments().Add(10, new Item(208144101)); chr.getEquipment().getEquipments().Add(11, new Item(206140102)); break; } } MySQLTool.SaveEquipments(chr); return(1); }