mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 13:54:37 +01:00
Implement LeaveChallengeCsReq
This commit is contained in:
@@ -43,6 +43,10 @@ public class LineupManager {
|
|||||||
this.mp = Math.max(this.mp - i, 0);
|
this.mp = Math.max(this.mp - i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCurrentExtraLineup(int i) {
|
||||||
|
this.currentExtraLineup = i;
|
||||||
|
}
|
||||||
|
|
||||||
public PlayerLineup getLineupByIndex(int index, int extraLineup) {
|
public PlayerLineup getLineupByIndex(int index, int extraLineup) {
|
||||||
// Sanity
|
// Sanity
|
||||||
if (extraLineup > 0) {
|
if (extraLineup > 0) {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package emu.lunarcore.server.packet.recv;
|
||||||
|
|
||||||
|
import emu.lunarcore.server.game.GameSession;
|
||||||
|
import emu.lunarcore.server.packet.CmdId;
|
||||||
|
import emu.lunarcore.server.packet.Opcodes;
|
||||||
|
import emu.lunarcore.server.packet.PacketHandler;
|
||||||
|
|
||||||
|
@Opcodes(CmdId.LeaveChallengeCsReq)
|
||||||
|
public class HandlerLeaveChallengeCsReq extends PacketHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
|
||||||
|
// TODO make sure client is in a challenge mode map
|
||||||
|
session.getPlayer().getLineupManager().setCurrentExtraLineup(0);
|
||||||
|
session.getPlayer().enterScene(100000103, 0, true);
|
||||||
|
session.send(CmdId.LeaveChallengeScRsp);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user