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