-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some revives; improve dungeon exit flow (#2409)
- Loading branch information
Showing
8 changed files
with
145 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/emu/grasscutter/server/packet/recv/HandlerDungeonDieOptionReq.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package emu.grasscutter.server.packet.recv; | ||
|
||
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) | ||
public class HandlerDungeonDieOptionReq extends PacketHandler { | ||
|
||
@Override | ||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { | ||
DungeonDieOptionReq req = DungeonDieOptionReq.parseFrom(payload); | ||
var dieOption = req.getDieOption(); | ||
// TODO Handle other die options | ||
if (req.getIsQuitImmediately()) { | ||
session.getPlayer().getServer().getDungeonSystem().exitDungeon(session.getPlayer()); | ||
} | ||
session.getPlayer().sendPacket(new BasePacket(PacketOpcodes.DungeonDieOptionRsp)); | ||
} | ||
} | ||
|