Files
caliverse_server/GameServer/Contents/Party/RabbitMessageHandler/NotifyChangePartyServerHandler.cs
2025-05-01 07:20:41 +09:00

36 lines
1013 B
C#

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<GlobalParty>();
ArgumentNullException.ThrowIfNull(global_party);
var party = global_party.getParty(notify.PartyGuid);
ArgumentNullException.ThrowIfNull(party);
var server_action = party.getEntityAction<GlobalPartyDetailServerAction>();
ArgumentNullException.ThrowIfNull(server_action);
if (notify.IsAddition == BoolType.True)
{
await server_action.addPartyServer(notify.ServerName);
}
else
{
await server_action.deletePartyServer(notify.ServerName);
}
}
}