Example #1
0
        public override void Render(RenderingContext rc)
        {
            if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemLevel"))
            {
                return;
            }
            Element uIHover = this.poe.Internal.IngameState.UIHover;
            Entity  item    = uIHover.AsObject <InventoryItemIcon>().Item;

            if (item.address != 0 && item.IsValid)
            {
                Tooltip tooltip = uIHover.AsObject <InventoryItemIcon>().Tooltip;
                if (tooltip == null)
                {
                    return;
                }
                Element childAtIndex = tooltip.GetChildAtIndex(0);
                if (childAtIndex == null)
                {
                    return;
                }
                Element childAtIndex2 = childAtIndex.GetChildAtIndex(1);
                if (childAtIndex2 == null)
                {
                    return;
                }
                Rect clientRect = childAtIndex2.GetClientRect();
                rc.AddTextWithHeight(new Vec2(clientRect.X + 2, clientRect.Y + 2), item.GetComponent <Mods>().ItemLevel.ToString(), Color.White, 16, DrawTextFormat.Left);
            }
        }
Example #2
0
        public override void Render(RenderingContext rc, Dictionary <UiMountPoint, Vec2> mountPoints)
        {
            Element uiHover = this.model.Internal.IngameState.ElementUnderCursor;

            Tooltip tooltip = uiHover.AsObject <InventoryItemIcon>().Tooltip;

            if (tooltip == null)
            {
                return;
            }
            Element childAtIndex1 = tooltip.GetChildAtIndex(0);

            if (childAtIndex1 == null)
            {
                return;
            }
            Element childAtIndex2 = childAtIndex1.GetChildAtIndex(1);

            if (childAtIndex2 == null)
            {
                return;
            }
            Rect clientRect = childAtIndex2.GetClientRect();


            Entity poeEntity = uiHover.AsObject <InventoryItemIcon>().Item;

            if (poeEntity.Address == 0 || !poeEntity.IsValid)
            {
                return;
            }

            if (this._lastHovered == null || this._lastHovered.ID != poeEntity.ID)
            {
                this._lastHovered = poeEntity;

                this._mods = new List <RollValue>();
                //List<Poe_ItemMod> impMods = lastHovered.GetComponent<Mods>().ImplicitMods;
                List <ItemMod> expMods = poeEntity.GetComponent <Mods>().ItemMods;
                int            ilvl    = poeEntity.GetComponent <Mods>().ItemLevel;
                foreach (ItemMod item in expMods)
                {
                    this._mods.Add(new RollValue(item, model.Files, ilvl));
                }
            }
            if (Settings.ShowItemMods)
            {
                RenderRolls(rc, clientRect);
            }
            if (Settings.ShowItemLevel)
            {
                RenderItemLevel(rc, clientRect);
            }
        }
Example #3
0
        public override void Render(RenderingContext rc, Dictionary <UiMountPoint, Vec2> mountPoints)
        {
            if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemLevel"))
            {
                return;
            }
            Element uIHover = this.model.Internal.IngameState.UIHover;
            Entity  item    = uIHover.AsObject <InventoryItemIcon>().Item;

            if (item.address == 0 || !item.IsValid)
            {
                return;
            }

            Tooltip tooltip = uIHover.AsObject <InventoryItemIcon>().Tooltip;

            if (tooltip == null)
            {
                return;
            }
            Element childAtIndex = tooltip.GetChildAtIndex(0);

            if (childAtIndex == null)
            {
                return;
            }
            Element childAtIndex2 = childAtIndex.GetChildAtIndex(1);

            if (childAtIndex2 == null)
            {
                return;
            }
            Rect   clientRect = childAtIndex2.GetClientRect();
            string text       = item.GetComponent <Mods>().ItemLevel + " @ " + item.address.ToString("X8");

            rc.AddTextWithHeight(new Vec2(clientRect.X + 2, clientRect.Y + 2), text, Color.White, 14, DrawTextFormat.Left);
        }
