Beispiel #1
0
 public EntityListWrapper(GameController gameController)
 {
     this.gameController = gameController;
     entityCache = new Dictionary<int, EntityWrapper>();
     ignoredEntities = new HashSet<string>();
     gameController.Area.OnAreaChange += OnAreaChanged;
 }
Beispiel #2
0
 public EntityListWrapper(GameController root)
 {
     this.Root = root;
     this.entityCache = new Dictionary<int, EntityWrapper>();
     this.ignoredEntities = new HashSet<string>();
     Root.Area.OnAreaChange += this.OnAreaChange;
 }
Beispiel #3
0
        public OverlayRenderer(GameController gameController, SettingsRoot settings, RenderingContext rc)
        {
            this.Settings = settings;
            this.gameController = gameController;

            this.plugins = new List<HUDPlugin>{
                new HealthBarRenderer(),
                new ItemAlerter(),
                new MapIconsRenderer(gatherMapIcons),
                new AdvTooltopRenderer(),
                new MonsterTracker(),
                new PoiTracker(),
                new XPHRenderer(),
                new ClientHacks(),
            #if DEBUG
                //new ShowUiHierarchy(),
                //new MainAddresses(),
            #endif
                new PreloadAlert(),
                new DpsMeter(),
                // new FpsMeter(),
            };

            gameController.Area.OnAreaChange += (area) => {
                _modelUpdatePeriod = 6;
                foreach (var hudPlugin in plugins)
                    hudPlugin.OnAreaChange(area);
            };

            foreach (var plugin in plugins)
            {
                if( null != plugin.SettingsNode )
                    Settings.AddModule(plugin.SettingsNode);
            }
            if (Settings.Global.ShowIngameMenu)
            {
            #if !DEBUG
                this.plugins.Add(new Menu.Menu(settings));
            #endif
            }
            UpdateObserverLists();

            rc.RenderModules = this.rc_OnRender;

            this.plugins.ForEach(x => x.Init(gameController));
        }
Beispiel #4
0
        public ExternalOverlay(GameController gameController, Func<bool> gameEnded)
        {
            settings = SettingsHub.Load();

            this.gameController = gameController;
            this.gameEnded = gameEnded;
            gameHandle = gameController.Window.Process.MainWindowHandle;

            SuspendLayout();
            Text = MathHepler.GetRandomWord(MathHepler.Randomizer.Next(7) + 5);
            TransparencyKey = Color.Transparent;
            BackColor = Color.Black;
            FormBorderStyle = FormBorderStyle.None;
            ShowIcon = false;
            TopMost = true;
            ResumeLayout(false);
            Load += OnLoad;
        }
Beispiel #5
0
        public static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += (sender, exceptionArgs) =>
            {
                var errorText = "Program exited with message:\n " + exceptionArgs.ExceptionObject;
                File.AppendAllText("Error.log", $"{DateTime.Now.ToString("g")} {errorText}\r\n{new string('-', 30)}\r\n");
                MessageBox.Show(errorText);
                Environment.Exit(1);
            };

            #if !DEBUG
            MemoryControl.Start();
            if (Scrambler.Scramble(args.Length > 0 ? args[0] : null))
            {
                return;
            }
            #endif

            Offsets offs;
            int pid = FindPoeProcess(out offs);

            if (pid == 0)
            {
                MessageBox.Show("Path of Exile is not running!");
                return;
            }

            Sounds.LoadSounds();

            using (var memory = new Memory(offs, pid))
            {
                offs.DoPatternScans(memory);
                var gameController = new GameController(memory);
                gameController.RefreshState();

                var overlay = new ExternalOverlay(gameController, memory.IsInvalid);
                Application.Run(overlay);
            }
        }
Beispiel #6
0
		public AreaController(GameController gameController)
		{
			Root = gameController;
		}
Beispiel #7
0
		public LegacyInventory(GameController poe, int address) : this(poe, poe.Game.GetObject<Poe.RemoteMemoryObjects.Inventory>(address))
		{
		}
Beispiel #8
0
		public LegacyInventory(GameController poe, Poe.RemoteMemoryObjects.Inventory internalInventory)
		{
			Poe = poe;
			InternalInventory = internalInventory;
		}
Beispiel #9
0
	    public ShowUiHierarchy(GameController gameController) : base(gameController)
	    {
	    }
Beispiel #10
0
 public EntityWrapper(GameController Poe, int address) : this(Poe, Poe.Internal.GetObject <Poe.Entity>(address))
 {
 }
Beispiel #11
0
 public AreaController(GameController gameController)
 {
     Root = gameController;
 }
Beispiel #12
0
		public LegacyInventory(GameController poe, int address) : this(poe, poe.Game.GetObject<Inventory>(address))
		{
		}
Beispiel #13
0
		public LegacyInventory(GameController poe, Inventory internalInventory)
		{
			Poe = poe;
			InternalInventory = internalInventory;
		}
Beispiel #14
0
 public void Init(GameController poe)
 {
     this.model = poe;
     this.OnEnable();
 }
Beispiel #15
0
 public Inventory(GameController Poe, int address)
     : this(Poe, Poe.Internal.GetObject<Poe.Inventory>(address))
 {
 }
Beispiel #16
0
 public Inventory(GameController Poe, Poe.Inventory InternalInventory)
 {
     this.Poe = Poe;
     this.InternalInventory = InternalInventory;
 }