Пример #1
0
        public void PaintWorld(WorldLayer layer)
        {
            var items = Hud.Game.Items.Where(item => item.Location == ItemLocation.Floor);

            foreach (var item in items)
            {
                if (item.SnoItem.Kind == ItemKind.gem)
                {
                    int    quality = 0;
                    string type    = "";

                    Match match = GemNameRegex.Match(item.SnoActor.Code);

                    if (match.Success)
                    {
                        GroupCollection groups = match.Groups;

                        type = groups[1].Value;
                        Int32.TryParse(groups[2].Value, out quality);
                    }

                    if (quality >= MinGemQuality)
                    {
                        MapDecorator.Texture   = Hud.Texture.GetItemTexture(item.SnoItem);
                        GroundDecorator.Radius = 0.7f + (quality * 0.1f);
                        LabelDecorator.Enabled = item.IsOnScreen && ShowLabel;

                        GemDecorator.Paint(layer, item, item.FloorCoordinate, quality.ToString());
                    }
                }
            }
        }
Пример #2
0
        public void PaintWorld(WorldLayer layer)
        {
            var portals = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._treasuregoblin_portal_open);

            foreach (var actor in portals)
            {
                PortalDecorator.Paint(layer, actor, actor.FloorCoordinate, null);
            }


            var monsters = Hud.Game.AliveMonsters;

            foreach (var monster in monsters)
            {
                var name = monster.SnoMonster.NameEnglish;
                switch (name)
                {
                case "Malevolent Tormentor":
                    MalevolentDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && MalevolentSpeak != "")
                    {
                        if (MalevolentSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(MalevolentSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Blood Thief":
                    BloodDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && BloodSpeak != "")
                    {
                        if (BloodSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(BloodSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Odious Collector":
                    OdiousDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && OdiousSpeak != "")
                    {
                        if (OdiousSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(OdiousSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Gem Hoarder":
                    GemDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && GemSpeak != "")
                    {
                        if (GemSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(GemSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Gelatinous Sire":
                    GelatinousDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && GelatinousSpeak != "")
                    {
                        if (GelatinousSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(GelatinousSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Gelatinous Spawn":
                    GelatinousDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    break;

                case "Gilded Baron":
                    GildedDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && GildedSpeak != "")
                    {
                        if (GildedSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(GildedSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Insufferable Miscreant":
                    InsufferableDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && InsufferableSpeak != "")
                    {
                        if (InsufferableSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(InsufferableSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Menagerist Goblin":
                    MenageristDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && MenageristSpeak != "")
                    {
                        if (MenageristSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(MenageristSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Treasure Goblin":
                    TreasureDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && TreasureSpeak != "")
                    {
                        if (TreasureSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(TreasureSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Rainbow Goblin":
                    RainbowDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && RainbowSpeak != "")
                    {
                        if (RainbowSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(RainbowSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;

                case "Treasure Fiend":
                    FiendDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(2000) && FiendSpeak != "")
                    {
                        if (FiendSpeak == "默认")
                        {
                            Hud.Sound.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Sound.Speak(FiendSpeak);
                        }
                        monster.LastSpeak = Hud.Time.CreateAndStartWatch();
                    }
                    break;
                }
            }
        }