mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-12 20:34: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
|
||||
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
||||
// Build response
|
||||
var rsp = session.getPlayer().getFriendList().toProto();
|
||||
// Get cached friends list proto
|
||||
var proto = session.getPlayer().getFriendList().toProto();
|
||||
|
||||
// Clone response from cached proto
|
||||
var rsp = proto.clone();
|
||||
|
||||
// Encode and send
|
||||
return session.encodeMsg(NetMsgId.friend_list_get_succeed_ack, rsp);
|
||||
|
||||
Reference in New Issue
Block a user