using Google.Protobuf; using Google.Protobuf.WellKnownTypes; using ServerCore; using ServerBase; using ServerCommon; using ServerCommon.BusinessLogDomain; using MetaAssets; namespace GameServer; public class NotifyChangePartyServerHandler { public async Task recvChangePartyServer(ServerMessage.Types.ChangePartyServerNameNoti notify) { var global_party = GameServerApp.getServerLogic().findGlobalEntity(); ArgumentNullException.ThrowIfNull(global_party); var party = global_party.getParty(notify.PartyGuid); ArgumentNullException.ThrowIfNull(party); var server_action = party.getEntityAction(); ArgumentNullException.ThrowIfNull(server_action); if (notify.IsAddition == BoolType.True) { await server_action.addPartyServer(notify.ServerName); } else { await server_action.deletePartyServer(notify.ServerName); } } }