Commit 248b655f authored by Melledy's avatar Melledy
Browse files

Use scene types instead of hardcoding scene ids for checking enter reason

parent 82698d56
...@@ -10,6 +10,7 @@ import emu.grasscutter.game.player.Player; ...@@ -10,6 +10,7 @@ import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.player.Player.SceneLoadState; import emu.grasscutter.game.player.Player.SceneLoadState;
import emu.grasscutter.game.props.EnterReason; import emu.grasscutter.game.props.EnterReason;
import emu.grasscutter.game.props.EntityIdType; import emu.grasscutter.game.props.EntityIdType;
import emu.grasscutter.game.props.SceneType;
import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameData;
import emu.grasscutter.data.def.DungeonData; import emu.grasscutter.data.def.DungeonData;
import emu.grasscutter.data.def.SceneData; import emu.grasscutter.data.def.SceneData;
...@@ -267,11 +268,9 @@ public class World implements Iterable<Player> { ...@@ -267,11 +268,9 @@ public class World implements Iterable<Player> {
enterReason = EnterReason.DungeonEnter; enterReason = EnterReason.DungeonEnter;
} else if (oldScene == newScene) { } else if (oldScene == newScene) {
enterType = EnterType.ENTER_GOTO; enterType = EnterType.ENTER_GOTO;
} } else if (newScene.getSceneType() == SceneType.SCENE_HOME_WORLD) {
// Home
// Home enterType = EnterType.ENTER_SELF_HOME;
if (2001 <= newScene.getId() && newScene.getId() <= 2004) {
enterType = EnterType.ENTER_SELF_HOME;
} }
// Teleport packet // Teleport packet
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment