void ReFlshForBidden()
 {
     if (isForbiddenRelsh)
     {
         if (mLbForbidden.text == "Build")         //ServerAdministrator.IsBuildLock(userAdmin.Id)
         {
             isForbidden = true;
             ServerAdministrator.RequestBuildLock(_mUserAdmin.Id);
         }
         else
         {
             isForbidden = false;
             ServerAdministrator.RequestBuildUnLock(_mUserAdmin.Id);
         }
         isForbiddenRelsh = false;
     }
 }
Exemple #2
0
    public static void FobidenAll(bool Lock)
    {
        UserAdmin userTemp;

        for (int i = 0; i < UIArrayPersonnelAdmin.Count; i++)
        {
            userTemp = (UserAdmin)UIArrayPersonnelAdmin[i];

            if (Lock)
            {
                ServerAdministrator.RequestBuildLock(userTemp.Id);
            }
            else
            {
                ServerAdministrator.RequestBuildUnLock(userTemp.Id);
            }
        }
    }
Exemple #3
0
    void OnBuildEnableSelected(bool selected)
    {
        if (null == PlayerNetwork.mainPlayer)
        {
            return;
        }

        if (ServerAdministrator.IsBuildLock(mRoleId) != selected)
        {
            return;
        }

        if (!selected)
        {
            ServerAdministrator.RequestBuildLock(mRoleId);
        }
        else
        {
            ServerAdministrator.RequestBuildUnLock(mRoleId);
        }
    }
    void OnForbiddenBtn()
    {
        isForbiddenRelsh = true;

        isForbidden = !isForbidden;

        if (mLbForbidden.text == "Build")
        {
            ServerAdministrator.RequestBuildLock(_mUserAdmin.Id);
            //_mUserAdmin.AddPrivileges(AdminMask.BuildLock);
        }
        else
        {
            ServerAdministrator.RequestBuildUnLock(_mUserAdmin.Id);
            //_mUserAdmin.RemovePrivileges(AdminMask.BuildLock);
        }

        //ReFlshForBidden();
        if (e_ItemAdminOnClick != null)
        {
            e_ItemAdminOnClick(this, _mUserAdmin);
        }
    }