초기커밋
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class NotifyFriendDeleteHandler
|
||||
{
|
||||
public void send_GS2C_NTF_FRIEND_DELETE(ServerMessage.Types.FriendDeleteNoti 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.SenderGuid} user not exist this Server");
|
||||
return;
|
||||
}
|
||||
|
||||
ClientToGame clientToGame = new();
|
||||
clientToGame.Message = new();
|
||||
clientToGame.Message.FriendDeleteNoti = new();
|
||||
clientToGame.Message.FriendDeleteNoti.SenderId = noti.SenderId;
|
||||
clientToGame.Message.FriendDeleteNoti.SenderGuid = noti.SenderGuid;
|
||||
clientToGame.Message.FriendDeleteNoti.SenderNickName = noti.SenderNickName;
|
||||
clientToGame.Message.FriendDeleteNoti.ReceiverId = noti.ReceiverId;
|
||||
clientToGame.Message.FriendDeleteNoti.ReceiverGuid = noti.ReceiverGuid;
|
||||
|
||||
GameServerApp.getServerLogic().onSendPacket(player, clientToGame);
|
||||
|
||||
QuestManager.It.QuestCheck(player, new QuestFriend(EQuestEventTargetType.FRIEND, EQuestEventNameType.DELETED)).Wait();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user