using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public class NotifyPartyMemberLocationHandler { public async Task recvPartyMemberLocationHandler(ServerMessage.Types.PartyMemberLocationNoti notify) { var party = GameServerApp.getServerLogic().findGlobalEntity()?.getParty(notify.PartyGuid); ArgumentNullException.ThrowIfNull(party); // 1. party member 정보 reload var party_member_action = party.getEntityAction(); ArgumentNullException.ThrowIfNull(party_member_action); var result = await party_member_action.loadPartyMember(); if (result.isFail()) return; // 2. 해당 멤버 정보 변경 전달 ( to Client ) var member = party_member_action.getMember(notify.PartyMemberGuid); if (null == member) return; var client_message = new ClientToGame(); client_message.Message = new(); client_message.Message.PartyMemberLocationNoti = new(); client_message.Message.PartyMemberLocationNoti.MemberGuid = notify.PartyMemberGuid; client_message.Message.PartyMemberLocationNoti.LocationInfo = member.LocationInfo; PartyHelper.BroadcastToClients(party, client_message, new List()); } }