Example #1
0
        public void ClubClubMemberInfoReq2(ChatSession session, ClubClubMemberInfoReq2Message message)
        {
            var targetplr = GameServer.Instance.PlayerManager[message.AccountId];

            if (targetplr?.Club?.Id > 0)
            {
                var isMod = targetplr.Club.Players.Any(x =>
                                                       x.Value.Rank == ClubRank.Master && x.Key == targetplr.Account.Id);
                session.SendAsync(new ClubClubMemberInfoAck2Message
                {
                    ClanId      = message.ClanId,
                    AccountId   = targetplr.Account.Id,
                    Nickname    = targetplr.Account.Nickname,
                    IsModerator = isMod ? 1 : 0
                });
            }
            else if (session.Player != null && targetplr != null)
            {
                session.SendAsync(new ClubClubMemberInfoAck2Message
                {
                    ClanId    = message.ClanId,
                    AccountId = targetplr.Account.Id,
                    Nickname  = targetplr.Account.Nickname
                });
            }
            else
            {
                session.SendAsync(new ClubClubMemberInfoAck2Message
                {
                    ClanId    = message.ClanId,
                    AccountId = 0,
                    Nickname  = "n/A"
                });
            }
        }
 public void ClubClubMemberInfoReq2(ChatSession session, ClubClubMemberInfoReq2Message message)
 {
     if (session.GameSession != null)
     {
         session.GameSession.SendAsync(new ServerResultAckMessage(ServerResult.ServerError));
     }
 }
Example #3
0
 public void ClubClubMemberInfoReq2(ChatSession session, ClubClubMemberInfoReq2Message message)
 {
     if (session.GameSession != null)
     {
         session.GameSession.SendAsync(new ServerResultAckMessage(ServerResult.CantReadClanInfo));
     }
     //session.SendAsync(new ClubNewJoinMemberInfoAckMessage());
 }