Example #1
0
        public OverlayRenderer(PathOfExile poe, RenderingContext rc)
        {
            this.poe = poe;
            poe.Area.OnAreaChange += area => modelUpdatePeriod = 6;

            this.MinimapRenderer = new MinimapRenderer();
            this.XphRenderer = new XPHRenderer();
            this.PreloadAlert = new PreloadAlert();
            this.hudRenderers = new List<HUDPlugin>{
                new HealthBarRenderer(),
                new ItemAlerter(),
                this.MinimapRenderer,
                new ItemLevelRenderer(),
                new ItemRollsRenderer(),
                new DangerAlert(),
                this.XphRenderer,
                new ClientHacks(),
                this.PreloadAlert
            };
            if (Settings.GetBool("Window.ShowIngameMenu"))
            {
            #if !DEBUG
                this.hudRenderers.Add(new Menu.Menu());
            #endif
            }
            rc.OnRender += this.rc_OnRender;

            this.hudRenderers.ForEach(x => x.Init(poe, this));
        }
Example #2
0
 public EntityList(PathOfExile poe)
 {
     this.Poe = poe;
     this.entities = new Dictionary<int, Entity>();
     this.blackList = new HashSet<string>();
     poe.Area.OnAreaChange += this.AreaChanged;
     poe.OnUpdate += this.Update;
 }
Example #3
0
 public EntityList(PathOfExile poe)
 {
     this.Poe               = poe;
     this.entities          = new Dictionary <int, Entity>();
     this.blackList         = new HashSet <string>();
     poe.Area.OnAreaChange += this.AreaChanged;
     poe.OnUpdate          += this.Update;
 }
Example #4
0
 public Entity(PathOfExile Poe, Poe.Entity entity)
 {
     this.Poe            = Poe;
     this.InternalEntity = entity;
     this.Components     = this.InternalEntity.GetComponents();
     this.Path           = this.InternalEntity.Path;
     this.cachedId       = this.InternalEntity.ID;
     this.LongId         = this.InternalEntity.LongId;
 }
Example #5
0
        public static void Main(string[] args)
        {
            Offsets offs;
            int pid = FindPoeProcess(out offs);

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

            Sounds.LoadSounds();
            if (!Settings.LoadSettings())
            {
                return;
            }
            using (Memory memory = new Memory(offs, pid))
            {
                offs.DoPatternScans(memory);
                PathOfExile pathOfExile = new PathOfExile(memory);
                pathOfExile.Update();
                OverlayRenderer overlay = null;
                AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs exceptionArgs)
                {
                    if (overlay != null)
                    {
                        overlay.Detach();
                    }
                    MessageBox.Show("Program exited with message:\n " + exceptionArgs.ExceptionObject.ToString());
                    Environment.Exit(1);
                };
                try
                {
                    Console.WriteLine("Starting overlay");
                    TransparentDXOverlay transparentDXOverlay = new TransparentDXOverlay(pathOfExile.Window, () => memory.IsInvalid());
                    transparentDXOverlay.InitD3D();
                    overlay = new OverlayRenderer(pathOfExile, transparentDXOverlay.RC);
                    Application.Run(transparentDXOverlay);
                }
                finally
                {
                    if (overlay != null)
                    {
                        overlay.Detach();
                    }
                }
            }
        }
Example #6
0
 // dict is wrong 'cause hash is wrong
 // public Dictionary<int, AreaInstance> AreasVisited = new Dictionary<int, AreaInstance>();
 public AreaController(PathOfExile poe)
 {
     this.Poe = poe;
     poe.OnUpdate += this.poe_OnUpdate;
 }
Example #7
0
 public Inventory(PathOfExile Poe, int address)
     : this(Poe, Poe.Internal.GetObject<Poe.Inventory>(address))
 {
 }
Example #8
0
 public Inventory(PathOfExile Poe, Poe.Inventory InternalInventory)
 {
     this.Poe = Poe;
     this.InternalInventory = InternalInventory;
 }
Example #9
0
        // dict is wrong 'cause hash is wrong
        // public Dictionary<int, AreaInstance> AreasVisited = new Dictionary<int, AreaInstance>();

        public AreaController(PathOfExile poe)
        {
            this.Poe      = poe;
            poe.OnUpdate += this.poe_OnUpdate;
        }
Example #10
0
 public void Init(PathOfExile poe, OverlayRenderer overlay)
 {
     this.poe = poe;
     this.overlay = overlay;
     this.OnEnable();
 }
Example #11
0
 public Inventory(PathOfExile Poe, int address) : this(Poe, Poe.Internal.GetObject <Poe.Inventory>(address))
 {
 }
Example #12
0
 public Inventory(PathOfExile Poe, Poe.Inventory InternalInventory)
 {
     this.Poe = Poe;
     this.InternalInventory = InternalInventory;
 }
Example #13
0
 public Entity(PathOfExile Poe, int address) : this(Poe, Poe.Internal.GetObject <Poe.Entity>(address))
 {
 }