초기커밋
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class NotifyReplyPartyVoteHandler
|
||||
{
|
||||
public async Task recvReplyPartyVote(ServerMessage.Types.ReplyPartyVoteNoti 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. 파티원 체크
|
||||
var party_member_action = party.getEntityAction<GlobalPartyDetailMemberAction>();
|
||||
ArgumentNullException.ThrowIfNull(party_member_action);
|
||||
|
||||
var member = party_member_action.getMember(notify.PartyVoterGuid);
|
||||
if (null == member) return;
|
||||
|
||||
// 3. vote 저장
|
||||
var party_info_action = party.getEntityAction<GlobalPartyDetailInfoAction>();
|
||||
ArgumentNullException.ThrowIfNull(party_info_action);
|
||||
|
||||
_ = await party_info_action.VoteParty(notify.Vote, notify.PartyVoterGuid);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user