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 NotifyChangePartyNameHandler { public async Task recvChangePartyNameHandler(ServerMessage.Types.ExchangePartyNameNoti notify) { var global_party = GameServerApp.getServerLogic().findGlobalEntity(); ArgumentNullException.ThrowIfNull(global_party); var party = global_party.getParty(notify.PartyGuid); ArgumentNullException.ThrowIfNull(party); var party_info_action = party.getEntityAction(); ArgumentNullException.ThrowIfNull(party_info_action); // 1. 파티명 변경 var result = await party_info_action.changePartyName(notify.NewPartyName, false); if (result.isFail()) return; // 2. 파티명 변경 알림 var message = new ClientToGame() { Message = new() { ExchangePartyNameNoti = new() { NewPartyName = notify.NewPartyName } } }; PartyHelper.BroadcastToClients(party, message, new List()); } }