Clean up some Position usage to avoid unneccessary unpacks

This commit is contained in:
AnimeGitB
2022-08-22 17:08:34 +09:30
parent dbf2b91d03
commit 36b71d0198
7 changed files with 23 additions and 47 deletions

View File

@@ -25,11 +25,7 @@ public class MapMark {
public MapMark(MapMarkPoint mapMarkPoint) {
this.sceneId = mapMarkPoint.getSceneId();
this.name = mapMarkPoint.getName();
this.position = new Position(
mapMarkPoint.getPos().getX(),
mapMarkPoint.getPos().getY(),
mapMarkPoint.getPos().getZ()
);
this.position = new Position(mapMarkPoint.getPos());
this.mapMarkPointType = mapMarkPoint.getPointType();
this.monsterId = mapMarkPoint.getMonsterId();
this.mapMarkFromType = mapMarkPoint.getFromType();

View File

@@ -497,11 +497,7 @@ public class StaminaManager extends BasePlayerManager {
}
}
previousState = currentState;
previousCoordinates = new Position(
currentCoordinates.getX(),
currentCoordinates.getY(),
currentCoordinates.getZ()
);
previousCoordinates = currentCoordinates.clone();
}
}