Exemplo n.º 1
0
        public LootGoal(WowProcess wowProcess, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ILogger logger, ClassConfiguration classConfiguration)
        {
            this.wowProcess         = wowProcess;
            this.playerReader       = playerReader;
            this.stopMoving         = stopMoving;
            this.bagReader          = bagReader;
            this.logger             = logger;
            this.classConfiguration = classConfiguration;

            lootWheel = new LootWheel(wowProcess, playerReader, logger);
        }
Exemplo n.º 2
0
        public ApproachTargetGoal(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration)
        {
            this.wowProcess         = wowProcess;
            this.playerReader       = playerReader;
            this.stopMoving         = stopMoving;
            this.logger             = logger;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;

            AddPrecondition(GoapKey.incombatrange, false);
            AddPrecondition(GoapKey.targetisalive, true);
        }
Exemplo n.º 3
0
        public CorpseRunGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, List <WowPoint> spiritWalker, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector)
        {
            this.playerReader     = playerReader;
            this.wowProcess       = wowProcess;
            this.playerDirection  = playerDirection;
            this.stopMoving       = stopMoving;
            this.spiritWalkerPath = spiritWalker.ToList();
            this.logger           = logger;
            this.stuckDetector    = stuckDetector;

            AddPrecondition(GoapKey.isdead, true);
        }
Exemplo n.º 4
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));
        }
Exemplo n.º 5
0
        public NPCGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, BagReader bagReader)
        {
            this.playerReader    = playerReader;
            this.wowProcess      = wowProcess;
            this.playerDirection = playerDirection;
            this.stopMoving      = stopMoving;
            this.bagReader       = bagReader;

            this.logger             = logger;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;
            this.pather             = pather;
        }
Exemplo n.º 6
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));
        }
Exemplo n.º 7
0
        public FollowRouteGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, List <WowPoint> points, StopMoving stopMoving, NpcNameFinder npcNameFinder, IBlacklist blacklist, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration)
        {
            this.playerReader       = playerReader;
            this.wowProcess         = wowProcess;
            this.playerDirection    = playerDirection;
            this.stopMoving         = stopMoving;
            this.pointsList         = points;
            this.npcNameFinder      = npcNameFinder;
            this.blacklist          = blacklist;
            this.logger             = logger;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;

            if (classConfiguration.Mode != Mode.AttendedGather)
            {
                AddPrecondition(GoapKey.incombat, false);
            }
        }
Exemplo n.º 8
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));
        }
Exemplo n.º 9
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);
        }
Exemplo n.º 10
0
        public AdhocNPCGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, KeyAction key)
        {
            this.playerReader       = playerReader;
            this.wowProcess         = wowProcess;
            this.playerDirection    = playerDirection;
            this.stopMoving         = stopMoving;
            this.logger             = logger;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;
            this.pather             = pather;
            this.key = key;

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

            this.Keys.Add(key);
        }
Exemplo n.º 11
0
        public VendorGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, BagReader bagReader)
            : base(playerReader, wowProcess, playerDirection, stopMoving, logger, stuckDetector, classConfiguration, pather, bagReader)
        {
            AddPrecondition(GoapKey.incombat, false);

            var action = new KeyAction();

            this.Keys.Add(action);

            action.RequirementObjects.Add(
                new Requirement
            {
                HasRequirement = () => this.bagReader.BagItems.Count >= this.classConfiguration.VendorItemThreshold,
                LogMessage     = () => $"Bag items {this.bagReader.BagItems.Count} >= {this.classConfiguration.VendorItemThreshold}"
            }
                );
        }
Exemplo n.º 12
0
 public PostKillLootGoal(WowProcess wowProcess, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ILogger logger, ClassConfiguration classConfiguration)
     : base(wowProcess, playerReader, bagReader, stopMoving, logger, classConfiguration)
 {
 }
Exemplo n.º 13
0
 public RepairGoal(PlayerReader playerReader, WowProcess wowProcess, IPlayerDirection playerDirection, StopMoving stopMoving, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, BagReader bagReader)
     : base(playerReader, wowProcess, playerDirection, stopMoving, logger, stuckDetector, classConfiguration, pather, bagReader)
 {
     AddPrecondition(GoapKey.incombat, false);
     AddPrecondition(GoapKey.itemsbroken, true);
 }