mirror of
https://github.com/Anime-Game-Servers/AGSLunarCore.git
synced 2024-11-23 12:29:53 +00:00
Fix soft lock when talking to shop npcs
This commit is contained in:
parent
7886c5f2b5
commit
ee6c7d0296
@ -0,0 +1,20 @@
|
||||
package emu.lunarcore.server.packet.recv;
|
||||
|
||||
import emu.lunarcore.proto.GetNpcTakenRewardCsReqOuterClass.GetNpcTakenRewardCsReq;
|
||||
import emu.lunarcore.server.game.GameSession;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
import emu.lunarcore.server.packet.Opcodes;
|
||||
import emu.lunarcore.server.packet.PacketHandler;
|
||||
import emu.lunarcore.server.packet.send.PacketGetNpcTakenRewardScRsp;
|
||||
|
||||
@Opcodes(CmdId.GetNpcTakenRewardCsReq)
|
||||
public class HandlerGetNpcTakenRewardCsReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
|
||||
var req = GetNpcTakenRewardCsReq.parseFrom(data);
|
||||
|
||||
session.send(new PacketGetNpcTakenRewardScRsp(req.getNpcId()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.proto.GetNpcTakenRewardScRspOuterClass.GetNpcTakenRewardScRsp;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
|
||||
public class PacketGetNpcTakenRewardScRsp extends BasePacket {
|
||||
|
||||
public PacketGetNpcTakenRewardScRsp(int npcId) {
|
||||
super(CmdId.GetNpcTakenRewardScRsp);
|
||||
|
||||
var data = GetNpcTakenRewardScRsp.newInstance()
|
||||
.setNpcId(npcId);
|
||||
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user