Example #4
0
        public override void Render(RenderingContext rc)
        {
            if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemMods"))
            {
                return;
            }
            Element uiHover   = this.poe.Internal.IngameState.UIHover;
            Entity  poeEntity = uiHover.AsObject <InventoryItemIcon>().Item;

            if (poeEntity.address == 0 || !poeEntity.IsValid)
            {
                return;
            }
            Tooltip tooltip = uiHover.AsObject <InventoryItemIcon>().Tooltip;

            if (tooltip == null)
            {
                return;
            }
            Element childAtIndex1 = tooltip.GetChildAtIndex(0);

            if (childAtIndex1 == null)
            {
                return;
            }
            Element childAtIndex2 = childAtIndex1.GetChildAtIndex(1);

            if (childAtIndex2 == null)
            {
                return;
            }
            Rect clientRect = childAtIndex2.GetClientRect();
            Rect headerRect = childAtIndex1.GetChildAtIndex(0).GetClientRect();

            if (this.poeEntity == null || this.poeEntity.ID != poeEntity.ID)
            {
                this.mods = new List <MaxRolls_Current>();
                //List<Poe_ItemMod> impMods = poeEntity.GetComponent<Mods>().ImplicitMods;
                List <ItemMod> expMods = poeEntity.GetComponent <Mods>().ItemMods;
                int            ilvl    = poeEntity.GetComponent <Mods>().ItemLevel;
                foreach (ItemMod item in expMods)
                {
                    this.mods.Add(new MaxRolls_Current(item.Name, item.Level, ilvl));
                }
                this.poeEntity = poeEntity;
            }
            int tooltipBotY = clientRect.Y + clientRect.H;
            int i           = tooltipBotY;

            // Implicit mods
            //foreach (Poe_ItemMod item in impMods)
            //{
            //    rc.AddTextWithHeight(new Vec2(clientRect.X, i), item.Name, Color.Yellow, 9, DrawTextFormat.Left);
            //    rc.AddTextWithHeight(new Vec2(clientRect.X + clientRect.W - 10, i), item.Level.ToString(), Color.White, 6, DrawTextFormat.Left);
            //    i += 20;
            //}
            foreach (MaxRolls_Current item in this.mods)
            {
                rc.AddTextWithHeight(new Vec2(clientRect.X, i), item.name, item.color, 8, DrawTextFormat.Left);
                i += 20;
                rc.AddTextWithHeight(new Vec2(clientRect.X + clientRect.W - 100, i), item.max, Color.White, 8, DrawTextFormat.Left);
                rc.AddTextWithHeight(new Vec2(clientRect.X + 30, i), item.curr, Color.White, 8, DrawTextFormat.Left);
                i += 20;
                if (item.curr2 != null && item.max2 != null)
                {
                    rc.AddTextWithHeight(new Vec2(clientRect.X + clientRect.W - 100, i), item.max2, Color.White, 8, DrawTextFormat.Left);
                    rc.AddTextWithHeight(new Vec2(clientRect.X + 30, i), item.curr2, Color.White, 8, DrawTextFormat.Left);
                    i += 20;
                }
            }
            if (i > tooltipBotY)
            {
                Rect helpRect = new Rect(clientRect.X + 1, tooltipBotY, clientRect.W, i - tooltipBotY);
                rc.AddBox(helpRect, Color.FromArgb(220, Color.Black));
            }
        }
