초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -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 NotifyPartyVoteResultHandler
{
public async Task recvPartyVoteResult(ServerMessage.Types.PartyVoteResultNoti notify)
{
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);
var party_attribute = party.getEntityAttribute<PartyAttribute>();
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<string>());
// 6. 투표 데이터 삭제
party_attribute.PartyVote = null;
await Task.CompletedTask;
}
}