private void Initialize(ClassConfiguration config) { ConfigurableInput = new ConfigurableInput(logger, wowProcess, config); ActionBarPopulator = new ActionBarPopulator(logger, wowProcess, ConfigurableInput, config, AddonReader); var blacklist = config.Mode != Mode.Grind ? new NoBlacklist() : (IBlacklist) new Blacklist(AddonReader.PlayerReader, config.NPCMaxLevels_Above, config.NPCMaxLevels_Below, config.Blacklist, logger); var actionFactory = new GoalFactory(logger, AddonReader, ConfigurableInput, DataConfig, npcNameFinder, pather); var availableActions = actionFactory.CreateGoals(config, blacklist); RouteInfo = actionFactory.RouteInfo; this.GoapAgent = new GoapAgent(logger, wowProcess, ConfigurableInput, AddonReader.PlayerReader, availableActions, blacklist, config, AddonReader.BagReader); this.actionThread = new GoalThread(logger, ConfigurableInput, AddonReader.PlayerReader, GoapAgent); // hookup events between actions availableActions.ToList().ForEach(a => { a.ActionEvent += this.actionThread.OnActionEvent; a.ActionEvent += GoapAgent.OnActionEvent; // tell other action about my actions availableActions.ToList().ForEach(b => { if (b != a) { a.ActionEvent += b.OnActionEvent; } }); }); }
public GoalFactory(ILogger logger, AddonReader addonReader, ConfigurableInput input, DataConfig dataConfig, NpcNameFinder npcNameFinder, IPPather pather) { this.logger = logger; this.addonReader = addonReader; this.input = input; this.dataConfig = dataConfig; this.npcNameFinder = npcNameFinder; this.pather = pather; }
public MountHandler(ILogger logger, ConfigurableInput input, ClassConfiguration classConfig, Wait wait, PlayerReader playerReader, StopMoving stopMoving) { this.logger = logger; this.classConfig = classConfig; this.input = input; this.wait = wait; this.playerReader = playerReader; this.stopMoving = stopMoving; }
public CombatUtil(ILogger logger, ConfigurableInput input, Wait wait, PlayerReader playerReader) { this.logger = logger; this.input = input; this.wait = wait; this.playerReader = playerReader; outOfCombat = !playerReader.Bits.PlayerInCombat; lastPosition = playerReader.PlayerLocation; }
public GoalFactory(ILogger logger, AddonReader addonReader, ConfigurableInput input, DataConfig dataConfig, NpcNameFinder npcNameFinder, NpcNameTargeting npcNameTargeting, IPPather pather, ExecGameCommand execGameCommand) { this.logger = logger; this.addonReader = addonReader; this.input = input; this.dataConfig = dataConfig; this.npcNameFinder = npcNameFinder; this.npcNameTargeting = npcNameTargeting; this.pather = pather; this.exec = execGameCommand; }
public StuckDetector(ILogger logger, ConfigurableInput input, PlayerReader playerReader, IPlayerDirection playerDirection, StopMoving stopMoving) { this.logger = logger; this.input = input; this.playerReader = playerReader; this.stopMoving = stopMoving; this.playerDirection = playerDirection; ResetStuckParameters(); }