forked from MagicBane/Server
Inlined populate world method
This commit is contained in:
@@ -415,7 +415,17 @@ public class WorldServer {
|
||||
|
||||
//Load Buildings, Mobs and NPCs for server
|
||||
|
||||
getWorldBuildingsMobsNPCs();
|
||||
Logger.info("Populating world with objects");
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
DbManager.ZoneQueries.GET_ALL_ZONES();
|
||||
DbManager.BuildingQueries.GET_ALL_BUILDINGS();
|
||||
DbManager.NPCQueries.GET_ALL_NPCS();
|
||||
DbManager.MobQueries.GET_ALL_MOBS();
|
||||
DbManager.CityQueries.GET_ALL_CITIES();
|
||||
|
||||
Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms");
|
||||
|
||||
// Configure realms for serialization
|
||||
// Doing this after the world is loaded
|
||||
@@ -445,7 +455,7 @@ public class WorldServer {
|
||||
ZoneManager.generateAndSetRandomHotzone();
|
||||
|
||||
Logger.info("Loading All Players from database to Server Cache");
|
||||
long start = System.currentTimeMillis();
|
||||
start = System.currentTimeMillis();
|
||||
|
||||
try {
|
||||
DbManager.PlayerCharacterQueries.GET_ALL_CHARACTERS();
|
||||
@@ -455,7 +465,7 @@ public class WorldServer {
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
|
||||
Logger.info("Loading All Players took " + (end - start) + " ms.");
|
||||
Logger.info("Time to load players " + (end - start) + " ms.");
|
||||
|
||||
ItemProductionManager.ITEMPRODUCTIONMANAGER.initialize();
|
||||
|
||||
@@ -537,19 +547,6 @@ public class WorldServer {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void getWorldBuildingsMobsNPCs() {
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
DbManager.ZoneQueries.GET_ALL_ZONES();
|
||||
DbManager.BuildingQueries.GET_ALL_BUILDINGS();
|
||||
DbManager.NPCQueries.GET_ALL_NPCS();
|
||||
DbManager.MobQueries.GET_ALL_MOBS();
|
||||
DbManager.CityQueries.GET_ALL_CITIES();
|
||||
|
||||
Logger.info("time to load World Objects: " + (System.currentTimeMillis() - start) + " ms");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to remove a client on "leave world", "quit game", killed client
|
||||
* process, etc.
|
||||
|
||||
Reference in New Issue
Block a user