mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 10:55:08 +01:00
Allow the player to finish dungeons
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.game.dungeons.DungeonChallenge;
|
||||
import emu.grasscutter.net.packet.BasePacket;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.ChallengeDataNotifyOuterClass.ChallengeDataNotify;
|
||||
|
||||
public class PacketChallengeDataNotify extends BasePacket {
|
||||
|
||||
public PacketChallengeDataNotify(DungeonChallenge challenge, int index, int value) {
|
||||
super(PacketOpcodes.ChallengeDataNotify);
|
||||
|
||||
ChallengeDataNotify proto = ChallengeDataNotify.newBuilder()
|
||||
.setChallengeIndex(challenge.getChallengeIndex())
|
||||
.setParamIndex(index)
|
||||
.setValue(value)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public class PacketDungeonChallengeBeginNotify extends BasePacket {
|
||||
DungeonChallengeBeginNotify proto = DungeonChallengeBeginNotify.newBuilder()
|
||||
.setChallengeId(challenge.getChallengeId())
|
||||
.setChallengeIndex(challenge.getChallengeIndex())
|
||||
.setGroupId(challenge.getGroup().id)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
|
||||
@@ -11,8 +11,10 @@ public class PacketDungeonChallengeFinishNotify extends BasePacket {
|
||||
super(PacketOpcodes.DungeonChallengeFinishNotify);
|
||||
|
||||
DungeonChallengeFinishNotify proto = DungeonChallengeFinishNotify.newBuilder()
|
||||
.setChallengeIndex(challenge.getChallengeId())
|
||||
.setChallengeIndex(challenge.getChallengeIndex())
|
||||
.setIsSuccess(challenge.isSuccess())
|
||||
.setUnk1(challenge.getChallengeId())
|
||||
.setUnk2(30)
|
||||
.build();
|
||||
|
||||
this.setData(proto);
|
||||
|
||||
Reference in New Issue
Block a user