using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public class NotifyPartyVoteResultHandler { public async Task recvPartyVoteResult(ServerMessage.Types.PartyVoteResultNoti notify) { var global_party = GameServerApp.getServerLogic().findGlobalEntity(); NullReferenceCheckHelper.throwIfNull(global_party, () => $"global_party is null !!!"); var party = global_party.getParty(notify.PartyGuid); ArgumentNullException.ThrowIfNull(party); var party_attribute = party.getEntityAttribute(); ArgumentNullException.ThrowIfNull(party_attribute); // 1. 결과 통보 ( to client ) var client_message = new ClientToGame(); client_message.Message = new(); client_message.Message.PartyVoteResultNoti = new(); client_message.Message.PartyVoteResultNoti.VoteTitle = notify.VoteTitle; client_message.Message.PartyVoteResultNoti.ResultTrue = notify.ResultTrue; client_message.Message.PartyVoteResultNoti.ResultFalse = notify.ResultFalse; client_message.Message.PartyVoteResultNoti.Abstain = notify.Abstain; PartyHelper.BroadcastToClients(party, client_message, new List()); // 6. 투표 데이터 삭제 party_attribute.PartyVote = null; await Task.CompletedTask; } }