using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public class NotifyFriendLeavingHomeHandler { public void send_GS2C_NTF_FRIEND_LEAVING_HOME(ServerMessage.Types.GS2C_NTF_FRIEND_LEAVING_HOME noti) { var player_manager = GameServerApp.getServerLogic().getPlayerManager(); ArgumentNullException.ThrowIfNull(player_manager); // ReceiverID에 friendGuid가 있다. if (false == player_manager.tryGetUserByPrimaryKey(noti.ReceiverId, out var player)) { Log.getLogger().warn($"{noti.Guid} user not exist this Server"); return; } ClientToGame clientToGame = new(); clientToGame.Message = new(); clientToGame.Message.NtfFriendLeavingHome = new(); clientToGame.Message.NtfFriendLeavingHome.Guid = noti.Guid; clientToGame.Message.NtfFriendLeavingHome.NickName = noti.NickName; GameServerApp.getServerLogic().onSendPacket(player, clientToGame); } }