Example #1
0
        public ParallelGoal(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, List<KeyAction> keysConfig, CastingHandler castingHandler, ILogger logger)
        {
            this.wowProcess = wowProcess;
            this.stopMoving = stopMoving;
            this.playerReader = playerReader;
            this.logger = logger;
            this.castingHandler = castingHandler;

            AddPrecondition(GoapKey.incombat, false);

            keysConfig.ForEach(key => this.Keys.Add(key));
        }
Example #2
0
        public CombatGoal(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, ILogger logger, ClassConfiguration classConfiguration, CastingHandler castingHandler)
        {
            this.wowProcess         = wowProcess;
            this.playerReader       = playerReader;
            this.stopMoving         = stopMoving;
            this.logger             = logger;
            this.classConfiguration = classConfiguration;
            this.castingHandler     = castingHandler;

            AddPrecondition(GoapKey.incombat, true);
            AddPrecondition(GoapKey.hastarget, true);
            AddPrecondition(GoapKey.incombatrange, true);

            this.classConfiguration.Combat.Sequence.Where(k => k != null).ToList().ForEach(key => this.Keys.Add(key));
        }
Example #3
0
        public PullTargetGoal(WowProcess wowProcess, PlayerReader playerReader, NpcNameFinder npcNameFinder, StopMoving stopMoving, ILogger logger, CastingHandler castingHandler, StuckDetector stuckDetector, ClassConfiguration classConfiguration)
        {
            this.wowProcess         = wowProcess;
            this.playerReader       = playerReader;
            this.npcNameFinder      = npcNameFinder;
            this.stopMoving         = stopMoving;
            this.logger             = logger;
            this.castingHandler     = castingHandler;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;

            AddPrecondition(GoapKey.incombat, false);
            AddPrecondition(GoapKey.hastarget, true);
            AddPrecondition(GoapKey.pulled, false);
            AddPrecondition(GoapKey.withinpullrange, true);
            AddEffect(GoapKey.pulled, true);

            this.classConfiguration.Pull.Sequence.Where(k => k != null).ToList().ForEach(key => this.Keys.Add(key));
        }
Example #4
0
        public AdhocGoal(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, KeyAction key, CastingHandler castingHandler, ILogger logger)
        {
            this.wowProcess     = wowProcess;
            this.stopMoving     = stopMoving;
            this.playerReader   = playerReader;
            this.key            = key;
            this.logger         = logger;
            this.castingHandler = castingHandler;

            if (key.InCombat == "false")
            {
                AddPrecondition(GoapKey.incombat, false);
            }
            else if (key.InCombat == "true")
            {
                AddPrecondition(GoapKey.incombat, true);
            }

            this.Keys.Add(key);
        }