mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 12:08:17 +00:00
Fix friend request pending list
This commit is contained in:
parent
359e83596c
commit
bddb96e3b2
@ -0,0 +1,15 @@
|
|||||||
|
package emu.grasscutter.server.packet.recv;
|
||||||
|
|
||||||
|
import emu.grasscutter.net.packet.Opcodes;
|
||||||
|
import emu.grasscutter.net.packet.PacketHandler;
|
||||||
|
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||||
|
import emu.grasscutter.server.game.GameSession;
|
||||||
|
import emu.grasscutter.server.packet.send.PacketGetPlayerAskFriendListRsp;
|
||||||
|
|
||||||
|
@Opcodes(PacketOpcodes.GetPlayerAskFriendListReq)
|
||||||
|
public class HandlerGetPlayerAskFriendListReq extends PacketHandler {
|
||||||
|
@Override
|
||||||
|
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||||
|
session.send(new PacketGetPlayerAskFriendListRsp(session.getPlayer()));
|
||||||
|
}
|
||||||
|
}
|
@ -40,14 +40,6 @@ public class PacketGetPlayerFriendListRsp extends BasePacket {
|
|||||||
proto.addFriendList(friendship.toProto());
|
proto.addFriendList(friendship.toProto());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Friendship friendship : player.getFriendsList().getPendingFriends().values()) {
|
|
||||||
if (friendship.getAskerId() == player.getUid()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
proto.addAskFriendList(friendship.toProto());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setData(proto);
|
this.setData(proto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user