|
|
@ -10,6 +10,7 @@ |
|
|
|
package engine.net.client.msg; |
|
|
|
package engine.net.client.msg; |
|
|
|
|
|
|
|
|
|
|
|
import engine.Enum.GameObjectType; |
|
|
|
import engine.Enum.GameObjectType; |
|
|
|
|
|
|
|
import engine.gameManager.BuildingManager; |
|
|
|
import engine.gameManager.ZoneManager; |
|
|
|
import engine.gameManager.ZoneManager; |
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
import engine.net.AbstractConnection; |
|
|
|
import engine.net.AbstractConnection; |
|
|
@ -21,19 +22,19 @@ import engine.objects.Building; |
|
|
|
|
|
|
|
|
|
|
|
public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
|
|
|
|
|
|
|
|
private int sourceType; |
|
|
|
private int sourceType; //ordinal of the character type that sent this message 54=PlayerCharacter
|
|
|
|
private int sourceID; |
|
|
|
private int sourceID; // uuid of the source character of this message
|
|
|
|
private float startLat; |
|
|
|
private float startLat; //start loc of move message (offset if inside a building not world loc)
|
|
|
|
private float startLon; |
|
|
|
private float startLon; //start loc of move message (offset if inside a building not world loc)
|
|
|
|
private float startAlt; |
|
|
|
private float startAlt; //start loc of move message (offset if inside a building not world loc)
|
|
|
|
private float endLat; |
|
|
|
private float endLat; //end loc of move message (offset if inside a building not world loc)
|
|
|
|
private float endLon; |
|
|
|
private float endLon; //end loc of move message (offset if inside a building not world loc)
|
|
|
|
private float endAlt; |
|
|
|
private float endAlt; //end loc of move message (offset if inside a building not world loc)
|
|
|
|
private int targetType; |
|
|
|
private int startLocType; // enum ordinal of the object player is inside 0=nothing 8=building
|
|
|
|
private int targetID; |
|
|
|
private int inBuildingUUID; // uuid of the building character is currently inside
|
|
|
|
private int inBuilding; // 0=true, -1=false 0/1/2 = floor you are on
|
|
|
|
private int inBuilding; // is inside a building 0=true -1=false
|
|
|
|
private int unknown01; |
|
|
|
private int inBuildingFloor; // floor of building character is currently in -1=not inside building 0/1/2/3 = floor number
|
|
|
|
private byte unknown02; |
|
|
|
private byte initiatedByAttack; // move message sent as a result of move to target to attack 0=false 1=true
|
|
|
|
private byte unknown03; |
|
|
|
private byte unknown03; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -54,11 +55,11 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.endLat = msg.endLat; |
|
|
|
this.endLat = msg.endLat; |
|
|
|
this.endLon = msg.endLon; |
|
|
|
this.endLon = msg.endLon; |
|
|
|
this.endAlt = msg.endAlt; |
|
|
|
this.endAlt = msg.endAlt; |
|
|
|
this.targetType = msg.targetType; |
|
|
|
this.startLocType = msg.startLocType; |
|
|
|
this.targetID = msg.targetID; |
|
|
|
this.inBuildingUUID = msg.inBuildingUUID; |
|
|
|
this.inBuilding = msg.inBuilding; |
|
|
|
this.inBuilding = msg.inBuilding; |
|
|
|
this.unknown01 = msg.unknown01; |
|
|
|
this.inBuildingFloor = msg.inBuildingFloor; |
|
|
|
this.unknown02 = msg.unknown02; |
|
|
|
this.initiatedByAttack = msg.initiatedByAttack; |
|
|
|
this.unknown03 = msg.unknown03; |
|
|
|
this.unknown03 = msg.unknown03; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -73,11 +74,11 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.endLat = building.getLoc().x; |
|
|
|
this.endLat = building.getLoc().x; |
|
|
|
this.endLon = building.getLoc().z; |
|
|
|
this.endLon = building.getLoc().z; |
|
|
|
this.endAlt = building.getLoc().y; |
|
|
|
this.endAlt = building.getLoc().y; |
|
|
|
this.targetType = 0; |
|
|
|
this.startLocType = 0; |
|
|
|
this.targetID = 0; |
|
|
|
this.inBuildingUUID = 0; |
|
|
|
this.inBuilding = -1; |
|
|
|
this.inBuilding = -1; |
|
|
|
this.unknown01 = -1; |
|
|
|
this.inBuildingFloor = -1; |
|
|
|
this.unknown02 = 0; |
|
|
|
this.initiatedByAttack = 0; |
|
|
|
this.unknown03 = 0; |
|
|
|
this.unknown03 = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -108,11 +109,11 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
writer.putFloat(this.endAlt); |
|
|
|
writer.putFloat(this.endAlt); |
|
|
|
writer.putFloat(this.endLon); |
|
|
|
writer.putFloat(this.endLon); |
|
|
|
|
|
|
|
|
|
|
|
writer.putInt(this.targetType); |
|
|
|
writer.putInt(this.startLocType); |
|
|
|
writer.putInt(this.targetID); |
|
|
|
writer.putInt(this.inBuildingUUID); |
|
|
|
|
|
|
|
|
|
|
|
writer.putInt(this.inBuilding); |
|
|
|
writer.putInt(this.inBuilding); |
|
|
|
writer.putInt(this.unknown01); |
|
|
|
writer.putInt(this.inBuildingFloor); |
|
|
|
|
|
|
|
|
|
|
|
writer.put((byte) 0); |
|
|
|
writer.put((byte) 0); |
|
|
|
writer.put((byte) 0); |
|
|
|
writer.put((byte) 0); |
|
|
@ -135,13 +136,13 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.endAlt = reader.getFloat(); |
|
|
|
this.endAlt = reader.getFloat(); |
|
|
|
this.endLon = reader.getFloat(); |
|
|
|
this.endLon = reader.getFloat(); |
|
|
|
|
|
|
|
|
|
|
|
this.targetType = reader.getInt(); |
|
|
|
this.startLocType = reader.getInt(); |
|
|
|
this.targetID = reader.getInt(); |
|
|
|
this.inBuildingUUID = reader.getInt(); |
|
|
|
|
|
|
|
|
|
|
|
this.inBuilding = reader.getInt(); |
|
|
|
this.inBuilding = reader.getInt(); |
|
|
|
this.unknown01 = reader.getInt(); |
|
|
|
this.inBuildingFloor = reader.getInt(); |
|
|
|
|
|
|
|
|
|
|
|
this.unknown02 = reader.get(); |
|
|
|
this.initiatedByAttack = reader.get(); |
|
|
|
this.unknown03 = reader.get(); |
|
|
|
this.unknown03 = reader.get(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -209,20 +210,20 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.endAlt = value; |
|
|
|
this.endAlt = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getTargetType() { |
|
|
|
public int getStartLocType() { |
|
|
|
return this.targetType; |
|
|
|
return this.startLocType; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTargetType(int value) { |
|
|
|
public void setStartLocType(int value) { |
|
|
|
this.targetType = value; |
|
|
|
this.startLocType = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getTargetID() { |
|
|
|
public int getInBuildingUUID() { |
|
|
|
return this.targetID; |
|
|
|
return this.inBuildingUUID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTargetID(int value) { |
|
|
|
public void setInBuildingUUID(int value) { |
|
|
|
this.targetID = value; |
|
|
|
this.inBuildingUUID = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getInBuilding() { |
|
|
|
public int getInBuilding() { |
|
|
@ -233,12 +234,8 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.inBuilding = value; |
|
|
|
this.inBuilding = value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getUnknown01() { |
|
|
|
public void setInBuildingFloor(int value) { |
|
|
|
return this.unknown01; |
|
|
|
this.inBuildingFloor = value; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setUnknown01(int value) { |
|
|
|
|
|
|
|
this.unknown01 = value; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setStartCoord(Vector3fImmutable value) { |
|
|
|
public void setStartCoord(Vector3fImmutable value) { |
|
|
@ -254,8 +251,8 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void clearTarget() { |
|
|
|
public void clearTarget() { |
|
|
|
this.targetType = 0; |
|
|
|
this.startLocType = 0; |
|
|
|
this.targetID = 0; |
|
|
|
this.inBuildingUUID = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPlayer(AbstractCharacter ac) { |
|
|
|
public void setPlayer(AbstractCharacter ac) { |
|
|
@ -263,10 +260,10 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
this.sourceID = ac.getObjectUUID(); |
|
|
|
this.sourceID = ac.getObjectUUID(); |
|
|
|
this.setStartCoord(ac.getLoc()); |
|
|
|
this.setStartCoord(ac.getLoc()); |
|
|
|
this.setEndCoord(ac.getEndLoc()); |
|
|
|
this.setEndCoord(ac.getEndLoc()); |
|
|
|
this.targetType = 0; |
|
|
|
this.startLocType = 0; |
|
|
|
this.targetID = 0; |
|
|
|
this.inBuildingUUID = 0; |
|
|
|
this.inBuilding = ac.getInBuilding(); |
|
|
|
this.inBuilding = ac.getInBuilding(); |
|
|
|
this.unknown01 = ac.getInFloorID(); |
|
|
|
this.inBuildingFloor = ac.getInFloorID(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -274,10 +271,10 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
if (target == null) { |
|
|
|
if (target == null) { |
|
|
|
this.setStartCoord(ac.getLoc()); |
|
|
|
this.setStartCoord(ac.getLoc()); |
|
|
|
this.setEndCoord(ac.getEndLoc()); |
|
|
|
this.setEndCoord(ac.getEndLoc()); |
|
|
|
this.targetType = 0; |
|
|
|
this.startLocType = 0; |
|
|
|
this.targetID = 0; |
|
|
|
this.inBuildingUUID = 0; |
|
|
|
this.inBuilding = -1; |
|
|
|
this.inBuilding = -1; |
|
|
|
this.unknown01 = -1; |
|
|
|
this.inBuildingFloor = -1; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Vector3fImmutable convertLocStart = ZoneManager.convertWorldToLocal(target, ac.getLoc()); |
|
|
|
Vector3fImmutable convertLocStart = ZoneManager.convertWorldToLocal(target, ac.getLoc()); |
|
|
|
Vector3fImmutable convertLocEnd = convertLocStart; |
|
|
|
Vector3fImmutable convertLocEnd = convertLocStart; |
|
|
@ -286,10 +283,10 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
|
|
|
|
|
|
|
|
this.setStartCoord(convertLocStart); |
|
|
|
this.setStartCoord(convertLocStart); |
|
|
|
this.setEndCoord(convertLocEnd); |
|
|
|
this.setEndCoord(convertLocEnd); |
|
|
|
this.targetType = GameObjectType.Building.ordinal(); |
|
|
|
this.startLocType = GameObjectType.Building.ordinal(); |
|
|
|
this.targetID = target.getObjectUUID(); |
|
|
|
this.inBuildingUUID = target.getObjectUUID(); |
|
|
|
this.inBuilding = ac.getInBuilding(); |
|
|
|
this.inBuilding = ac.getInBuilding(); |
|
|
|
this.unknown01 = ac.getInFloorID(); |
|
|
|
this.inBuildingFloor = ac.getInFloorID(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -298,7 +295,11 @@ public class MoveToPointMsg extends ClientNetMsg { |
|
|
|
return unknown03; |
|
|
|
return unknown03; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getUnknown02() { |
|
|
|
public int getInitiatedFromAttack() { |
|
|
|
return unknown02; |
|
|
|
return initiatedByAttack; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getInBuildingFloor() { |
|
|
|
|
|
|
|
return this.inBuildingFloor; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|