From 6b492656a1adca5d2cae49a63aab49a8545dae38 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Fri, 14 Apr 2023 22:44:59 -0400 Subject: [PATCH] Set dungeon manager when entering a dungeon --- src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java | 1 - src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java index f796d1ba5..e0cee6a71 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java @@ -55,7 +55,6 @@ public final class DungeonManager { this.dungeonData = dungeonData; this.passConfigData = GameData.getDungeonPassConfigDataMap().get(dungeonData.getPassCond()); this.finishedConditions = new int[passConfigData.getConds().size()]; - this.scene.setDungeonManager(this); } public void triggerEvent(DungeonPassConditionType conditionType, int... params) { diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java index c1ae5798e..4e855f571 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java @@ -116,6 +116,7 @@ public class DungeonSystem extends BaseGameSystem { if (player.getWorld().transferPlayerToScene(player, sceneId, data)) { scene = player.getScene(); + scene.setDungeonManager(new DungeonManager(scene, data)); scene.addDungeonSettleObserver(basicDungeonSettleObserver); }