mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-15 00:07:39 -04:00
Refactored odb system (read extended), added implementation of Dynamic World Spawns
ODB no longer uses DPL layer of Berkeley DB, persistent classes have to implement the Serializable interface, annotations are no longer used, use transient modifier for variables that should not be persistent. Entity reference errors will no longer occur, however it is better to use ids if the entity that is being referenced is stored in the db too! (or you will have two different objects). DB is cached for 5 minutes then it will write its log/cache to disk, transactions are no longer used.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
package resources.objects.player;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.HashMap;
|
||||
@@ -45,8 +46,9 @@ import engine.resources.scene.Point3D;
|
||||
import engine.resources.scene.Quaternion;
|
||||
|
||||
@Persistent(version=13)
|
||||
public class PlayerObject extends IntangibleObject {
|
||||
public class PlayerObject extends IntangibleObject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// PLAY 3
|
||||
|
||||
private String title;
|
||||
@@ -71,11 +73,11 @@ public class PlayerObject extends IntangibleObject {
|
||||
|
||||
private Map<String, Integer> xpList = new HashMap<String, Integer>();
|
||||
@NotPersistent
|
||||
private int xpListUpdateCounter = 0;
|
||||
private transient int xpListUpdateCounter = 0;
|
||||
|
||||
private List<WaypointObject> waypoints = new ArrayList<WaypointObject>();
|
||||
@NotPersistent
|
||||
private int waypointListUpdateCounter = 0;
|
||||
private transient int waypointListUpdateCounter = 0;
|
||||
|
||||
private int currentForcePower = 0; // unused in NGE
|
||||
private int maxForcePower = 0; // unused in NGE
|
||||
@@ -85,7 +87,7 @@ public class PlayerObject extends IntangibleObject {
|
||||
|
||||
private List<Quest> questJournal = new ArrayList<Quest>();
|
||||
@NotPersistent
|
||||
private int questJournalUpdateCounter = 0;
|
||||
private transient int questJournalUpdateCounter = 0;
|
||||
|
||||
private String professionWheelPosition;
|
||||
|
||||
@@ -97,17 +99,17 @@ public class PlayerObject extends IntangibleObject {
|
||||
|
||||
private List<DraftSchematic> draftSchematicList = new ArrayList<DraftSchematic>();
|
||||
@NotPersistent
|
||||
private int draftSchematicListUpdateCounter = 0;
|
||||
private transient int draftSchematicListUpdateCounter = 0;
|
||||
|
||||
private int experimentationPoints = 0;
|
||||
private int accomplishmentCounter = 0;
|
||||
|
||||
private List<String> friendList = new ArrayList<String>();
|
||||
@NotPersistent
|
||||
private int friendListUpdateCounter = 0;
|
||||
private transient int friendListUpdateCounter = 0;
|
||||
private List<String> ignoreList = new ArrayList<String>();
|
||||
@NotPersistent
|
||||
private int ignoreListUpdateCounter = 0;
|
||||
private transient int ignoreListUpdateCounter = 0;
|
||||
|
||||
private int languageId = 0; // unused in NGE
|
||||
private int currentStomach = 0; // unused in NGE
|
||||
@@ -129,10 +131,10 @@ public class PlayerObject extends IntangibleObject {
|
||||
private int lotsRemaining = 10;
|
||||
|
||||
@NotPersistent
|
||||
private PlayerMessageBuilder messageBuilder;
|
||||
private transient PlayerMessageBuilder messageBuilder;
|
||||
|
||||
@NotPersistent
|
||||
private long lastPlayTimeUpdate = System.currentTimeMillis();
|
||||
private transient long lastPlayTimeUpdate = System.currentTimeMillis();
|
||||
|
||||
private Map<String, Integer> factionStandingMap = new TreeMap<String, Integer>();
|
||||
|
||||
@@ -145,7 +147,7 @@ public class PlayerObject extends IntangibleObject {
|
||||
private List<Integer> chatChannels = new ArrayList<Integer>();
|
||||
|
||||
@NotPersistent
|
||||
private boolean callingCompanion = false;
|
||||
private transient boolean callingCompanion = false;
|
||||
|
||||
public PlayerObject() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user