Skip to content

Commit

Permalink
Format code [skip actions]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 26, 2023
1 parent f86259a commit 9b4ce34
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ public void exitDungeon(Player player) {
dungeonManager.unsetTrialTeam(player);
}
// clean temp team if it has
if (!player.getTeamManager().cleanTemporaryTeam())
{
if (!player.getTeamManager().cleanTemporaryTeam()) {
// no temp team. Will use real current team, but check
// for any dead avatar to prevent switching into them.
player.getTeamManager().checkCurrentAvatarIsAlive(null);
Expand Down
20 changes: 12 additions & 8 deletions src/main/java/emu/grasscutter/game/world/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,18 @@ public void save() {
}

public void queueTransferPlayerToScene(Player player, int sceneId, Position pos, int delayMs) {
player.setQueuedTeleport(eventExecutor.submit(() -> {
try {
Thread.sleep(delayMs);
transferPlayerToScene(player, sceneId, pos);
} catch (InterruptedException e) {
Grasscutter.getLogger().trace("queueTransferPlayerToScene: teleport to scene {} is interrupted", sceneId);
}
}));
player.setQueuedTeleport(
eventExecutor.submit(
() -> {
try {
Thread.sleep(delayMs);
transferPlayerToScene(player, sceneId, pos);
} catch (InterruptedException e) {
Grasscutter.getLogger()
.trace(
"queueTransferPlayerToScene: teleport to scene {} is interrupted", sceneId);
}
}));
}

public boolean transferPlayerToScene(Player player, int sceneId, Position pos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import emu.grasscutter.net.packet.*;
import emu.grasscutter.net.proto.DungeonDieOptionReqOuterClass.DungeonDieOptionReq;
import emu.grasscutter.net.proto.PlayerDieOptionOuterClass.PlayerDieOption;
import emu.grasscutter.server.game.GameSession;

@Opcodes(PacketOpcodes.DungeonDieOptionReq)
Expand All @@ -19,4 +18,3 @@ public void handle(GameSession session, byte[] header, byte[] payload) throws Ex
session.getPlayer().sendPacket(new BasePacket(PacketOpcodes.DungeonDieOptionRsp));
}
}

0 comments on commit 9b4ce34

Please sign in to comment.