Save buff schemes on shutdown.

This commit is contained in:
MobiusDev 2018-05-03 04:47:53 +00:00
parent 4177cbf621
commit d34457b8fe
2 changed files with 9 additions and 4 deletions

View File

@ -26,6 +26,7 @@ import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable; import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable; import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
import com.l2jmobius.gameserver.datatables.BotReportTable; import com.l2jmobius.gameserver.datatables.BotReportTable;
import com.l2jmobius.gameserver.datatables.SchemeBufferTable;
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager; import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
import com.l2jmobius.gameserver.instancemanager.CastleManorManager; import com.l2jmobius.gameserver.instancemanager.CastleManorManager;
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
@ -541,6 +542,10 @@ public class Shutdown extends Thread
LOGGER.info("Fishing Championship data has been saved."); LOGGER.info("Fishing Championship data has been saved.");
} }
// Schemes save.
SchemeBufferTable.getInstance().saveSchemes();
LOGGER.info("SchemeBufferTable data has been saved.");
// Save items on ground before closing // Save items on ground before closing
if (Config.SAVE_DROPPED_ITEM) if (Config.SAVE_DROPPED_ITEM)
{ {

View File

@ -92,7 +92,7 @@ public class SchemeBufferTable
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.warning("BufferTable: Failed to load buff schemes : " + e); LOGGER.warning("SchemeBufferTable: Failed to load buff schemes : " + e);
} }
try try
@ -128,9 +128,9 @@ public class SchemeBufferTable
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.warning("BufferTable: Failed to load buff info : " + e); LOGGER.warning("SchemeBufferTable: Failed to load buff info : " + e);
} }
LOGGER.info("BufferTable: Loaded " + count + " players schemes and " + _availableBuffs.size() + " available buffs."); LOGGER.info("SchemeBufferTable: Loaded " + count + " players schemes and " + _availableBuffs.size() + " available buffs.");
} }
public void saveSchemes() public void saveSchemes()
@ -173,7 +173,7 @@ public class SchemeBufferTable
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.warning("BufferTable: Error while saving schemes : " + e); LOGGER.warning("BufferTableScheme: Error while saving schemes : " + e);
} }
} }