Example #1
0
            public RoutineManagerSubMemento()
            {
                // We explicitly enumerate the CapabilityFlags...
                // This eliminates the possiblity of wrongly snagging "composite flags" (like .All).
                for (var i = 0; i < 32; i++)
                {
                    var capabilityFlag = (CapabilityFlags)(1u << i);
                    if (!Enum.IsDefined(typeof(CapabilityFlags), capabilityFlag))
                    {
                        continue;
                    }

                    _capabilityStates.Add(capabilityFlag, RoutineManager.GetCapabilityState(capabilityFlag));
                }
            }
        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);
            }
        }
Example #3
0
 public static bool IsAllowed(CapabilityFlags flags)
 {
     return(RoutineManager.GetCapabilityState(flags) == CapabilityState.DontCare);
 }