mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 17:05:20 +01:00
Tower Dungeons Handoff between level and floor
This commit is contained in:
@@ -25,6 +25,7 @@ import emu.grasscutter.game.managers.MotionManager.MotionManager;
|
||||
import emu.grasscutter.game.props.ActionReason;
|
||||
import emu.grasscutter.game.props.EntityType;
|
||||
import emu.grasscutter.game.props.PlayerProperty;
|
||||
import emu.grasscutter.game.props.SceneType;
|
||||
import emu.grasscutter.game.shop.ShopLimit;
|
||||
import emu.grasscutter.game.managers.MapMarkManager.*;
|
||||
import emu.grasscutter.game.tower.TowerManager;
|
||||
@@ -1048,6 +1049,7 @@ public class Player {
|
||||
@PostLoad
|
||||
private void onLoad() {
|
||||
this.getTeamManager().setPlayer(this);
|
||||
this.getTowerManager().setPlayer(this);
|
||||
}
|
||||
|
||||
public void save() {
|
||||
@@ -1117,6 +1119,10 @@ public class Player {
|
||||
}
|
||||
|
||||
public void onLogout() {
|
||||
// force to leave the dungeon
|
||||
if(getScene().getSceneType() == SceneType.SCENE_DUNGEON){
|
||||
this.getServer().getDungeonManager().exitDungeon(this);
|
||||
}
|
||||
// Leave world
|
||||
if (this.getWorld() != null) {
|
||||
this.getWorld().removePlayer(this);
|
||||
|
||||
Reference in New Issue
Block a user