From 73fadfb767c5b26fd824758408cab02af2557936 Mon Sep 17 00:00:00 2001 From: Melledy <52122272+Melledy@users.noreply.github.com> Date: Sat, 28 May 2022 22:34:39 -0700 Subject: [PATCH] Fix map mark issues from updating from 2.6 Close #1086 --- .../game/managers/MapMarkManager/MapMark.java | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/managers/MapMarkManager/MapMark.java b/src/main/java/emu/grasscutter/game/managers/MapMarkManager/MapMark.java index 5e8a6b2dd..e49d0c802 100644 --- a/src/main/java/emu/grasscutter/game/managers/MapMarkManager/MapMark.java +++ b/src/main/java/emu/grasscutter/game/managers/MapMarkManager/MapMark.java @@ -8,13 +8,19 @@ import emu.grasscutter.utils.Position; @Entity public class MapMark { - private final int sceneId; - private final String name; - private final Position position; - private final MapMarkPointType pointType; - private final int monsterId; - private final MapMarkFromType fromType; - private final int questId; + private int sceneId; + private String name; + private Position position; + private MapMarkPointType mapMarkPointType; + private int monsterId; + private MapMarkFromType mapMarkFromType; + private int questId; + + @Deprecated // Morhpia + public MapMark() { + this.mapMarkPointType = MapMarkPointType.MAP_MARK_POINT_TYPE_MONSTER; + this.mapMarkFromType = MapMarkFromType.MAP_MARK_FROM_TYPE_MONSTER; + } public MapMark(MapMarkPoint mapMarkPoint) { this.sceneId = mapMarkPoint.getSceneId(); @@ -24,30 +30,36 @@ public class MapMark { mapMarkPoint.getPos().getY(), mapMarkPoint.getPos().getZ() ); - this.pointType = mapMarkPoint.getPointType(); + this.mapMarkPointType = mapMarkPoint.getPointType(); this.monsterId = mapMarkPoint.getMonsterId(); - this.fromType = mapMarkPoint.getFromType(); + this.mapMarkFromType = mapMarkPoint.getFromType(); this.questId = mapMarkPoint.getQuestId(); } public int getSceneId() { return this.sceneId; } + public String getName() { return this.name; } + public Position getPosition() { return this.position; } + public MapMarkPointType getMapMarkPointType() { - return this.pointType; + return this.mapMarkPointType; } + public int getMonsterId() { return this.monsterId; } + public MapMarkFromType getMapMarkFromType() { - return this.fromType; + return this.mapMarkFromType; } + public int getQuestId() { return this.questId; }