more cleanup + fixes

Harvesters and house terminal work now
This commit is contained in:
Light2
2014-04-12 18:31:37 +02:00
parent c5520abff8
commit e144118364
8 changed files with 116 additions and 128 deletions
+8 -4
View File
@@ -54,6 +54,7 @@ import org.python.core.Py;
import org.python.core.PyObject;
import com.sleepycat.je.Transaction;
import com.sleepycat.je.TransactionConfig;
import com.sleepycat.persist.EntityCursor;
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
@@ -976,7 +977,8 @@ public class ObjectService implements INetworkDispatch {
CrcStringTableVisitor crcTable = ClientFileManager.loadFile("misc/object_template_crc_string_table.iff", CrcStringTableVisitor.class);
List<BuildingObject> persistentBuildings = new ArrayList<BuildingObject>();
Map<Long, Long> duplicate = new HashMap<Long, Long>();
Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null);
for (int i = 0; i < buildoutTable.getRowCount(); i++) {
String template;
@@ -1055,15 +1057,17 @@ public class ObjectService implements INetworkDispatch {
newObjectId = core.getDuplicateIdODB().get(key, String.class, DuplicateId.class).getObjectId();
} else {
newObjectId = generateObjectID();
Transaction txn = core.getDuplicateIdODB().getEnvironment().beginTransaction(null, null);
core.getDuplicateIdODB().put(new DuplicateId(key, newObjectId), String.class, DuplicateId.class, txn);
txn.commitSync();
}
duplicate.put(objectId, newObjectId);
objectId = newObjectId;
}
if(txn.isValid()) {
System.out.println("Committed doid transaction.");
txn.commitSync();
}
List<Long> containers = new ArrayList<Long>();
SWGObject object;
if(objectId != 0 && containerId == 0) {