Exemplo n.º 1
0
 public GoapAgent(PlayerReader playerReader, HashSet <GoapGoal> availableGoals, IBlacklist blacklist, ILogger logger, ClassConfiguration classConfiguration, BagReader bagReader)
 {
     this.playerReader       = playerReader;
     this.AvailableGoals     = availableGoals.OrderBy(a => a.CostOfPerformingAction);
     this.blacklist          = blacklist;
     this.logger             = logger;
     this.planner            = new GoapPlanner(logger);
     this.classConfiguration = classConfiguration;
     this.bagReader          = bagReader;
 }
Exemplo n.º 2
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.º 3
0
        public LastTargetLoot(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, StopMoving stopMoving, CombatUtil combatUtil)
        {
            this.logger = logger;
            this.input  = input;

            this.wait         = wait;
            this.playerReader = addonReader.PlayerReader;
            this.stopMoving   = stopMoving;
            this.bagReader    = addonReader.BagReader;

            this.combatUtil = combatUtil;
        }
Exemplo n.º 4
0
        public LootGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameFinder npcNameFinder)
        {
            this.logger       = logger;
            this.input        = input;
            this.playerReader = playerReader;
            this.stopMoving   = stopMoving;
            this.bagReader    = bagReader;

            this.classConfiguration = classConfiguration;
            this.npcNameFinder      = npcNameFinder;

            outOfCombat = playerReader.PlayerBitValues.PlayerInCombat;
        }
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 LootGoal(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameTargeting npcNameTargeting, CombatUtil combatUtil)
        {
            this.logger = logger;
            this.input  = input;

            this.wait         = wait;
            this.playerReader = addonReader.PlayerReader;
            this.areaDb       = addonReader.AreaDb;
            this.stopMoving   = stopMoving;
            this.bagReader    = addonReader.BagReader;

            this.classConfiguration = classConfiguration;
            this.npcNameTargeting   = npcNameTargeting;
            this.combatUtil         = combatUtil;
        }
        public SkinningGoal(ILogger logger, ConfigurableInput input, AddonReader addonReader, Wait wait, StopMoving stopMoving, NpcNameTargeting npcNameTargeting, CombatUtil combatUtil)
        {
            this.logger = logger;
            this.input  = input;

            this.playerReader    = addonReader.PlayerReader;
            this.wait            = wait;
            this.stopMoving      = stopMoving;
            this.bagReader       = addonReader.BagReader;
            this.equipmentReader = addonReader.EquipmentReader;

            this.npcNameTargeting = npcNameTargeting;
            this.combatUtil       = combatUtil;

            AddPrecondition(GoapKey.incombat, false);
            AddPrecondition(GoapKey.shouldskin, true);

            AddEffect(GoapKey.shouldskin, false);
        }
Exemplo n.º 8
0
        public SkinningGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, BagReader bagReader, EquipmentReader equipmentReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameFinder npcNameFinder)
        {
            this.logger = logger;
            this.input  = input;

            this.playerReader    = playerReader;
            this.stopMoving      = stopMoving;
            this.bagReader       = bagReader;
            this.equipmentReader = equipmentReader;


            this.classConfiguration = classConfiguration;
            this.npcNameFinder      = npcNameFinder;

            AddPrecondition(GoapKey.incombat, false);
            AddPrecondition(GoapKey.shouldskin, true);

            AddEffect(GoapKey.shouldskin, false);

            outOfCombat = playerReader.PlayerBitValues.PlayerInCombat;
        }
        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.º 10
0
 public PostKillLootAction(WowProcess wowProcess, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ILogger logger, ClassConfiguration classConfiguration)
     : base(wowProcess, playerReader, bagReader, stopMoving, logger, classConfiguration)
 {
 }
Exemplo n.º 11
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);
 }
 public PostKillLootGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameFinder npcNameFinder)
     : base(logger, input, playerReader, bagReader, stopMoving, classConfiguration, npcNameFinder)
 {
 }