Example #1
0
 public void Restore()
 {
     foreach (var capabilityState in _capabilityStates)
     {
         RoutineManager.SetCapabilityState(capabilityState.Key, capabilityState.Value);
     }
 }
 public override void OnFinished()
 {
     TreeHooks.Instance.RemoveHook("Combat_Main", CreateBehavior_MainCombat());
     RoutineManager.SetCapabilityState(CapabilityFlags.PetSummoning, _summonPetOriginalState);
     TreeRoot.GoalText   = string.Empty;
     TreeRoot.StatusText = string.Empty;
     base.OnFinished();
 }
        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);
            }
        }