public BehaviorFinalizePlots(Building building)
     : base()
 {
     Building = building;
     MovementPoints.Add(Building.SafeMovementPoint);
     Criteria += () => Building.CanActivate;
 }
示例#2
0
        public BehaviorSalvage()
            : base()
        {
            Building = GarrisonManager.Buildings[BuildingType.SalvageYard];
            MovementPoints.Add(Building.EntranceMovementPoint);

            InteractionEntryId = Building.WorkOrderNpcEntryId;
            Criteria          += () => BaseSettings.CurrentSettings.BehaviorSalvaging &&
                                 !Building.CanActivate && !Building.IsBuilding &&
                                 SalvagableGoods.Count > 0;
        }
示例#3
0
        public override void Initalize()
        {
            TargetManager.ShouldKill = false;
            TargetManager.ShouldLoot = false;
            MovementPoints.Add(GarrisonManager.Buildings[BuildingType.EnchantersStudy].SafeMovementPoint);
            MovementPoints.Add(GarrisonManager.Buildings[BuildingType.EnchantersStudy].EntranceMovementPoint);
            InteractionEntryId = GarrisonManager.DisenchantingEntryId;

            _movement = null;
            base.Initalize();
        }
示例#4
0
        protected Behavior(WoWPoint movepoint, int interactionEntryId, Func <bool> criteria = null)
        {
            MovementPoints.Add(movepoint);
            InteractionEntryId = interactionEntryId;

            if (criteria != null)
            {
                _criteria = criteria;
            }
            else
            {
                _criteria += () => true;
            }
        }
示例#5
0
            /// <summary>
            /// Adds a region to the appropriate list for its type; returns the region.
            /// </summary>
            public Region Add(Region region)
            {
                switch (region)
                {
                case Region.InvasionPoint r: InvasionPoints.Add(r); break;

                case Region.EnvironmentMapPoint r: EnvironmentMapPoints.Add(r); break;

                case Region.Sound r: Sounds.Add(r); break;

                case Region.SFX r: SFX.Add(r); break;

                case Region.WindSFX r: WindSFX.Add(r); break;

                case Region.SpawnPoint r: SpawnPoints.Add(r); break;

                case Region.Message r: Messages.Add(r); break;

                case Region.PatrolRoute r: PatrolRoutes.Add(r); break;

                case Region.MovementPoint r: MovementPoints.Add(r); break;

                case Region.WarpPoint r: WarpPoints.Add(r); break;

                case Region.ActivationArea r: ActivationAreas.Add(r); break;

                case Region.Event r: Events.Add(r); break;

                case Region.Logic r: Logic.Add(r); break;

                case Region.EnvironmentMapEffectBox r: EnvironmentMapEffectBoxes.Add(r); break;

                case Region.WindArea r: WindAreas.Add(r); break;

                case Region.MufflingBox r: MufflingBoxes.Add(r); break;

                case Region.MufflingPortal r: MufflingPortals.Add(r); break;

                case Region.Other r: Others.Add(r); break;

                default:
                    throw new ArgumentException($"Unrecognized type {region.GetType()}.", nameof(region));
                }
                return(region);
            }
示例#6
0
 protected Behavior(WoWPoint movepoint)
 {
     MovementPoints.Add(movepoint);
 }