mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 08:36:38 +00:00
Use scene types instead of hardcoding scene ids for checking enter reason
This commit is contained in:
parent
b78e397056
commit
ab5e4fcdb4
@ -10,6 +10,7 @@ import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.game.player.Player.SceneLoadState;
|
||||
import emu.grasscutter.game.props.EnterReason;
|
||||
import emu.grasscutter.game.props.EntityIdType;
|
||||
import emu.grasscutter.game.props.SceneType;
|
||||
import emu.grasscutter.data.GameData;
|
||||
import emu.grasscutter.data.def.DungeonData;
|
||||
import emu.grasscutter.data.def.SceneData;
|
||||
@ -267,10 +268,8 @@ public class World implements Iterable<Player> {
|
||||
enterReason = EnterReason.DungeonEnter;
|
||||
} else if (oldScene == newScene) {
|
||||
enterType = EnterType.ENTER_GOTO;
|
||||
}
|
||||
|
||||
} else if (newScene.getSceneType() == SceneType.SCENE_HOME_WORLD) {
|
||||
// Home
|
||||
if (2001 <= newScene.getId() && newScene.getId() <= 2004) {
|
||||
enterType = EnterType.ENTER_SELF_HOME;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user