Fixed some server crashes with some engine changes; also added a creature ODB

This commit is contained in:
Obique
2014-08-07 12:43:27 -05:00
parent 5df6aec213
commit bc8f2544ee
4 changed files with 97 additions and 78 deletions
+11 -3
View File
@@ -233,13 +233,15 @@ public class NGECore {
private ObjectDatabase auctionODB;
private ObjectDatabase resourceHistoryODB;
private ObjectDatabase swgObjectODB;
private ObjectDatabase creatureODB;
private ObjectDatabase bountiesODB;
private ObjectDatabase cityODB;
public static boolean PACKET_DEBUG = false;
public NGECore() {
instance = this;
}
public void start() {
@@ -302,6 +304,7 @@ public class NGECore {
}
setGalaxyStatus(GalaxyStatus.Loading);
creatureODB = new ObjectDatabase("players", true, true, true, CreatureObject.class);
swgObjectODB = new ObjectDatabase("swgobjects", true, true, true, SWGObject.class);
mailODB = new ObjectDatabase("mails", true, true, true, Mail.class);
guildODB = new ObjectDatabase("guild", true, true, true, GuildObject.class);
@@ -509,7 +512,7 @@ public class NGECore {
terrainService.loadSnapShotObjects();
objectService.loadServerTemplates();
objectService.loadBuildings();
objectService.loadObjects();
harvesterService.loadHarvesters();
simulationService.insertSnapShotObjects();
@@ -669,6 +672,10 @@ public class NGECore {
return databaseConnection2;
}
public ObjectDatabase getCreatureODB() {
return creatureODB;
}
public ObjectDatabase getSWGObjectODB() {
return swgObjectODB;
}
@@ -804,8 +811,9 @@ public class NGECore {
public long getGalacticTime() {
return System.currentTimeMillis() - galacticTime;
}
public void closeODBs() {
creatureODB.close();
swgObjectODB.close();
mailODB.close();
guildODB.close();