Browse Source

"Avoid racing condition when restoring talismans from database", by _DS_

DrHouse 16 years ago
parent
commit
456058f4c6

+ 1 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/itemcontainer/Inventory.java

@@ -1472,7 +1472,7 @@ public abstract class Inventory extends ItemContainer
 		try
 		{
 			con = L2DatabaseFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement("SELECT object_id, item_id, count, enchant_level, loc, loc_data, custom_type1, custom_type2, mana_left FROM items WHERE owner_id=? AND (loc=? OR loc=?) ");
+			PreparedStatement statement = con.prepareStatement("SELECT object_id, item_id, count, enchant_level, loc, loc_data, custom_type1, custom_type2, mana_left FROM items WHERE owner_id=? AND (loc=? OR loc=?) ORDER BY loc_data");
 			statement.setInt(1, getOwnerId());
 			statement.setString(2, getBaseLocation().name());
 			statement.setString(3, getEquipLocation().name());