Exemple #1
0
 public void OnBan()
 {
     if (null != PlayerNetwork.mainPlayer)
     {
         ServerAdministrator.RequestAddBlackList(mRoleId);
     }
 }
Exemple #2
0
    public static void UIAddBlacklist(UserAdmin Player)
    {
        if (null == Player)
        {
            return;
        }

        if (ServerAdministrator.IsAdmin(Player.Id))
        {
            if (_mUserAdmin == null)
            {
                _mUserAdmin = Player;
            }
            return;
        }

        if (PlayerNetwork.mainPlayerId == Player.Id)
        {
            if (null == _mSelfAdmin)
            {
                _mSelfAdmin = Player;
            }
            return;
        }

        ServerAdministrator.RequestAddBlackList(Player.Id);

        /*	UserAdmin ua = ServerAdministrator.UserAdminList.Find(iter => iter.Id == Player.Id);
         *      if (null == ua)
         *      {
         *              ua = new UserAdmin(Player.Id, Player.RoleName, 0);
         *              ServerAdministrator.UserAdminList.Add(ua);
         *
         *      }
         *
         *      UIArrayBlackAdmin.Add(ua);
         *      mUIBalckInfoList.Add(ua);
         *      UIArrayPersonnelAdmin.Remove(ua);
         *      mUIPersonelInfoList.Remove(ua);
         *
         *      ua.AddPrivileges(AdminMask.BlackRole);*/
    }