40 lines
1.3 KiB
C#
40 lines
1.3 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 NotifySendPartyInfoHandler
|
|
{
|
|
public async Task recvSendPartyInfo(ServerMessage.Types.GS2C_NTF_PARTY_INFO notify)
|
|
{
|
|
var party = GameServerApp.getServerLogic().findGlobalEntity<GlobalParty>()?.getParty(notify.PartyGuid);
|
|
ArgumentNullException.ThrowIfNull(party);
|
|
|
|
// 1. 파티 소속 인원 체크
|
|
var party_member_action = party.getEntityAction<GlobalPartyDetailMemberAction>();
|
|
ArgumentNullException.ThrowIfNull(party_member_action);
|
|
|
|
var sends = (from send in notify.PartyMemberGuids
|
|
let is_member = party_member_action.isPartyMember(send)
|
|
where is_member select send).ToList();
|
|
ArgumentNullException.ThrowIfNull(sends);
|
|
|
|
// 2. 파티 정보 전달
|
|
var party_action = party.getEntityAction<GlobalPartyDetailAction>();
|
|
ArgumentNullException.ThrowIfNull(party_action);
|
|
|
|
_ = await party_action.sendPartyInfo(sends, party_action.getLeaderGuid(), false);
|
|
}
|
|
} |