mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-13 12:54:36 +01:00
Clone response when getting friends list
This is so we dont add nextpackages to our cached proto
This commit is contained in:
@@ -10,8 +10,11 @@ public class HandlerFriendListGetReq extends NetHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
||||||
// Build response
|
// Get cached friends list proto
|
||||||
var rsp = session.getPlayer().getFriendList().toProto();
|
var proto = session.getPlayer().getFriendList().toProto();
|
||||||
|
|
||||||
|
// Clone response from cached proto
|
||||||
|
var rsp = proto.clone();
|
||||||
|
|
||||||
// Encode and send
|
// Encode and send
|
||||||
return session.encodeMsg(NetMsgId.friend_list_get_succeed_ack, rsp);
|
return session.encodeMsg(NetMsgId.friend_list_get_succeed_ack, rsp);
|
||||||
|
|||||||
Reference in New Issue
Block a user