Example #5
0
        public override void Render(RenderingContext rc, Dictionary <UiMountPoint, Vec2> mountPoints)
        {
            Element uiHover = this.model.Internal.IngameState.ElementUnderCursor;

            Tooltip tooltip = uiHover.AsObject <InventoryItemIcon>().Tooltip;

            if (tooltip == null)
            {
                return;
            }
            Element childAtIndex1 = tooltip.GetChildAtIndex(0);

            if (childAtIndex1 == null)
            {
                return;
            }
            Element childAtIndex2 = childAtIndex1.GetChildAtIndex(1);

            if (childAtIndex2 == null)
            {
                return;
            }
            Rect clientRect = childAtIndex2.GetClientRect();


            Entity poeEntity = uiHover.AsObject <InventoryItemIcon>().Item;

            if (poeEntity.Address == 0 || !poeEntity.IsValid)
            {
                return;
            }

            if (this._lastHovered == null || this._lastHovered.ID != poeEntity.ID)
            {
                this._lastHovered = poeEntity;

                this._explicitMods = new List <RollValue>();
                this._implicitMods = new List <RollValue>();
                int ilvl = poeEntity.GetComponent <Mods>().ItemLevel;
                foreach (ItemMod item in poeEntity.GetComponent <Mods>().ItemMods)
                {
                    this._explicitMods.Add(new RollValue(item, model.Files, ilvl));
                }
                foreach (ItemMod item in poeEntity.GetComponent <Mods>().ImplicitMods)
                {
                    this._implicitMods.Add(new RollValue(item, model.Files, ilvl, true));
                }

                _quality = poeEntity.GetComponent <Quality>().ItemQuality;

                Weapon weap = poeEntity.GetComponent <Weapon>();
                if (weap.Address != 0)
                {
                    var attack = weap.Attack;
                    _weaponAttack = new WeaponAttack()
                    {
                        AttackDelay = attack.AttackTime, CritChancePer10K = attack.CritChance, MinDamage = attack.DamageMin, MaxDamage = attack.DamageMax
                    };
                }
                else
                {
                    _weaponAttack = null;
                }
            }

            RenderRolls(rc, clientRect);

            if (_weaponAttack != null && Settings.ShowDps)
            {
                RenderWeaponStats(rc, clientRect);
            }
            if (Settings.ShowItemLevel)
            {
                RenderItemLevel(rc, clientRect);
            }
        }
Example #6
0
        public override void Render(RenderingContext rc, Dictionary <UiMountPoint, Vec2> mountPoints)
        {
            if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemMods"))
            {
                return;
            }
            Element uiHover = this.model.Internal.IngameState.UIHover;

            Tooltip tooltip = uiHover.AsObject <InventoryItemIcon>().Tooltip;

            if (tooltip == null)
            {
                return;
            }
            Element childAtIndex1 = tooltip.GetChildAtIndex(0);

            if (childAtIndex1 == null)
            {
                return;
            }
            Element childAtIndex2 = childAtIndex1.GetChildAtIndex(1);

            if (childAtIndex2 == null)
            {
                return;
            }
            Rect clientRect = childAtIndex2.GetClientRect();

            Entity poeEntity = uiHover.AsObject <InventoryItemIcon>().Item;

            if (poeEntity.address == 0 || !poeEntity.IsValid)
            {
                return;
            }
            if (this.poeEntity == null || this.poeEntity.ID != poeEntity.ID)
            {
                this.mods = new List <RollValue>();
                //List<Poe_ItemMod> impMods = poeEntity.GetComponent<Mods>().ImplicitMods;
                List <ItemMod> expMods = poeEntity.GetComponent <Mods>().ItemMods;
                int            ilvl    = poeEntity.GetComponent <Mods>().ItemLevel;
                foreach (ItemMod item in expMods)
                {
                    this.mods.Add(new RollValue(item, model.Files, ilvl));
                }
                this.poeEntity = poeEntity;
            }
            int yPosTooltil = clientRect.Y + clientRect.H + 5;
            int i           = yPosTooltil + 4;

            // Implicit mods
            //foreach (Poe_ItemMod item in impMods)
            //{
            //    rc.AddTextWithHeight(new Vec2(clientRect.X, yPos), item.Name, Color.Yellow, 9, DrawTextFormat.Left);
            //    rc.AddTextWithHeight(new Vec2(clientRect.X + clientRect.W - 10, yPos), item.Level.ToString(), Color.White, 6, DrawTextFormat.Left);
            //    yPos += 20;
            //}

            foreach (RollValue item in this.mods)
            {
                i = drawStatLine(rc, item, clientRect, i);

                i += 4;
                //if (item.curr2 != null && item.max2 != null)
                //{
                //	rc.AddTextWithHeight(new Vec2(clientRect.X + clientRect.W - 100, yPos), item.AllTiersRange2.ToString(), Color.White, 8, DrawTextFormat.Left);
                //	rc.AddTextWithHeight(new Vec2(clientRect.X + 30, yPos), item.curr2, Color.White, 8, DrawTextFormat.Left);
                //	yPos += 20;
                //}
            }
            if (i > yPosTooltil + 4)
            {
                Rect helpRect = new Rect(clientRect.X + 1, yPosTooltil, clientRect.W, i - yPosTooltil);
                rc.AddBox(helpRect, Color.FromArgb(220, Color.Black));
            }
        }