Index: C:/Documents and Settings/ricardo.DINUCCI/workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/L2ItemInstance.java =================================================================== --- C:/Documents and Settings/ricardo.DINUCCI/workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/L2ItemInstance.java (revision 344) +++ C:/Documents and Settings/ricardo.DINUCCI/workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/model/L2ItemInstance.java (working copy) @@ -97,6 +97,9 @@ private int _type1; private int _type2; + /** Serial do item */ + private int _serial; + private long _dropTime; public static final int CHARGED_NONE = 0; @@ -659,7 +662,7 @@ try { con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("SELECT owner_id, object_id, item_id, count, enchant_level, loc, loc_data, price_sell, price_buy, custom_type1, custom_type2 FROM items WHERE object_id = ?"); + PreparedStatement statement = con.prepareStatement("SELECT owner_id, object_id, item_id, count, enchant_level, loc, loc_data, price_sell, price_buy, custom_type1, custom_type2, serial FROM items WHERE object_id = ?"); statement.setInt(1, objectId); ResultSet rs = statement.executeQuery(); if (rs.next()) { @@ -671,6 +674,7 @@ int enchant_level = rs.getInt("enchant_level"); int custom_type1 = rs.getInt("custom_type1"); int custom_type2 = rs.getInt("custom_type2"); + int serial = rs.getInt("serial"); int price_sell = rs.getInt("price_sell"); int price_buy = rs.getInt("price_buy"); L2Item item = ItemTable.getInstance().getTemplate(item_id); @@ -686,6 +690,7 @@ inst._enchantLevel = enchant_level; inst._type1 = custom_type1; inst._type2 = custom_type2; + inst._serial = serial; inst._loc = loc; inst._loc_data = loc_data; inst._price_sell = price_sell; @@ -762,7 +767,7 @@ { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement( - "UPDATE items SET owner_id=?,count=?,loc=?,loc_data=?,enchant_level=?,price_sell=?,price_buy=?,custom_type1=?,custom_type2=? " + + "UPDATE items SET owner_id=?,count=?,loc=?,loc_data=?,enchant_level=?,price_sell=?,price_buy=?,custom_type1=?,custom_type2=?,serial=? " + "WHERE object_id = ?"); statement.setInt(1, _owner_id); statement.setInt(2, getCount()); @@ -773,7 +778,8 @@ statement.setInt(7, _price_buy); statement.setInt(8, getCustomType1()); statement.setInt(9, getCustomType2()); - statement.setInt(10, getObjectId()); + statement.setInt(10, _serial); + statement.setInt(11, getObjectId()); statement.executeUpdate(); _existsInDb = true; _storedInDb = true; @@ -798,8 +804,8 @@ { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement( - "INSERT INTO items (owner_id,item_id,count,loc,loc_data,enchant_level,price_sell,price_buy,object_id,custom_type1,custom_type2) " + - "VALUES (?,?,?,?,?,?,?,?,?,?,?)"); + "INSERT INTO items (owner_id,item_id,count,loc,loc_data,enchant_level,price_sell,price_buy,object_id,custom_type1,custom_type2,serial) " + + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"); statement.setInt(1, _owner_id); statement.setInt(2, _itemId); statement.setInt(3, getCount()); @@ -811,6 +817,7 @@ statement.setInt(9, getObjectId()); statement.setInt(10, _type1); statement.setInt(11, _type2); + statement.setInt(12, _serial); statement.executeUpdate(); _existsInDb = true;