Пример #1
0
        public async Task ClubAdminJoinCommandReq(GameSession session, ClubAdminJoinCommandReqMessage message)
        {
            Logger.Information($"ClubAdminJoinCommandReqMessage => " + message.Unk1 + ", " + message.Unk2);
            var plr = session.Player;

            if (plr.Club?.Id > 0)
            {
                if (plr.Club.Players[plr.Account.Id].Rank <= ClubRank.Staff)
                {
                }
            }

            await session.SendAsync(new ServerResultAckMessage(ServerResult.CantReadClanInfo));

            //await session.SendAsync(new ClubAdminJoinCommandAckMessage(1, new ulong[0]));
        }
Пример #2
0
        public async Task ClubAdminJoinCommandReq(GameSession session, ClubAdminJoinCommandReqMessage message)
        {
            var plr  = session.Player;
            var club = plr.Club;

            if (club == null || club.Id <= 0 || plr.Club.Players[plr.Account.Id].Rank > ClubRank.Staff)
            {
                await session.SendAsync(new ServerResultAckMessage(ServerResult.CantReadClanInfo));
            }
            await plr.Club.RemovePlayer(message.Target[0]);

            await plr.SendAsync(new ClubAdminJoinCommandAckMessage(8, message.Target[0]));

            var clanMembers = new List <ClubMemberDto2>();

            clanMembers.AddRange(GameServer.Instance.PlayerManager
                                 .Where(p => plr.Club.Players.Keys.Contains(p.Account.Id))
                                 .Select(p => p.Map <Player, ClubMemberDto2>()));
            clanMembers.AddRange(plr.Club.Players.Select(x => x.Value.Map <ClubPlayerInfo, ClubMemberDto2>()));

            await plr.ChatSession.SendAsync(new ClubMemberListAck2Message(plr.Club.Id, clanMembers.ToArray()));
        }