Fix the chat history not correctly showing.

This commit is contained in:
kyoko
2022-06-12 11:37:44 +08:00
committed by Luke H-W
Unverified
parent 38107326a1
commit 80f9346983
8 changed files with 189 additions and 48 deletions
@@ -6,6 +6,8 @@ import emu.grasscutter.net.proto.ChatInfoOuterClass.ChatInfo;
import emu.grasscutter.net.proto.PrivateChatNotifyOuterClass.PrivateChatNotify;
public class PacketPrivateChatNotify extends BasePacket {
private ChatInfo info;
public PacketPrivateChatNotify(int senderId, int recvId, String message) {
super(PacketOpcodes.PrivateChatNotify);
@@ -15,7 +17,8 @@ public class PacketPrivateChatNotify extends BasePacket {
.setToUid(recvId)
.setText(message)
.build();
this.info = info;
PrivateChatNotify proto = PrivateChatNotify.newBuilder()
.setChatInfo(info)
.build();
@@ -32,6 +35,7 @@ public class PacketPrivateChatNotify extends BasePacket {
.setToUid(recvId)
.setIcon(emote)
.build();
this.info = info;
PrivateChatNotify proto = PrivateChatNotify.newBuilder()
.setChatInfo(info)
@@ -39,4 +43,8 @@ public class PacketPrivateChatNotify extends BasePacket {
this.setData(proto);
}
public ChatInfo getChatInfo() {
return this.info;
}
}