Move to point message variable naming and handler cleanup

This commit is contained in:
2023-09-10 19:37:46 -05:00
parent 9989cbff24
commit 003b939d33
7 changed files with 84 additions and 89 deletions
+10 -10
View File
@@ -116,8 +116,8 @@ public enum MovementManager {
// if inside a building, convert both locations from the building local reference frame to the world reference frame
if (msg.getTargetID() > 0) {
Building building = BuildingManager.getBuildingFromCache(msg.getTargetID());
if (msg.getInBuildingUUID() > 0) {
Building building = BuildingManager.getBuildingFromCache(msg.getInBuildingUUID());
if (building != null) {
Vector3fImmutable convertLocEnd = new Vector3fImmutable(ZoneManager.convertLocalToWorld(building, endLocation));
@@ -128,8 +128,8 @@ public enum MovementManager {
// }
// else {
toMove.setInBuilding(msg.getInBuilding());
toMove.setInFloorID(msg.getUnknown01());
toMove.setInBuildingID(msg.getTargetID());
toMove.setInFloorID(msg.getInBuildingFloor());
toMove.setInBuildingID(msg.getInBuildingUUID());
msg.setStartCoord(ZoneManager.convertWorldToLocal(building, toMove.getLoc()));
if (toMove.getObjectType() == GameObjectType.PlayerCharacter) {
@@ -174,9 +174,9 @@ public enum MovementManager {
msg.setStartCoord(ZoneManager.convertWorldToLocal(Regions.GetBuildingForRegion(toMove.region), toMove.getLoc()));
msg.setEndCoord(ZoneManager.convertWorldToLocal(regionBuilding, endLocation));
msg.setInBuilding(toMove.region.level);
msg.setUnknown01(toMove.region.room);
msg.setTargetType(GameObjectType.Building.ordinal());
msg.setTargetID(regionBuilding.getObjectUUID());
msg.setInBuildingFloor(toMove.region.room);
msg.setStartLocType(GameObjectType.Building.ordinal());
msg.setInBuildingUUID(regionBuilding.getObjectUUID());
}
} else {
@@ -185,8 +185,8 @@ public enum MovementManager {
toMove.setInBuilding(-1);
msg.setStartCoord(toMove.getLoc());
msg.setEndCoord(endLocation);
msg.setTargetType(0);
msg.setTargetID(0);
msg.setStartLocType(0);
msg.setInBuildingUUID(0);
}
//checks sync between character and server, if out of sync, teleport player to original position and return.
@@ -233,7 +233,7 @@ public enum MovementManager {
toMove.cancelOnMove();
//cancel any attacks for manual move.
if ((toMove.getObjectType() == GameObjectType.PlayerCharacter) && msg.getUnknown02() == 0)
if ((toMove.getObjectType() == GameObjectType.PlayerCharacter) && msg.getInitiatedFromAttack() == 0)
toMove.setCombatTarget(null);