public FollowRouteGoal(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, IPlayerDirection playerDirection, List <WowPoint> points, StopMoving stopMoving, NpcNameFinder npcNameFinder, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, MountHandler mountHandler, TargetFinder targetFinder)
        {
            this.logger = logger;
            this.input  = input;

            this.wait            = wait;
            this.addonReader     = addonReader;
            this.playerReader    = addonReader.PlayerReader;
            this.playerDirection = playerDirection;
            this.stopMoving      = stopMoving;

            this.pointsList = points;

            this.npcNameFinder = npcNameFinder;

            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;
            this.pather             = pather;
            this.mountHandler       = mountHandler;
            this.targetFinder       = targetFinder;

            MinDistance = !(pather is RemotePathingAPIV3) ? 15 : 8;

            if (classConfiguration.Mode != Mode.AttendedGather)
            {
                AddPrecondition(GoapKey.incombat, false);
                AddPrecondition(GoapKey.producedcorpse, false);
                AddPrecondition(GoapKey.consumecorpse, false);
            }
        }
Ejemplo n.º 2
0
        public AdhocNPCGoal(ILogger logger, ConfigurableInput input, AddonReader addonReader, IPlayerDirection playerDirection, StopMoving stopMoving, NpcNameTargeting npcNameTargeting, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, KeyAction key, IBlacklist blacklist, MountHandler mountHandler, Wait wait, ExecGameCommand exec)
        {
            this.logger           = logger;
            this.input            = input;
            this.addonReader      = addonReader;
            this.playerReader     = addonReader.PlayerReader;
            this.playerDirection  = playerDirection;
            this.stopMoving       = stopMoving;
            this.npcNameTargeting = npcNameTargeting;

            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;
            this.pather             = pather;
            this.key          = key;
            this.blacklist    = blacklist;
            this.mountHandler = mountHandler;

            this.wait            = wait;
            this.execGameCommand = exec;
            this.gossipReader    = addonReader.GossipReader;

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

            this.Keys.Add(key);
        }
Ejemplo n.º 3
0
        private async void LoadModules()
        {
            ListModules.Items.Clear();
            int IDThemeMonaco = await ModulesAccessManager.GetCurrentThemeMonacoID(), IDTheme = await ModulesAccessManager.GetCurrentThemeIDAsync();

            foreach (InfosModule module in await ModulesAccessManager.GetModulesAsync(true))
            {
                var module_infos = new ModuleInfosShow {
                    Module = module, StrokeThickness = 0
                };
                var reader = new AddonReader(module_infos.Module.ID);
                module_infos.Thumbnail = await reader.GetAddonIconViaIDAsync();

                switch (module.ModuleType)
                {
                case ModuleTypesList.Addon when currentSelectedButton == 0:
                    ListModules.Items.Add(module_infos);
                    break;

                case ModuleTypesList.Theme when currentSelectedButton == 1:
                    if (IDTheme == module_infos.Module.ID || IDThemeMonaco == module_infos.Module.ID)
                    {
                        module_infos.StrokeThickness = 2;
                    }

                    ListModules.Items.Add(module_infos);
                    break;
                }
            }
        }
Ejemplo n.º 4
0
 public WrongZoneGoal(AddonReader addonReader, ConfigurableInput input, IPlayerDirection playerDirection, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration)
 {
     this.addonReader        = addonReader;
     this.playerReader       = addonReader.PlayerReader;
     this.input              = input;
     this.playerDirection    = playerDirection;
     this.logger             = logger;
     this.stuckDetector      = stuckDetector;
     this.classConfiguration = classConfiguration;
     AddPrecondition(GoapKey.incombat, false);
 }
Ejemplo n.º 5
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;
        }
        public CastingHandler(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, ClassConfiguration classConfig, IPlayerDirection direction, NpcNameFinder npcNameFinder, StopMoving stopMoving)
        {
            this.logger = logger;
            this.input  = input;

            this.wait         = wait;
            this.addonReader  = addonReader;
            this.playerReader = addonReader.PlayerReader;

            this.classConfig   = classConfig;
            this.direction     = direction;
            this.npcNameFinder = npcNameFinder;
            this.stopMoving    = stopMoving;
        }
