From 823980046e4c671df3f1f43cfbbc5e66b4bd8655 Mon Sep 17 00:00:00 2001 From: dragon Date: Thu, 11 Aug 2022 19:33:18 +0800 Subject: [PATCH] make fishhook_tp configurable --- src/main/java/emu/grasscutter/config/ConfigContainer.java | 1 + .../emu/grasscutter/game/managers/mapmark/MapMarksManager.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/config/ConfigContainer.java b/src/main/java/emu/grasscutter/config/ConfigContainer.java index 8a68976da..f2e91c86a 100644 --- a/src/main/java/emu/grasscutter/config/ConfigContainer.java +++ b/src/main/java/emu/grasscutter/config/ConfigContainer.java @@ -191,6 +191,7 @@ public class ConfigContainer { public boolean enableShopItems = true; public boolean staminaUsage = true; public boolean energyUsage = false; + public boolean fishhookTeleport = true; public ResinOptions resinOptions = new ResinOptions(); public Rates rates = new Rates(); diff --git a/src/main/java/emu/grasscutter/game/managers/mapmark/MapMarksManager.java b/src/main/java/emu/grasscutter/game/managers/mapmark/MapMarksManager.java index a40fbaaa6..0016feb63 100644 --- a/src/main/java/emu/grasscutter/game/managers/mapmark/MapMarksManager.java +++ b/src/main/java/emu/grasscutter/game/managers/mapmark/MapMarksManager.java @@ -1,5 +1,6 @@ package emu.grasscutter.game.managers.mapmark; +import emu.grasscutter.config.Configuration; import emu.grasscutter.game.player.BasePlayerManager; import emu.grasscutter.game.player.Player; import emu.grasscutter.net.proto.MapMarkPointTypeOuterClass.MapMarkPointType; @@ -29,7 +30,7 @@ public class MapMarksManager extends BasePlayerManager { case OPERATION_ADD -> { MapMark createMark = new MapMark(req.getMark()); // keep teleporting functionality on fishhook mark. - if (createMark.getMapMarkPointType() == MapMarkPointType.MAP_MARK_POINT_TYPE_FISH_POOL) { + if (Configuration.GAME_OPTIONS.fishhookTeleport && createMark.getMapMarkPointType() == MapMarkPointType.MAP_MARK_POINT_TYPE_FISH_POOL) { this.teleport(player, createMark); return; }