Do not restore offline traders that have been kicked from the game.
This commit is contained in:
@ -284,6 +284,26 @@ public class OfflineTradersTable
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized void removeTrader(int traderObjId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS_PLAYER);
|
||||
PreparedStatement stm2 = con.prepareStatement(CLEAR_OFFLINE_TABLE_PLAYER))
|
||||
{
|
||||
stm1.setInt(1, traderObjId);
|
||||
stm1.execute();
|
||||
stm1.close();
|
||||
|
||||
stm2.setInt(1, traderObjId);
|
||||
stm2.execute();
|
||||
stm2.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "OfflineTradersTable[onTransaction()]: Error while removing offline trader: " + traderObjId + " " + e, e);
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized void onTransaction(L2PcInstance trader, boolean finished, boolean firstCall)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
|
Reference in New Issue
Block a user