示例#1
0
        public ParallelAction(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, List <KeyConfiguration> 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));
        }
        public CombatAction(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));
        }
示例#3
0
        public PullTargetAction(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));
        }
示例#4
0
        public AdhocAction(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, KeyConfiguration 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);
        }