diff --git a/.gitignore b/.gitignore index 2af7cef..93e48d3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ build/ nbbuild/ dist/ nbdist/ -.nb-gradle/ \ No newline at end of file +.nb-gradle/ +/exe/ diff --git a/src/main/java/swg/dao/CityObjectDao.java b/src/main/java/swg/dao/CityObjectDao.java index 4ad7930..86053ba 100644 --- a/src/main/java/swg/dao/CityObjectDao.java +++ b/src/main/java/swg/dao/CityObjectDao.java @@ -11,6 +11,7 @@ import java.util.List; @Repository public interface CityObjectDao extends JpaRepository { public CityObject findByObjectId(Long objectId); + @Query(value = "SELECT * FROM CITY_OBJECTS WHERE object_id = (SELECT object_id from PROPERTY_LISTS WHERE LIST_ID = 12 AND VALUE LIKE '%::%')", nativeQuery = true) public CityObject findByName(String name); } \ No newline at end of file diff --git a/src/main/java/swg/entity/CreatureObject.java b/src/main/java/swg/entity/CreatureObject.java new file mode 100644 index 0000000..ce49dfc --- /dev/null +++ b/src/main/java/swg/entity/CreatureObject.java @@ -0,0 +1,452 @@ +package swg.entity; + +import javax.persistence.*; + +@Entity +@Table(name = "CREATURE_OBJECTS") +public class CreatureObject { + @Column(name = "OBJECT_ID") + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long objectId; + + @Column(name = "SCALE_FACTOR") + private float scaleFactor; + + @Column(name = "STATES", length = 38) + private int states; + + @Column(name = "POSTURE", length = 38) + private int posture; + + @Column(name = "SHOCK_WOUNDS", length = 38) + private int shockWounds; + + @Column(name = "MASTER_ID", length = 20) + private int masterId; + + @Column(name = "RANK", length = 38) + private int rank; + + @Column(name = "BASE_WALK_SPEED") + private float baseWalkSpeed; + + @Column(name = "BASE_RUN_SPEED") + private float baseRunSpeed; + + @Column(name = "ATTRIBUTE_0", length = 38) + private int attribute0; + + @Column(name = "ATTRIBUTE_1", length = 38) + private int attribute1; + + @Column(name = "ATTRIBUTE_2", length = 38) + private int attribute2; + + @Column(name = "ATTRIBUTE_3", length = 38) + private int attribute3; + + @Column(name = "ATTRIBUTE_4", length = 38) + private int attribute4; + + @Column(name = "ATTRIBUTE_5", length = 38) + private int attribute5; + + @Column(name = "ATTRIBUTE_6", length = 38) + private int attribute6; + + @Column(name = "ATTRIBUTE_7", length = 38) + private int attribute7; + + @Column(name = "ATTRIBUTE_8", length = 38) + private int attribute8; + + @Column(name = "ATTRIBUTE_9", length = 38) + private int attribute9; + + @Column(name = "ATTRIBUTE_10", length = 38) + private int attribute10; + + @Column(name = "ATTRIBUTE_11", length = 38) + private int attribute11; + + @Column(name = "ATTRIBUTE_12", length = 38) + private int attribute12; + + @Column(name = "ATTRIBUTE_13", length = 38) + private int attribute13; + + @Column(name = "ATTRIBUTE_14", length = 38) + private int attribute14; + + @Column(name = "ATTRIBUTE_15", length = 38) + private int attribute15; + + @Column(name = "ATTRIBUTE_16", length = 38) + private int attribute16; + + @Column(name = "ATTRIBUTE_17", length = 38) + private int attribute17; + + @Column(name = "ATTRIBUTE_18", length = 38) + private int attribute18; + + @Column(name = "ATTRIBUTE_19", length = 38) + private int attribute19; + + @Column(name = "ATTRIBUTE_20", length = 38) + private int attribute20; + + @Column(name = "ATTRIBUTE_21", length = 38) + private int attribute21; + + @Column(name = "ATTRIBUTE_22", length = 38) + private int attribute22; + + @Column(name = "ATTRIBUTE_23", length = 38) + private int attribute23; + + @Column(name = "ATTRIBUTE_24", length = 38) + private int attribute24; + + @Column(name = "ATTRIBUTE_25", length = 38) + private int attribute25; + + @Column(name = "ATTRIBUTE_26", length = 38) + private int attribute26; + + @Column(name = "PERSISTED_BUFFS", length = 1000) + private String persistedBuffs; + + @Column(name = "WS_X") + private float wsx; + + @Column(name = "WS_Y") + private float wsy; + + @Column(name = "wsz") + private float wsz; + + protected CreatureObject() { + } + + public Long getObjectId() { + return objectId; + } + + public void setObjectId(Long objectId) { + this.objectId = objectId; + } + + public float getScaleFactor() { + return scaleFactor; + } + + public void setScaleFactor(float scaleFactor) { + this.scaleFactor = scaleFactor; + } + + public int getStates() { + return states; + } + + public void setStates(int states) { + this.states = states; + } + + public int getPosture() { + return posture; + } + + public void setPosture(int posture) { + this.posture = posture; + } + + public int getShockWounds() { + return shockWounds; + } + + public void setShockWounds(int shockWounds) { + this.shockWounds = shockWounds; + } + + public int getMasterId() { + return masterId; + } + + public void setMasterId(int masterId) { + this.masterId = masterId; + } + + public int getRank() { + return rank; + } + + public void setRank(int rank) { + this.rank = rank; + } + + public float getBaseWalkSpeed() { + return baseWalkSpeed; + } + + public void setBaseWalkSpeed(float baseWalkSpeed) { + this.baseWalkSpeed = baseWalkSpeed; + } + + public float getBaseRunSpeed() { + return baseRunSpeed; + } + + public void setBaseRunSpeed(float baseRunSpeed) { + this.baseRunSpeed = baseRunSpeed; + } + + public int getAttribute0() { + return attribute0; + } + + public void setAttribute0(int attribute0) { + this.attribute0 = attribute0; + } + + public int getAttribute1() { + return attribute1; + } + + public void setAttribute1(int attribute1) { + this.attribute1 = attribute1; + } + + public int getAttribute2() { + return attribute2; + } + + public void setAttribute2(int attribute2) { + this.attribute2 = attribute2; + } + + public int getAttribute3() { + return attribute3; + } + + public void setAttribute3(int attribute3) { + this.attribute3 = attribute3; + } + + public int getAttribute4() { + return attribute4; + } + + public void setAttribute4(int attribute4) { + this.attribute4 = attribute4; + } + + public int getAttribute5() { + return attribute5; + } + + public void setAttribute5(int attribute5) { + this.attribute5 = attribute5; + } + + public int getAttribute6() { + return attribute6; + } + + public void setAttribute6(int attribute6) { + this.attribute6 = attribute6; + } + + public int getAttribute7() { + return attribute7; + } + + public void setAttribute7(int attribute7) { + this.attribute7 = attribute7; + } + + public int getAttribute8() { + return attribute8; + } + + public void setAttribute8(int attribute8) { + this.attribute8 = attribute8; + } + + public int getAttribute9() { + return attribute9; + } + + public void setAttribute9(int attribute9) { + this.attribute9 = attribute9; + } + + public int getAttribute10() { + return attribute10; + } + + public void setAttribute10(int attribute10) { + this.attribute10 = attribute10; + } + + public int getAttribute11() { + return attribute11; + } + + public void setAttribute11(int attribute11) { + this.attribute11 = attribute11; + } + + public int getAttribute12() { + return attribute12; + } + + public void setAttribute12(int attribute12) { + this.attribute12 = attribute12; + } + + public int getAttribute13() { + return attribute13; + } + + public void setAttribute13(int attribute13) { + this.attribute13 = attribute13; + } + + public int getAttribute14() { + return attribute14; + } + + public void setAttribute14(int attribute14) { + this.attribute14 = attribute14; + } + + public int getAttribute15() { + return attribute15; + } + + public void setAttribute15(int attribute15) { + this.attribute15 = attribute15; + } + + public int getAttribute16() { + return attribute16; + } + + public void setAttribute16(int attribute16) { + this.attribute16 = attribute16; + } + + public int getAttribute17() { + return attribute17; + } + + public void setAttribute17(int attribute17) { + this.attribute17 = attribute17; + } + + public int getAttribute18() { + return attribute18; + } + + public void setAttribute18(int attribute18) { + this.attribute18 = attribute18; + } + + public int getAttribute19() { + return attribute19; + } + + public void setAttribute19(int attribute19) { + this.attribute19 = attribute19; + } + + public int getAttribute20() { + return attribute20; + } + + public void setAttribute20(int attribute20) { + this.attribute20 = attribute20; + } + + public int getAttribute21() { + return attribute21; + } + + public void setAttribute21(int attribute21) { + this.attribute21 = attribute21; + } + + public int getAttribute22() { + return attribute22; + } + + public void setAttribute22(int attribute22) { + this.attribute22 = attribute22; + } + + public int getAttribute23() { + return attribute23; + } + + public void setAttribute23(int attribute23) { + this.attribute23 = attribute23; + } + + public int getAttribute24() { + return attribute24; + } + + public void setAttribute24(int attribute24) { + this.attribute24 = attribute24; + } + + public int getAttribute25() { + return attribute25; + } + + public void setAttribute25(int attribute25) { + this.attribute25 = attribute25; + } + + public int getAttribute26() { + return attribute26; + } + + public void setAttribute26(int attribute26) { + this.attribute26 = attribute26; + } + + public String getPersistedBuffs() { + return persistedBuffs; + } + + public void setPersistedBuffs(String persistedBuffs) { + this.persistedBuffs = persistedBuffs; + } + + public float getWsx() { + return wsx; + } + + public void setWsx(float wsx) { + this.wsx = wsx; + } + + public float getWsy() { + return wsy; + } + + public void setWsy(float wsy) { + this.wsy = wsy; + } + + public float getWsz() { + return wsz; + } + + public void setWsz(float wsz) { + this.wsz = wsz; + } +} diff --git a/src/main/java/swg/entity/Objects.java b/src/main/java/swg/entity/Objects.java new file mode 100644 index 0000000..7b38bc0 --- /dev/null +++ b/src/main/java/swg/entity/Objects.java @@ -0,0 +1,1049 @@ +package swg.entity; + +import javax.persistence.*; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.List; + +@Entity +@Table(name = "OBJECTS") +public class Objects { + @Column(name = "OBJECT_ID") + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long objectId; + + @Column(name = "X") + private float x; + + @Column(name = "Y") + private float y; + + @Column(name = "Z") + private float z; + + @Column(name = "QUATERNION_W") + private float quaternionW; + + @Column(name = "QUATERNION_X") + private float quaternionX; + + @Column(name = "QUATERNION_Y") + private float quaternionY; + + @Column(name = "QUATERNION_Z") + private float quaternionZ; + + @Column(name = "NODE_X", length = 38) + private int nodeX; + + @Column(name = "NODE_Y", length = 38) + private int nodeY; + + @Column(name = "NODE_Z", length = 38) + private int nodeZ; + + @Column(name = "TYPE_ID", length = 38) + private int typeId; + + @Column(name = "SCENE_ID", length = 50) + private String sceneId; + + @Column(name = "CONTROLLER_TYPE", length = 38) + private int controllerType; + + @Column(name = "DELETED", length = 38) + private int deleted; + + @Column(name = "OBJECT_NAME", length = 127) + private String objectName; + + @Column(name = "VOLUME", length = 38) + private int volume; + + @Column(name = "CONTAINED_BY", length = 20) + private int containedBy; + + @Column(name = "SLOT_ARRANGEMENT", length = 38) + private int slotArrangement; + + @Column(name = "PLAYER_CONTROLLED", length = 1) + private boolean playerControlled; + + @Column(name = "CACHE_VERSION", length = 38) + private int cacheVersion; + + @Column(name = "LOAD_CONTENTS", length = 1) + private boolean loadContents; + + @Column(name = "CASH_BALANCE", length = 38) + private int cashBalance; + + @Column(name = "BANK_BALANCE", length = 38) + private int bankBalance; + + @Column(name = "COMPLEXITY") + private float complexity; + + @Column(name = "NAME_STRING_TABLE", length = 500) + private String nameStringTable; + + @Column(name = "NAME_STRING_TEXT", length = 500) + private String nameStringText; + + @Column(name = "OBJECT_TEMPLATE_ID", length = 38) + private int objectTemplateId; + + @Column(name = "STATIC_ITEM_NAME", length = 128) + private String staticItemName; + + @Column(name = "STATIC_ITEM_VERSION", length = 38) + private int staticItemVersion; + + @Column(name = "CONVERSION_ID", length = 38) + private int conversionId; + + @Column(name = "DELETED_DATE") + private Timestamp deletedDate; + + @Column(name = "LOAD_WITH", length = 20) + private int loadWith; + + @Column(name = "OBJVAR_0_NAME", length = 50) + private String objvar0Name; + + @Column(name = "OBJVAR_0_TYPE", length = 38) + private int objvar0Type; + + @Column(name = "OBJVAR_0_VALUE", length = 50) + private String objvar0Value; + + @Column(name = "OBJVAR_1_NAME", length = 50) + private String objvar1Name; + + @Column(name = "OBJVAR_1_TYPE", length = 38) + private int objvar1Type; + + @Column(name = "OBJVAR_1_VALUE", length = 50) + private String objvar1Value; + + @Column(name = "OBJVAR_2_NAME", length = 50) + private String objvar2Name; + + @Column(name = "OBJVAR_2_TYPE", length = 38) + private int objvar2Type; + + @Column(name = "OBJVAR_2_VALUE", length = 50) + private String objvar2Value; + + @Column(name = "OBJVAR_3_NAME", length = 50) + private String objvar3Name; + + @Column(name = "OBJVAR_3_TYPE", length = 38) + private int objvar3Type; + + @Column(name = "OBJVAR_3_VALUE", length = 50) + private String objvar3Value; + + @Column(name = "OBJVAR_4_NAME", length = 50) + private String objvar4Name; + + @Column(name = "OBJVAR_4_TYPE", length = 38) + private int objvar4Type; + + @Column(name = "OBJVAR_4_VALUE", length = 50) + private String objvar4Value; + + @Column(name = "OBJVAR_5_NAME", length = 50) + private String objvar5Name; + + @Column(name = "OBJVAR_5_TYPE", length = 38) + private int objvar5Type; + + @Column(name = "OBJVAR_5_VALUE", length = 50) + private String objvar5Value; + + @Column(name = "OBJVAR_6_NAME", length = 50) + private String objvar6Name; + + @Column(name = "OBJVAR_6_TYPE", length = 38) + private int objvar6Type; + + @Column(name = "OBJVAR_6_VALUE", length = 50) + private String objvar6Value; + + @Column(name = "OBJVAR_7_NAME", length = 50) + private String objvar7Name; + + @Column(name = "OBJVAR_7_TYPE", length = 38) + private int objvar7Type; + + @Column(name = "OBJVAR_7_VALUE", length = 50) + private String objvar7Value; + + @Column(name = "OBJVAR_8_NAME", length = 50) + private String objvar8Name; + + @Column(name = "OBJVAR_8_TYPE", length = 38) + private int objvar8Type; + + @Column(name = "OBJVAR_8_VALUE", length = 50) + private String objvar8Value; + + @Column(name = "OBJVAR_9_NAME", length = 50) + private String objvar9Name; + + @Column(name = "OBJVAR_9_TYPE", length = 38) + private int objvar9Type; + + @Column(name = "OBJVAR_9_VALUE", length = 50) + private String objvar9Value; + + @Column(name = "OBJVAR_10_NAME", length = 50) + private String objvar10Name; + + @Column(name = "OBJVAR_10_TYPE", length = 38) + private int objvar10Type; + + @Column(name = "OBJVAR_10_VALUE", length = 50) + private String objvar10Value; + + @Column(name = "OBJVAR_11_NAME", length = 50) + private String objvar11Name; + + @Column(name = "OBJVAR_11_TYPE", length = 38) + private int objvar11Type; + + @Column(name = "OBJVAR_11_VALUE", length = 50) + private String objvar11Value; + + @Column(name = "OBJVAR_12_NAME", length = 50) + private String objvar12Name; + + @Column(name = "OBJVAR_12_TYPE", length = 38) + private int objvar12Type; + + @Column(name = "OBJVAR_12_VALUE", length = 50) + private String objvar12Value; + + @Column(name = "OBJVAR_13_NAME", length = 50) + private String objvar13Name; + + @Column(name = "OBJVAR_13_TYPE", length = 38) + private int objvar13Type; + + @Column(name = "OBJVAR_13_VALUE", length = 50) + private String objvar13Value; + + @Column(name = "OBJVAR_14_NAME", length = 50) + private String objvar14Name; + + @Column(name = "OBJVAR_14_TYPE", length = 38) + private int objvar14Type; + + @Column(name = "OBJVAR_14_VALUE", length = 50) + private String objvar14Value; + + @Column(name = "OBJVAR_15_NAME", length = 50) + private String objvar15Name; + + @Column(name = "OBJVAR_15_TYPE", length = 38) + private int objvar15Type; + + @Column(name = "OBJVAR_15_VALUE", length = 50) + private String objvar15Value; + + @Column(name = "OBJVAR_16_NAME", length = 50) + private String objvar16Name; + + @Column(name = "OBJVAR_16_TYPE", length = 38) + private int objvar16Type; + + @Column(name = "OBJVAR_16_VALUE", length = 50) + private String objvar16Value; + + @Column(name = "OBJVAR_17_NAME", length = 50) + private String objvar17Name; + + @Column(name = "OBJVAR_17_TYPE", length = 38) + private int objvar17Type; + + @Column(name = "OBJVAR_17_VALUE", length = 50) + private String objvar17Value; + + @Column(name = "OBJVAR_18_NAME", length = 50) + private String objvar18Name; + + @Column(name = "OBJVAR_18_TYPE", length = 38) + private int objvar18Type; + + @Column(name = "OBJVAR_18_VALUE", length = 50) + private String objvar18Value; + + @Column(name = "OBJVAR_19_NAME", length = 50) + private String objvar19Name; + + @Column(name = "OBJVAR_19_TYPE", length = 38) + private int objvar19Type; + + @Column(name = "OBJVAR_19_VALUE", length = 50) + private String objvar19Value; + + @Column(name = "SCRIPT_LIST", length = 2000) + private String scriptList; + + protected Objects() { + } + + public Long getObjectId() { + return objectId; + } + + public void setObjectId(Long objectId) { + this.objectId = objectId; + } + + public float getX() { + return x; + } + + public void setX(float x) { + this.x = x; + } + + public float getY() { + return y; + } + + public void setY(float y) { + this.y = y; + } + + public float getZ() { + return z; + } + + public void setZ(float z) { + this.z = z; + } + + public float getQuarternionW() { + return quaternionW; + } + + public void setQuarternionW(float quaternionW) { + this.quaternionW = quaternionW; + } + + public float getQuaternionX() { + return quaternionX; + } + + public void setQuaternionX(float quaternionX) { + this.quaternionX = quaternionX; + } + + public float getQuaternionY() { + return quaternionY; + } + + public void setQuaternionY(float quaternionY) { + this.quaternionY = quaternionY; + } + + public float getQuaternionZ() { + return quaternionZ; + } + + public void setQuaternionZ(float quaternionZ) { + this.quaternionZ = quaternionZ; + } + + public int getNodeX() { + return nodeX; + } + + public void setNodeX(int nodeX) { + this.nodeX = nodeX; + } + + public int getNodeY() { + return nodeY; + } + + public void setNodeY(int nodeY) { + this.nodeY = nodeY; + } + + public int getNodeZ() { + return nodeZ; + } + + public void setNodeZ(int nodeZ) { + this.nodeZ = nodeZ; + } + + public int getTypeId() { + return typeId; + } + + public void setTypeId(int typeId) { + this.typeId = typeId; + } + + public String getSceneId() { + return sceneId; + } + + public void setSceneId(String sceneId) { + this.sceneId = sceneId; + } + + public int getControllerType() { + return controllerType; + } + + public void setControllerType(int controllerType) { + this.controllerType = controllerType; + } + + public int getDeleted() { + return deleted; + } + + public void setDeleted(int deleted) { + this.deleted = deleted; + } + + public String getObjectName() { + return objectName; + } + + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + public int getVolume() { + return volume; + } + + public void setVolume(int volume) { + this.volume = volume; + } + + public int getContainedBy() { + return containedBy; + } + + public void setContainedBy(int containedBy) { + this.containedBy = containedBy; + } + + public int getSlotArrangement() { + return slotArrangement; + } + + public void setSlotArrangement(int slotArrangement) { + this.slotArrangement = slotArrangement; + } + + public boolean isPlayerControlled() { + return playerControlled; + } + + public void setPlayerControlled(boolean playerControlled) { + this.playerControlled = playerControlled; + } + + public int getCacheVersion() { + return cacheVersion; + } + + public void setCacheVersion(int cacheVersion) { + this.cacheVersion = cacheVersion; + } + + public boolean isLoadContents() { + return loadContents; + } + + public void setLoadContents(boolean loadContents) { + this.loadContents = loadContents; + } + + public int getCashBalance() { + return cashBalance; + } + + public void setCashBalance(int cashBalance) { + this.cashBalance = cashBalance; + } + + public int getBankBalance() { + return bankBalance; + } + + public void setBankBalance(int bankBalance) { + this.bankBalance = bankBalance; + } + + public float getComplexity() { + return complexity; + } + + public void setComplexity(float complexity) { + this.complexity = complexity; + } + + public String getNameStringTable() { + return nameStringTable; + } + + public void setNameStringTable(String nameStringTable) { + this.nameStringTable = nameStringTable; + } + + public String getNameStringText() { + return nameStringText; + } + + public void setNameStringText(String nameStringText) { + this.nameStringText = nameStringText; + } + + public int getObjectTemplateId() { + return objectTemplateId; + } + + public void setObjectTemplateId(int objectTemplateId) { + this.objectTemplateId = objectTemplateId; + } + + public String getStaticItemName() { + return staticItemName; + } + + public void setStaticItemName(String staticItemName) { + this.staticItemName = staticItemName; + } + + public int getStaticItemVersion() { + return staticItemVersion; + } + + public void setStaticItemVersion(int staticItemVersion) { + this.staticItemVersion = staticItemVersion; + } + + public int getConversionId() { + return conversionId; + } + + public void setConversionId(int conversionId) { + this.conversionId = conversionId; + } + + public Timestamp getDeletedDate() { + return deletedDate; + } + + public void setDeletedDate(Timestamp deletedDate) { + this.deletedDate = deletedDate; + } + + public int getLoadWith() { + return loadWith; + } + + public void setLoadWith(int loadWith) { + this.loadWith = loadWith; + } + + public String getObjvar0Name() { + return objvar0Name; + } + + public void setObjvar0Name(String objvar0Name) { + this.objvar0Name = objvar0Name; + } + + public int getObjvar0Type() { + return objvar0Type; + } + + public void setObjvar0Type(int objvar0Type) { + this.objvar0Type = objvar0Type; + } + + public String getObjvar0Value() { + return objvar0Value; + } + + public void setObjvar0Value(String objvar0Value) { + this.objvar0Value = objvar0Value; + } + + public String getObjvar1Name() { + return objvar1Name; + } + + public void setObjvar1Name(String objvar1Name) { + this.objvar1Name = objvar1Name; + } + + public int getObjvar1Type() { + return objvar1Type; + } + + public void setObjvar1Type(int objvar1Type) { + this.objvar1Type = objvar1Type; + } + + public String getObjvar1Value() { + return objvar1Value; + } + + public void setObjvar1Value(String objvar1Value) { + this.objvar1Value = objvar1Value; + } + + public String getObjvar2Name() { + return objvar2Name; + } + + public void setObjvar2Name(String objvar2Name) { + this.objvar2Name = objvar2Name; + } + + public int getObjvar2Type() { + return objvar2Type; + } + + public void setObjvar2Type(int objvar2Type) { + this.objvar2Type = objvar2Type; + } + + public String getObjvar2Value() { + return objvar2Value; + } + + public void setObjvar2Value(String objvar2Value) { + this.objvar2Value = objvar2Value; + } + + public String getObjvar3Name() { + return objvar3Name; + } + + public void setObjvar3Name(String objvar3Name) { + this.objvar3Name = objvar3Name; + } + + public int getObjvar3Type() { + return objvar3Type; + } + + public void setObjvar3Type(int objvar3Type) { + this.objvar3Type = objvar3Type; + } + + public String getObjvar3Value() { + return objvar3Value; + } + + public void setObjvar3Value(String objvar3Value) { + this.objvar3Value = objvar3Value; + } + + public String getObjvar4Name() { + return objvar4Name; + } + + public void setObjvar4Name(String objvar4Name) { + this.objvar4Name = objvar4Name; + } + + public int getObjvar4Type() { + return objvar4Type; + } + + public void setObjvar4Type(int objvar4Type) { + this.objvar4Type = objvar4Type; + } + + public String getObjvar4Value() { + return objvar4Value; + } + + public void setObjvar4Value(String objvar4Value) { + this.objvar4Value = objvar4Value; + } + + public String getObjvar5Name() { + return objvar5Name; + } + + public void setObjvar5Name(String objvar5Name) { + this.objvar5Name = objvar5Name; + } + + public int getObjvar5Type() { + return objvar5Type; + } + + public void setObjvar5Type(int objvar5Type) { + this.objvar5Type = objvar5Type; + } + + public String getObjvar5Value() { + return objvar5Value; + } + + public void setObjvar5Value(String objvar5Value) { + this.objvar5Value = objvar5Value; + } + + public String getObjvar6Name() { + return objvar6Name; + } + + public void setObjvar6Name(String objvar6Name) { + this.objvar6Name = objvar6Name; + } + + public int getObjvar6Type() { + return objvar6Type; + } + + public void setObjvar6Type(int objvar6Type) { + this.objvar6Type = objvar6Type; + } + + public String getObjvar6Value() { + return objvar6Value; + } + + public void setObjvar6Value(String objvar6Value) { + this.objvar6Value = objvar6Value; + } + + public String getObjvar7Name() { + return objvar7Name; + } + + public void setObjvar7Name(String objvar7Name) { + this.objvar7Name = objvar7Name; + } + + public int getObjvar7Type() { + return objvar7Type; + } + + public void setObjvar7Type(int objvar7Type) { + this.objvar7Type = objvar7Type; + } + + public String getObjvar7Value() { + return objvar7Value; + } + + public void setObjvar7Value(String objvar7Value) { + this.objvar7Value = objvar7Value; + } + + public String getObjvar8Name() { + return objvar8Name; + } + + public void setObjvar8Name(String objvar8Name) { + this.objvar8Name = objvar8Name; + } + + public int getObjvar8Type() { + return objvar8Type; + } + + public void setObjvar8Type(int objvar8Type) { + this.objvar8Type = objvar8Type; + } + + public String getObjvar8Value() { + return objvar8Value; + } + + public void setObjvar8Value(String objvar8Value) { + this.objvar8Value = objvar8Value; + } + + public String getObjvar9Name() { + return objvar9Name; + } + + public void setObjvar9Name(String objvar9Name) { + this.objvar9Name = objvar9Name; + } + + public int getObjvar9Type() { + return objvar9Type; + } + + public void setObjvar9Type(int objvar9Type) { + this.objvar9Type = objvar9Type; + } + + public String getObjvar9Value() { + return objvar9Value; + } + + public void setObjvar9Value(String objvar9Value) { + this.objvar9Value = objvar9Value; + } + + public String getObjvar10Name() { + return objvar10Name; + } + + public void setObjvar10Name(String objvar10Name) { + this.objvar10Name = objvar10Name; + } + + public int getObjvar10Type() { + return objvar10Type; + } + + public void setObjvar10Type(int objvar10Type) { + this.objvar10Type = objvar10Type; + } + + public String getObjvar10Value() { + return objvar10Value; + } + + public void setObjvar10Value(String objvar10Value) { + this.objvar10Value = objvar10Value; + } + + public String getObjvar11Name() { + return objvar11Name; + } + + public void setObjvar11Name(String objvar11Name) { + this.objvar11Name = objvar11Name; + } + + public int getObjvar11Type() { + return objvar11Type; + } + + public void setObjvar11Type(int objvar11Type) { + this.objvar11Type = objvar11Type; + } + + public String getObjvar11Value() { + return objvar11Value; + } + + public void setObjvar11Value(String objvar11Value) { + this.objvar11Value = objvar11Value; + } + + public String getObjvar12Name() { + return objvar12Name; + } + + public void setObjvar12Name(String objvar12Name) { + this.objvar12Name = objvar12Name; + } + + public int getObjvar12Type() { + return objvar12Type; + } + + public void setObjvar12Type(int objvar12Type) { + this.objvar12Type = objvar12Type; + } + + public String getObjvar12Value() { + return objvar12Value; + } + + public void setObjvar12Value(String objvar12Value) { + this.objvar12Value = objvar12Value; + } + + public String getObjvar13Name() { + return objvar13Name; + } + + public void setObjvar13Name(String objvar13Name) { + this.objvar13Name = objvar13Name; + } + + public int getObjvar13Type() { + return objvar13Type; + } + + public void setObjvar13Type(int objvar13Type) { + this.objvar13Type = objvar13Type; + } + + public String getObjvar13Value() { + return objvar13Value; + } + + public void setObjvar13Value(String objvar13Value) { + this.objvar13Value = objvar13Value; + } + + public String getObjvar14Name() { + return objvar14Name; + } + + public void setObjvar14Name(String objvar14Name) { + this.objvar14Name = objvar14Name; + } + + public int getObjvar14Type() { + return objvar14Type; + } + + public void setObjvar14Type(int objvar14Type) { + this.objvar14Type = objvar14Type; + } + + public String getObjvar14Value() { + return objvar14Value; + } + + public void setObjvar14Value(String objvar14Value) { + this.objvar14Value = objvar14Value; + } + + public String getObjvar15Name() { + return objvar15Name; + } + + public void setObjvar15Name(String objvar15Name) { + this.objvar15Name = objvar15Name; + } + + public int getObjvar15Type() { + return objvar15Type; + } + + public void setObjvar15Type(int objvar15Type) { + this.objvar15Type = objvar15Type; + } + + public String getObjvar15Value() { + return objvar15Value; + } + + public void setObjvar15Value(String objvar15Value) { + this.objvar15Value = objvar15Value; + } + + public String getObjvar16Name() { + return objvar16Name; + } + + public void setObjvar16Name(String objvar16Name) { + this.objvar16Name = objvar16Name; + } + + public int getObjvar16Type() { + return objvar16Type; + } + + public void setObjvar16Type(int objvar16Type) { + this.objvar16Type = objvar16Type; + } + + public String getObjvar16Value() { + return objvar16Value; + } + + public void setObjvar16Value(String objvar16Value) { + this.objvar16Value = objvar16Value; + } + + public String getObjvar17Name() { + return objvar17Name; + } + + public void setObjvar17Name(String objvar17Name) { + this.objvar17Name = objvar17Name; + } + + public int getObjvar17Type() { + return objvar17Type; + } + + public void setObjvar17Type(int objvar17Type) { + this.objvar17Type = objvar17Type; + } + + public String getObjvar17Value() { + return objvar17Value; + } + + public void setObjvar17Value(String objvar17Value) { + this.objvar17Value = objvar17Value; + } + + public String getObjvar18Name() { + return objvar18Name; + } + + public void setObjvar18Name(String objvar18Name) { + this.objvar18Name = objvar18Name; + } + + public int getObjvar18Type() { + return objvar18Type; + } + + public void setObjvar18Type(int objvar18Type) { + this.objvar18Type = objvar18Type; + } + + public String getObjvar18Value() { + return objvar18Value; + } + + public void setObjvar18Value(String objvar18Value) { + this.objvar18Value = objvar18Value; + } + + public String getObjvar19Name() { + return objvar19Name; + } + + public void setObjvar19Name(String objvar19Name) { + this.objvar19Name = objvar19Name; + } + + public int getObjvar19Type() { + return objvar19Type; + } + + public void setObjvar19Type(int objvar19Type) { + this.objvar19Type = objvar19Type; + } + + public String getObjvar19Value() { + return objvar19Value; + } + + public void setObjvar19Value(String objvar19Value) { + this.objvar19Value = objvar19Value; + } + + public String getScriptList() { + return scriptList; + } + + public void setScriptList(String scriptList) { + this.scriptList = scriptList; + } +} diff --git a/src/main/java/swg/entity/Player.java b/src/main/java/swg/entity/Player.java index bb9b685..93d0d2e 100644 --- a/src/main/java/swg/entity/Player.java +++ b/src/main/java/swg/entity/Player.java @@ -1,12 +1,16 @@ package swg.entity; import javax.persistence.*; -import java.util.Date; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; import java.util.List; +import java.util.Optional; @Entity @Table(name = "PLAYERS") public class Player { + final private static int PLAYER_OBJECT_TYPE_ID = 1347174745; + @Column(name = "CHARACTER_OBJECT") @Id @GeneratedValue(strategy = GenerationType.AUTO) @@ -22,14 +26,17 @@ public class Player { private String characterFullName; @Column(name = "CREATE_TIME", nullable = true) - private Date createTime; + private Timestamp createTime; @Column(name = "LAST_LOGIN_TIME", nullable = true) - private Date lastLoginTime; + private Timestamp lastLoginTime; @OneToMany(mappedBy = "objectId") private List propertyLists; + @OneToMany(mappedBy = "containedBy") + private List containers; + protected Player() { } @@ -65,27 +72,43 @@ public class Player { this.characterFullName = characterFullName; } - public Date getCreateTime() { - return createTime; + public String getCreateTime() { + return new SimpleDateFormat("MMMMM dd, yyyy hh:mm:ss a").format(createTime); } - public void setCreateTime(Date createTime) { + public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } - public Date getLastLoginTime() { - return lastLoginTime; - } + public String getLastLoginTime() { + return new SimpleDateFormat("MMMMM dd, yyyy hh:mm:ss a").format(lastLoginTime); } - public void setLastLoginTime(Date lastLoginTime) { + public void setLastLoginTime(Timestamp lastLoginTime) { this.lastLoginTime = lastLoginTime; } - public List getPropertyList() { + public List getPropertyLists() { return propertyLists; } - public void setPropertyList(List propertyLists) { + public void setPropertyLists(List propertyLists) { this.propertyLists = propertyLists; } + + public List getContainers() { + return containers; + } + + public void setContainers(List containers) { + this.containers = containers; + } + + public Long getPlayerObjectId() { + Optional o = this.containers.stream().filter(c -> c.getTypeId() == PLAYER_OBJECT_TYPE_ID).findFirst(); + if(o.isPresent()) { + Objects playerObject = o.get(); + return playerObject.getObjectId(); + } + return null; + } } diff --git a/src/main/java/swg/entity/PlayerObject.java b/src/main/java/swg/entity/PlayerObject.java new file mode 100644 index 0000000..353fc41 --- /dev/null +++ b/src/main/java/swg/entity/PlayerObject.java @@ -0,0 +1,374 @@ +package swg.entity; + +import javax.persistence.*; + +@Entity +@Table(name = "PLAYER_OBJECTS") +public class PlayerObject { + @Id + @Column(name = "OBJECT_ID", nullable = false, length = 20) + private Long objectId; + + @Column(name = "STATION_ID", nullable = true, length = 38) + private Long stationId; + + @Column(name = "PERSONAL_PROFILE_ID", nullable = true, length = 200) + private String personalProfileId; + + @Column(name = "CHARACTER_PROFILE_ID", nullable = true, length = 200) + private String characterProfileId; + + @Column(name = "SKILL_TITLE", nullable = true, length = 200) + private String skillTitle; + + @Column(name = "BORN_DATE", nullable = true, length = 38) + private int bornDate; + + @Column(name = "PLAYED_TIME", nullable = true, length = 38) + private int playedTime; + + @Column(name = "FORCE_REGEN_RATE", nullable = true) + private float forceRegenRate; + + @Column(name = "FORCE_POWER", nullable = true, length = 38) + private int forcePower; + + @Column(name = "MAX_FORCE_POWER", nullable = true, length = 38) + private int maxForcePower; + + @Column(name = "NUM_LOTS", nullable = true, length = 38) + private int numLots; + + @Column(name = "ACTIVE_QUESTS", nullable = true, length = 512) + private String activeQuests; + + @Column(name = "COMPLETED_QUESTS", nullable = true, length = 512) + private String completedQuests; + + @Column(name = "CURRENT_QUEST", nullable = true, length = 38) + private int currentQuest; + + @Column(name = "ROLE_ICON_CHOICE", nullable = true, length = 38) + private int roleIconChoice; + + @Column(name = "QUESTS", nullable = true, length = 4000) + private String quests; + + @Column(name = "QUESTS2", nullable = true, length = 4000) + private String quests2; + + @Column(name = "QUESTS3", nullable = true, length = 4000) + private String quests3; + + @Column(name = "QUESTS4", nullable = true, length = 4000) + private String quests4; + + @Column(name = "SKILL_TEMPLATE", nullable = true, length = 200) + private String skillTemplate; + + @Column(name = "WORKING_SKILL", nullable = true, length = 200) + private String workingSkill; + + @Column(name = "CURRENT_GCW_POINTS", nullable = true, length = 38) + private int currentGcwPoints; + + @Column(name = "CURRENT_GCW_RATING", nullable = true, length = 38) + private int currentGcwRating; + + @Column(name = "CURRENT_PVP_KILLS", nullable = true, length = 38) + private int currentGcwKills; + + @Column(name = "LIFETIME_GCW_POINTS", nullable = true, length = 38) + private int lifetimeGcwPoints; + + @Column(name = "MAX_GCW_IMPERIAL_RATING", nullable = true, length = 38) + private int maxGcwImperialRating; + + @Column(name = "MAX_GCW_REBEL_RATING", nullable = true, length = 38) + private int maxGcwRebelRating; + + @Column(name = "LIFETIME_PVP_KILLS", nullable = true, length = 38) + private int lifetimePvpKills; + + @Column(name = "NEXT_GCW_RATING_CALC_TIME", nullable = true, length = 38) + private int nextGcwRatingCalcTime; + + @Column(name = "COLLECTIONS", nullable = true, length = 4000) + private String collections; + + @Column(name = "COLLECTIONS2", nullable = true, length = 4000) + private String collections2; + + @Column(name = "SHOW_BACKPACK", nullable = true, length = 1) + private char showBackpack; + + @Column(name = "SHOW_HELMET", nullable = true, length = 1) + private char showHelmet; + + protected PlayerObject() { + } + + public Long getObjectId() { + return objectId; + } + + public void setObjectId(Long objectId) { + this.objectId = objectId; + } + + public Long getStationId() { + return stationId; + } + + public void setStationId(Long stationId) { + this.stationId = stationId; + } + + public String getPersonalProfileId() { + return personalProfileId; + } + + public void setPersonalProfileId(String personalProfileId) { + this.personalProfileId = personalProfileId; + } + + public String getCharacterProfileId() { + return characterProfileId; + } + + public void setCharacterProfileId(String characterProfileId) { + this.characterProfileId = characterProfileId; + } + + public String getSkillTitle() { + return skillTitle; + } + + public void setSkillTitle(String skillTitle) { + this.skillTitle = skillTitle; + } + + public int getBornDate() { + return bornDate; + } + + public void setBornDate(int bornDate) { + this.bornDate = bornDate; + } + + public int getPlayedTime() { + return playedTime; + } + + public void setPlayedTime(int playedTime) { + this.playedTime = playedTime; + } + + public float getForceRegenRate() { + return forceRegenRate; + } + + public void setForceRegenRate(float forceRegenRate) { + this.forceRegenRate = forceRegenRate; + } + + public int getForcePower() { + return forcePower; + } + + public void setForcePower(int forcePower) { + this.forcePower = forcePower; + } + + public int getMaxForcePower() { + return maxForcePower; + } + + public void setMaxForcePower(int maxForcePower) { + this.maxForcePower = maxForcePower; + } + + public int getNumLots() { + return numLots; + } + + public void setNumLots(int numLots) { + this.numLots = numLots; + } + + public String getActiveQuests() { + return activeQuests; + } + + public void setActiveQuests(String activeQuests) { + this.activeQuests = activeQuests; + } + + public String getCompletedQuests() { + return completedQuests; + } + + public void setCompletedQuests(String completedQuests) { + this.completedQuests = completedQuests; + } + + public int getCurrentQuest() { + return currentQuest; + } + + public void setCurrentQuest(int currentQuest) { + this.currentQuest = currentQuest; + } + + public int getRoleIconChoice() { + return roleIconChoice; + } + + public void setRoleIconChoice(int roleIconChoice) { + this.roleIconChoice = roleIconChoice; + } + + public String getQuests() { + return quests; + } + + public void setQuests(String quests) { + this.quests = quests; + } + + public String getQuests2() { + return quests2; + } + + public void setQuests2(String quests2) { + this.quests2 = quests2; + } + + public String getQuests3() { + return quests3; + } + + public void setQuests3(String quests3) { + this.quests3 = quests3; + } + + public String getQuests4() { + return quests4; + } + + public void setQuests4(String quests4) { + this.quests4 = quests4; + } + + public String getSkillTemplate() { + return skillTemplate; + } + + public void setSkillTemplate(String skillTemplate) { + this.skillTemplate = skillTemplate; + } + + public String getWorkingSkill() { + return workingSkill; + } + + public void setWorkingSkill(String workingSkill) { + this.workingSkill = workingSkill; + } + + public int getCurrentGcwPoints() { + return currentGcwPoints; + } + + public void setCurrentGcwPoints(int currentGcwPoints) { + this.currentGcwPoints = currentGcwPoints; + } + + public int getCurrentGcwRating() { + return currentGcwRating; + } + + public void setCurrentGcwRating(int currentGcwRating) { + this.currentGcwRating = currentGcwRating; + } + + public int getCurrentGcwKills() { + return currentGcwKills; + } + + public void setCurrentGcwKills(int currentGcwKills) { + this.currentGcwKills = currentGcwKills; + } + + public int getLifetimeGcwPoints() { + return lifetimeGcwPoints; + } + + public void setLifetimeGcwPoints(int lifetimeGcwPoints) { + this.lifetimeGcwPoints = lifetimeGcwPoints; + } + + public int getMaxGcwImperialRating() { + return maxGcwImperialRating; + } + + public void setMaxGcwImperialRating(int maxGcwImperialRating) { + this.maxGcwImperialRating = maxGcwImperialRating; + } + + public int getMaxGcwRebelRating() { + return maxGcwRebelRating; + } + + public void setMaxGcwRebelRating(int maxGcwRebelRating) { + this.maxGcwRebelRating = maxGcwRebelRating; + } + + public int getLifetimePvpKills() { + return lifetimePvpKills; + } + + public void setLifetimePvpKills(int lifetimePvpKills) { + this.lifetimePvpKills = lifetimePvpKills; + } + + public int getNextGcwRatingCalcTime() { + return nextGcwRatingCalcTime; + } + + public void setNextGcwRatingCalcTime(int nextGcwRatingCalcTime) { + this.nextGcwRatingCalcTime = nextGcwRatingCalcTime; + } + + public String getCollections() { + return collections; + } + + public void setCollections(String collections) { + this.collections = collections; + } + + public String getCollections2() { + return collections2; + } + + public void setCollections2(String collections2) { + this.collections2 = collections2; + } + + public char getShowBackpack() { + return showBackpack; + } + + public void setShowBackpack(char showBackpack) { + this.showBackpack = showBackpack; + } + + public char getShowHelmet() { + return showHelmet; + } + + public void setShowHelmet(char showHelmet) { + this.showHelmet = showHelmet; + } +} diff --git a/src/main/java/swg/entity/SwgConfiguration.java b/src/main/java/swg/entity/SwgConfiguration.java index 71d9704..ee7f048 100644 --- a/src/main/java/swg/entity/SwgConfiguration.java +++ b/src/main/java/swg/entity/SwgConfiguration.java @@ -758,10 +758,12 @@ public class SwgConfiguration { private String type; private String path; private List filters; + private boolean status; LogTarget() {} public String toString() { + if(!status) return null; StringBuilder output = new StringBuilder(type + ":" + path); if(filters != null && filters.size() > 0) { int filterSize = filters.size(); @@ -785,6 +787,7 @@ public class SwgConfiguration { public String toString() { return getTypeValue() + getFilteredValue() + (isNegate() ? "!" : "") + match; + } private String getTypeValue() { @@ -839,6 +842,14 @@ public class SwgConfiguration { } } + public boolean isStatus() { + return status; + } + + public void setStatus(boolean status) { + this.status = status; + } + public String getType() { return type; } diff --git a/src/main/resources/swg-defaults.yml b/src/main/resources/swg-defaults.yml index f9e8208..45c852a 100644 --- a/src/main/resources/swg-defaults.yml +++ b/src/main/resources/swg-defaults.yml @@ -140,6 +140,7 @@ sharedLog: - type: net path: 127.0.0.1:44467 filters: + status: true - type: file path: logs/log.txt filters: @@ -151,6 +152,7 @@ sharedLog: match: CustomerService negate: false filtered: true + status: true sharedNetwork: oldestUnacknowledgedTimeout: 0 noDataTimeout: 1000000