초기커밋
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
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 NotifyStartPartyVoteHandler
|
||||
{
|
||||
public async Task recvStartPartyVote(ServerMessage.Types.PartyVoteNoti notify)
|
||||
{
|
||||
// 1. party 정보 체크
|
||||
var global_party = GameServerApp.getServerLogic().findGlobalEntity<GlobalParty>();
|
||||
ArgumentNullException.ThrowIfNull(global_party);
|
||||
|
||||
var party = global_party.getParty(notify.PartyGuid);
|
||||
ArgumentNullException.ThrowIfNull(party);
|
||||
|
||||
// 2. party vote 등록
|
||||
var party_info_action = party.getEntityAction<GlobalPartyDetailInfoAction>();
|
||||
ArgumentNullException.ThrowIfNull(party_info_action);
|
||||
|
||||
var register_vote = await party_info_action.registerPartyVote(notify.VoteTitle, notify.VoteStartTime, false);
|
||||
if (register_vote.result.isFail() || null == register_vote.vote) return;
|
||||
|
||||
// 3. 투표 시작 알림 ( to client )
|
||||
var client_message = new ClientToGame();
|
||||
client_message.Message = new();
|
||||
client_message.Message.PartyVoteNoti = new();
|
||||
client_message.Message.PartyVoteNoti.VoteTitle = register_vote.vote.VoteTitle;
|
||||
client_message.Message.PartyVoteNoti.VoteStartTime = register_vote.vote.StartVoteTime;
|
||||
|
||||
PartyHelper.BroadcastToClients(party, client_message, new List<USER_GUID>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user