Example #1
0
        /// <summary>
        /// Sets the account capability.
        /// </summary>
        /// <since_tizen> 3 </since_tizen>
        /// <param name="capabilityType"> The account capability type.</param>
        /// <param name="state">The account capability state.</param>
        /// <exception cref="ArgumentException">In case of an invalid parameter.</exception>
        public void SetCapability(string capabilityType, CapabilityState state)
        {
            AccountError ret = (AccountError)Interop.Account.SetAccountCapability(_handle, capabilityType, (int)state);

            if (ret != AccountError.None)
            {
                throw AccountErrorFactory.CreateException(ret, "failed to set account capability");
            }
        }
        public override void OnStart()
        {
            // This reports problems, and stops BT processing if there was a problem with attributes...
            // We had to defer this action, as the 'profile line number' is not available during the element's
            // constructor call.
            OnStart_HandleAttributeProblem();

            // If the quest is complete, this behavior is already done...
            // So we don't want to falsely inform the user of things that will be skipped.
            if (!IsDone)
            {
                TreeHooks.Instance.InsertHook("Combat_Main", 0, CreateBehavior_MainCombat());

                _auraIds_OccupiedVehicle = QuestBehaviorBase.GetOccupiedVehicleAuraIds();
                // Some CRs will attempt to summon pet (and fail) while riding the bird so lets disallow it.
                _summonPetOriginalState = RoutineManager.GetCapabilityState(CapabilityFlags.PetSummoning);
                RoutineManager.SetCapabilityState(CapabilityFlags.PetSummoning, CapabilityState.Disallowed);
                this.UpdateGoalText(QuestId);
            }
        }