public MainWindow() { InitializeComponent(); timer = new Timer(1000); timer.Elapsed += OnTimedEvent; timer.AutoReset = true; timer.Enabled = true; var logConfig = new LoggerConfiguration() //.WriteTo.File("names.log") .WriteTo.Debug() .CreateLogger(); Log.Logger = logConfig; logger = new SerilogLoggerProvider(Log.Logger).CreateLogger(nameof(MainWindow)); var rect = new Rectangle(0, 0, 1920, 1080); capturer = new DirectBitmapCapturer(rect); npcNameFinder = new NpcNameFinder(logger, capturer); npcNameFinder.ChangeNpcType(NpcNames.Neutral | NpcNames.Friendly); InitSliders(); }
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); } }
public AdhocNPCGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, IPlayerDirection playerDirection, StopMoving stopMoving, NpcNameFinder npcNameFinder, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather, KeyAction key, IBlacklist blacklist) { this.logger = logger; this.input = input; this.playerReader = playerReader; this.playerDirection = playerDirection; this.stopMoving = stopMoving; this.npcNameFinder = npcNameFinder; this.stuckDetector = stuckDetector; this.classConfiguration = classConfiguration; this.pather = pather; this.key = key; this.blacklist = blacklist; if (key.InCombat == "false") { AddPrecondition(GoapKey.incombat, false); } else if (key.InCombat == "true") { AddPrecondition(GoapKey.incombat, true); } this.Keys.Add(key); }
public CastingHandler(WowProcess wowProcess, PlayerReader playerReader, ILogger logger, ClassConfiguration classConfiguration, IPlayerDirection direction, NpcNameFinder npcNameFinder) { this.wowProcess = wowProcess; this.playerReader = playerReader; this.logger = logger; this.classConfiguration = classConfiguration; this.direction = direction; this.npcNameFinder = npcNameFinder; }
public CastingHandler(ILogger logger, ConfigurableInput input, PlayerReader playerReader, ClassConfiguration classConfig, IPlayerDirection direction, NpcNameFinder npcNameFinder) { this.logger = logger; this.input = input; this.playerReader = playerReader; this.classConfig = classConfig; this.direction = direction; this.npcNameFinder = npcNameFinder; }
public Test_NpcNameFinder(ILogger logger) { this.logger = logger; MockWoWProcess mockWoWProcess = new MockWoWProcess(); rectProvider = new RectProvider(); rectProvider.GetRectangle(out var rect); capturer = new DirectBitmapCapturer(rect); npcNameFinder = new NpcNameFinder(logger, capturer, mockWoWProcess); }
public TargetDeadAction(WowProcess wowProcess, PlayerReader playerReader, NpcNameFinder npcFinder, ILogger logger) { this.wowProcess = wowProcess; this.playerReader = playerReader; this.npcFinder = npcFinder; this.logger = logger; lootWheel = new LootWheel(wowProcess, playerReader, logger); AddPrecondition(GoapKey.hastarget, true); AddPrecondition(GoapKey.targetisalive, false); }
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; }
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; }
public FollowRouteAction(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; AddPrecondition(GoapKey.incombat, false); }
public ApproachTargetAction(WowProcess wowProcess, PlayerReader playerReader, StopMoving stopMoving, NpcNameFinder npcNameFinder, ILogger logger, StuckDetector stuckDetector, ClassConfiguration classConfiguration) { this.wowProcess = wowProcess; this.playerReader = playerReader; this.stopMoving = stopMoving; this.npcNameFinder = npcNameFinder; this.logger = logger; this.stuckDetector = stuckDetector; this.classConfiguration = classConfiguration; AddPrecondition(GoapKey.incombatrange, false); AddPrecondition(GoapKey.targetisalive, true); var rect = wowProcess.GetWindowRect(); mouseLocationOfAdd = new Point((int)(rect.right / 2f), (int)((rect.bottom / 20) * 13f)); }
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)); }
public NpcNameTargeting(ILogger logger, NpcNameFinder npcNameFinder, IMouseInput input) { this.logger = logger; this.npcNameFinder = npcNameFinder; this.input = input; locTargetingAndClickNpc = new List <Point> { new Point(0, 0), new Point(-10, 15).Scale(npcNameFinder.scaleToRefWidth, npcNameFinder.scaleToRefHeight), new Point(10, 15).Scale(npcNameFinder.scaleToRefWidth, npcNameFinder.scaleToRefHeight), }; locFindByCursorType = new List <Point> { new Point(0, 0), new Point(0, 25).Scale(npcNameFinder.scaleToRefWidth, npcNameFinder.scaleToRefHeight), new Point(0, 75).Scale(npcNameFinder.scaleToRefWidth, npcNameFinder.scaleToRefHeight), }; }
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 FollowRouteGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, IPlayerDirection playerDirection, List <WowPoint> points, StopMoving stopMoving, NpcNameFinder npcNameFinder, IBlacklist blacklist, StuckDetector stuckDetector, ClassConfiguration classConfiguration, IPPather pather) { this.logger = logger; this.input = input; this.playerReader = playerReader; this.playerDirection = playerDirection; this.stopMoving = stopMoving; this.pointsList = points; this.npcNameFinder = npcNameFinder; this.blacklist = blacklist; this.stuckDetector = stuckDetector; this.classConfiguration = classConfiguration; this.pather = pather; if (classConfiguration.Mode != Mode.AttendedGather) { AddPrecondition(GoapKey.incombat, false); } }
public PostKillLootGoal(ILogger logger, ConfigurableInput input, PlayerReader playerReader, BagReader bagReader, StopMoving stopMoving, ClassConfiguration classConfiguration, NpcNameFinder npcNameFinder) : base(logger, input, playerReader, bagReader, stopMoving, classConfiguration, npcNameFinder) { }