using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public class NotifyFriendRequestCancelHandler { public void send_GS2C_NTF_FRIEND_REQUEST_CANCEL(ServerMessage.Types.CancelFriendRequestNoti noti) { var player_manager = GameServerApp.getServerLogic().getPlayerManager(); ArgumentNullException.ThrowIfNull(player_manager); if (false == player_manager.tryGetUserByPrimaryKey(noti.ReceiverGuid, out var player)) { Log.getLogger().warn($"{noti.ReceiverGuid} user not exist this Server"); return; } ClientToGame clientToGame = new(); clientToGame.Message = new(); clientToGame.Message.CancelFriendRequestNoti = new(); clientToGame.Message.CancelFriendRequestNoti.SenderId = noti.SenderId; clientToGame.Message.CancelFriendRequestNoti.SenderGuid = noti.SenderGuid; clientToGame.Message.CancelFriendRequestNoti.SenderNickName = noti.SenderNickName; clientToGame.Message.CancelFriendRequestNoti.ReceiverId = noti.ReceiverId; clientToGame.Message.CancelFriendRequestNoti.ReceiverGuid = noti.ReceiverGuid; GameServerApp.getServerLogic().onSendPacket(player, clientToGame); } }