Esempio n. 1
0
        public override void PaintWorld(WorldLayer layer)
        {
            var items = Hud.Game.Items.Where(item => item.Location == ItemLocation.Floor);

            foreach (var item in items)
            {
                var legendaryDisplayed = false;
                if (item.IsLegendary && item.Unidentified && (item.SnoItem.Kind != ItemKind.craft))
                {
                    legendaryDisplayed = true;
                    if (item.SetSno != uint.MaxValue)
                    {
                        if (item.AncientRank > 0)
                        {
                            AncientSetDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                        }
                        else
                        {
                            SetDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                        }
                    }
                    else
                    {
                        if (item.AncientRank > 0)
                        {
                            AncientDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                        }
                        else
                        {
                            LegendaryDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                        }
                    }
                }

                if (item.SnoItem.HasGroupCode("uber") || item.SnoItem.HasGroupCode("riftkeystone"))
                {
                    UtilityDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }

                if (item.SnoItem.Sno == 2087837753)
                {
                    DeathsBreathDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                    continue;
                }

                if (item.IsNormal && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    NormalKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsMagic && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    MagicKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsRare && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    RareKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsLegendary && (item.KeepDecision == ItemKeepDecision.LooksGood) && !legendaryDisplayed)
                {
                    LegendaryKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }

                if (!Hud.Game.IsInTown)
                {
                    if (item.SnoItem.Kind == ItemKind.book)
                    {
                        BookDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                    }
                }
            }
        }
Esempio n. 2
0
        public void PaintWorld(WorldLayer layer)
        {
            var items = Hud.Game.Items.Where(item => item.Location == ItemLocation.Floor);

            foreach (var item in items)
            {
                var inSet = Hud.Game.Me.ArmorySets.Any(set => set.ContainsItem(item));
                if (inSet)
                {
                    InArmorySetDecorator.Paint(layer, item, item.FloorCoordinate, Hud.Game.Me.ArmorySets.First(set => set.ContainsItem(item)).Name);
                    continue;
                }

                var legendaryDisplayed = false;
                if (item.IsLegendary && item.Unidentified && (item.SnoItem.Kind != ItemKind.craft))
                {
                    legendaryDisplayed = true;
                    if (item.SetSno != uint.MaxValue)
                    {
                        switch (item.AncientRank)
                        {
                        case 1:
                            AncientSetDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;

                        case 2:
                            PrimalSetDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;

                        default:
                            SetDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;
                        }
                    }
                    else
                    {
                        switch (item.AncientRank)
                        {
                        case 1:
                            AncientDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;

                        case 2:
                            PrimalDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;

                        default:
                            LegendaryDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                            break;
                        }
                    }
                }

                if (item.SnoItem.HasGroupCode("uber") || item.SnoItem.HasGroupCode("riftkeystone"))
                {
                    UtilityDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }

                if (item.SnoItem.Sno == 2087837753)
                {
                    DeathsBreathDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                    continue;
                }

                if (item.IsNormal && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    NormalKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsMagic && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    MagicKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsRare && (item.KeepDecision == ItemKeepDecision.LooksGood))
                {
                    RareKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }
                else if (item.IsLegendary && (item.KeepDecision == ItemKeepDecision.LooksGood) && !legendaryDisplayed)
                {
                    LegendaryKeepDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                }

                if (!Hud.Game.IsInTown)
                {
                    if (item.SnoItem.Kind == ItemKind.book)
                    {
                        BookDecorator.Paint(layer, item, item.FloorCoordinate, GetItemName(item));
                    }
                }
            }
        }