mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2024-12-01 00:00:28 +00:00
Implement stub NpcTalk packets
This commit is contained in:
parent
866941589b
commit
716b6df2ec
@ -0,0 +1,21 @@
|
||||
package emu.grasscutter.server.packet.recv;
|
||||
|
||||
import emu.grasscutter.game.inventory.GenshinItem;
|
||||
import emu.grasscutter.net.packet.Opcodes;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.NpcTalkReqOuterClass.NpcTalkReq;
|
||||
import emu.grasscutter.net.packet.PacketHandler;
|
||||
import emu.grasscutter.server.game.GameSession;
|
||||
import emu.grasscutter.server.packet.send.PacketNpcTalkRsp;
|
||||
|
||||
@Opcodes(PacketOpcodes.NpcTalkReq)
|
||||
public class HandlerNpcTalkReq extends PacketHandler {
|
||||
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
NpcTalkReq req = NpcTalkReq.parseFrom(payload);
|
||||
|
||||
session.send(new PacketNpcTalkRsp(req.getNpcEntityId(), req.getTalkId(), req.getEntityId()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package emu.grasscutter.server.packet.send;
|
||||
|
||||
import emu.grasscutter.net.packet.GenshinPacket;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.NpcTalkRspOuterClass.NpcTalkRsp;
|
||||
|
||||
public class PacketNpcTalkRsp extends GenshinPacket {
|
||||
public PacketNpcTalkRsp(int npcEntityId, int curTalkId, int entityId) {
|
||||
super(PacketOpcodes.NpcTalkRsp);
|
||||
|
||||
NpcTalkRsp p = NpcTalkRsp.newBuilder()
|
||||
.setNpcEntityId(npcEntityId)
|
||||
.setCurTalkId(curTalkId)
|
||||
.setEntityId(entityId)
|
||||
.build();
|
||||
|
||||
this.setData(p);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user