Ejemplo n.º 7
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 WalkToCorpseGoal(ILogger logger, ConfigurableInput input, AddonReader addonReader, IPlayerDirection playerDirection, List <WowPoint> spiritWalker, List <WowPoint> routePoints, StopMoving stopMoving, StuckDetector stuckDetector, IPPather pather)
        {
            this.logger = logger;
            this.input  = input;

            this.addonReader      = addonReader;
            this.playerReader     = addonReader.PlayerReader;
            this.playerDirection  = playerDirection;
            this.stopMoving       = stopMoving;
            this.routePoints      = routePoints.ToList();
            this.spiritWalkerPath = spiritWalker.ToList();

            this.stuckDetector = stuckDetector;
            this.pather        = pather;

            AddPrecondition(GoapKey.isdead, true);
        }
Ejemplo n.º 9
0
        public GoapAgent(ILogger logger, GoapAgentState goapAgentState, ConfigurableInput input, AddonReader addonReader, HashSet <GoapGoal> availableGoals, IBlacklist blacklist)
        {
            this.logger         = logger;
            this.GoapAgentState = goapAgentState;
            this.input          = input;

            this.addonReader  = addonReader;
            this.playerReader = addonReader.PlayerReader;

            this.addonReader.CreatureHistory.KillCredit -= OnKillCredit;
            this.addonReader.CreatureHistory.KillCredit += OnKillCredit;

            this.stopMoving = new StopMoving(input, playerReader);

            this.AvailableGoals = availableGoals.OrderBy(a => a.CostOfPerformingAction);
            this.blacklist      = blacklist;

            this.planner = new GoapPlanner(logger);
        }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
0
        public CombatGoal(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, StopMoving stopMoving, ClassConfiguration classConfiguration, CastingHandler castingHandler)
        {
            this.logger = logger;
            this.input  = input;

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

            this.classConfiguration = classConfiguration;
            this.castingHandler     = castingHandler;

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

            AddEffect(GoapKey.producedcorpse, true);
            AddEffect(GoapKey.targetisalive, false);
            AddEffect(GoapKey.hastarget, false);

            classConfiguration.Combat.Sequence.Where(k => k != null).ToList().ForEach(key => Keys.Add(key));
        }
        public PullTargetGoal(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, StopMoving stopMoving, CastingHandler castingHandler, StuckDetector stuckDetector, ClassConfiguration classConfiguration)
        {
            this.logger = logger;
            this.input  = input;

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

            this.castingHandler     = castingHandler;
            this.stuckDetector      = stuckDetector;
            this.classConfiguration = classConfiguration;

            classConfiguration.Pull.Sequence.Where(k => k != null).ToList().ForEach(key => Keys.Add(key));

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

            AddEffect(GoapKey.pulled, true);
        }
Ejemplo n.º 13
0
        private async void LoadModules()
        {
            ListModules.Items.Clear();

            foreach (InfosModule module in await ModulesAccessManager.GetModulesAsync(true))
            {
                var module_infos = new ModuleInfosShow {
                    Module = module
                };
                var reader = new AddonReader(module_infos.Module.ID);
                module_infos.Thumbnail = await reader.GetAddonIconViaIDAsync();

                switch (module.ModuleType)
                {
                case ModuleTypesList.Addon when currentSelectedButton == 0:
                    ListModules.Items.Add(module_infos);
                    break;

                case ModuleTypesList.Theme when currentSelectedButton == 1:
                    ListModules.Items.Add(module_infos);
                    break;
                }
            }
        }
Ejemplo n.º 14
0
 public Task <List <WowPoint> > FindRouteTo(AddonReader addonReader, WowPoint destination)
 {
     return(FindRoute(addonReader.UIMapId.Value, addonReader.PlayerReader.PlayerLocation, destination));
 }
 public PostKillLootGoal(ILogger logger, ConfigurableInput input, Wait wait, AddonReader addonReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameTargeting npcNameTargeting, CombatUtil combatUtil)
     : base(logger, input, wait, addonReader, stopMoving, classConfiguration, npcNameTargeting, combatUtil)
 {
 }