45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
namespace GameServer;
|
|
|
|
public class NotifyBanPartyMemberHandler
|
|
{
|
|
public async Task recvBanPartyMember(ServerMessage.Types.BanPartyNoti notify)
|
|
{
|
|
var player_manager = GameServerApp.getServerLogic().getPlayerManager();
|
|
if (!player_manager.tryGetUserByPrimaryKey(notify.BanMemberGuid, out var player))
|
|
{
|
|
return;
|
|
}
|
|
|
|
var personal_party_action = player.getEntityAction<PersonalPartyAction>();
|
|
ArgumentNullException.ThrowIfNull(personal_party_action);
|
|
|
|
// 1. 파티 정보 체크
|
|
if (notify.PartyGuid != personal_party_action.getPersonalParty()?.getPartyGuid())
|
|
{
|
|
return;
|
|
}
|
|
|
|
// 2. 파티 정보 정리
|
|
await personal_party_action.clearPersonalParty();
|
|
|
|
// 3. 밴 알림
|
|
var message = new ClientToGame();
|
|
message.Message = new();
|
|
message.Message.NtfBanParty = new();
|
|
|
|
PartyHelper.sendToClient(message, player.getHostId());
|
|
await QuestManager.It.QuestCheck(player, new QuestParty(EQuestEventTargetType.PARTY, EQuestEventNameType.EXITED));
|
|
|
|
}
|
|
} |