my items change doesnt save lvl, quality and color and i use :
and i have in database.cs:
this is my item info:
Code:
Database.Database.UpdateItem(Item);
Code:
public static void UpdateItem(Struct.ItemInfo Item)
{
MySqlCommand Cmd = new MySqlCommand("UPDATE `items` SET `ItemID` = " + Item.ItemID + ", `Position` = " + Item.Position + ", `Minus` = " + Item.Bless + ", `Plus` = " + Item.Plus + ", `Progress` = " + Item.Progress + ", `Enchant` = " + Item.Enchant + ", `Soc1` = " + Item.Soc1 + ", `Soc2` = " + Item.Soc2 + ", `Dura` = " + Item.Dura + ", `MaxDura` = " + Item.MaxDura + ", `Color` = " + Item.Color + " WHERE `ItemUID` = \"" + Item.UID + "\"", DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
whats wrong??? pls help!!!Quote:
public static byte[] ItemInfo(int UID, int ItemID, int Plus, int Progress, int Bless, int Enchant, int soc1, int soc2, int Dura, int MaxDura, int Position, int Color)
{
PacketBuilder Packet = new PacketBuilder(1008, 48);
Packet.Long(UID);
Packet.Long(ItemID);
//Packet.Int(Math.Abs(200-currentdura) & 0xff);
//Packet.Int((byte)(currentdura / 2.56) & 0xff);
//Packet.Int(Math.Abs(200-maxdura) & 0xff);
//Packet.Int((byte)(maxdura / 2.56) & 0xff);
//Packet.Long(0);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Int(1);
Packet.Short(1);
Packet.Int(Position);
Packet.Long(0);
Packet.Int(0);
Packet.Int(soc1);
Packet.Int(soc2);
Packet.Short(2);
Packet.Int(Plus);
Packet.Int(Bless);
Packet.Int(0); // Free / Unfree
Packet.Long(Enchant);
Packet.Int(0);
Packet.Short(0); // Suspicious item??
Packet.Short(0); //Boolean 1- yes 0 - no (locked)
Packet.Long(Color); //Item color. 2-9(headgear is 3-9)
Packet.Long(Progress); // Composition Progress
return Packet.getFinal();
}