39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
|
|
using USER_GUID = System.String;
|
|
|
|
|
|
|
|
namespace GameServer;
|
|
|
|
public class NotifyPartyChatHandler
|
|
{
|
|
public Task recvPartyChat(ServerMessage.Types.GS2C_NTF_PARTY_CHAT notify)
|
|
{
|
|
// 1. 파티 정보 확인
|
|
var global_party = GameServerApp.getServerLogic().findGlobalEntity<GlobalParty>();
|
|
NullReferenceCheckHelper.throwIfNull(global_party, () => $"global_party is null !!!");
|
|
var party = global_party.getParty(notify.PartyGuid);
|
|
|
|
ArgumentNullException.ThrowIfNull(party);
|
|
|
|
// 2. 메시지 전송 ( to Client )
|
|
var client_message = ChatNotifyHelper.makeChatMessage(ChatType.Party, notify.PartySenderNickname, string.Empty,
|
|
PlayerStateType.None, notify.PartySendMessage);
|
|
ArgumentNullException.ThrowIfNull(client_message);
|
|
|
|
PartyHelper.BroadcastToClients(party, client_message, new List<USER_GUID>());
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
} |