Пример #1
0
        public override void Render(RenderingContext rc)
        {
            if (!Settings.GetBool("Tooltip") || !Settings.GetBool("Tooltip.ShowItemLevel"))
            {
                return;
            }
            Poe_UIElement uIHover = this.poe.Internal.IngameState.UIHover;
            Poe_Entity    item    = uIHover.AsObject <Poe_UI_InventoryItemIcon>().Item;

            if (item.address != 0 && item.IsValid)
            {
                Poe_UI_Tooltip tooltip = uIHover.AsObject <Poe_UI_InventoryItemIcon>().Tooltip;
                if (tooltip == null)
                {
                    return;
                }
                Poe_UIElement childAtIndex = tooltip.GetChildAtIndex(0);
                if (childAtIndex == null)
                {
                    return;
                }
                Poe_UIElement 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);
            }
        }
Пример #2
0
        public override void Render(RenderingContext rc)
        {
            if (!Settings.GetBool("ItemAlert") || !Settings.GetBool("ItemAlert.ShowText"))
            {
                return;
            }
            Rect clientRect = this.poe.Internal.game.IngameState.IngameUi.Minimap.SmallMinimap.GetClientRect();
            Vec2 vec        = new Vec2(clientRect.X + clientRect.W, clientRect.Y + clientRect.H);

            int y        = vec.Y;
            int fontSize = Settings.GetInt("ItemAlert.ShowText.FontSize");

            foreach (KeyValuePair <Entity, AlertDrawStyle> kv in this.currentAlerts)
            {
                if (kv.Key.IsValid)
                {
                    Poe_UI_EntityLabel labelFromEntity = this.poe.GetLabelFromEntity(kv.Key);
                    string             text;
                    if (labelFromEntity == null)
                    {
                        Poe_Entity itemEntity = kv.Key.GetComponent <WorldItem>().ItemEntity;
                        if (!itemEntity.IsValid)
                        {
                            continue;
                        }
                        text = kv.Value.Text;
                    }
                    else
                    {
                        text = labelFromEntity.Text;
                    }

                    int  frameWidth  = kv.Value.FrameWidth;
                    Vec2 vPadding    = new Vec2(frameWidth * 5, frameWidth);
                    int  frameMargin = frameWidth * 2;

                    Vec2 textPos = new Vec2(vec.X - vPadding.X, y + vPadding.Y);

                    var vTextFrame = rc.AddTextWithHeight(textPos, text, kv.Value.color, fontSize, DrawTextFormat.Right);
                    if (frameWidth > 0)
                    {
                        rc.AddFrame(new Rect(vec.X - vTextFrame.X - 2 * vPadding.X, y, vTextFrame.X + 2 * vPadding.X, vTextFrame.Y + 2 * vPadding.Y), kv.Value.color, frameWidth);
                    }
                    y += vTextFrame.Y + 2 * vPadding.Y + frameMargin;
                }
            }
        }
Пример #3
0
        public bool HasMinion(Poe_Entity entity)
        {
            if (this.address == 0)
            {
                return(false);
            }
            int num  = this.m.ReadInt(this.address + 656);
            int num2 = this.m.ReadInt(this.address + 660);

            for (int i = num; i < num2; i += 8)
            {
                int num3 = this.m.ReadInt(i);
                if (num3 == entity.ID)
                {
                    return(true);
                }
            }
            return(false);
        }