Exemple #1
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 goblins = Hud.Game.AliveMonsters.Where(x => x.SnoMonster.Priority == MonsterPriority.goblin);

            foreach (var goblin in goblins)
            {
                if (EnableSpeak && (goblin.LastSpeak == null) && Hud.Sound.LastSpeak.TimerTest(5000))
                {
                    Hud.Sound.Speak(goblin.SnoMonster.NameLocalized);
                    goblin.LastSpeak = Hud.Time.CreateAndStartWatch();
                }

                if (!SnoMapping.TryGetValue(goblin.SnoActor.Sno, out var decorator))
                {
                    decorator = DefaultGoblinDecorator;
                }

                decorator.Paint(layer, goblin, goblin.FloorCoordinate, goblin.SnoMonster.NameLocalized);
            }
        }
        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;
                }
            }
        }