示例#1
0
        private void Speak(IItem item, string customText = null)
        {
            var text = customText ?? item.SnoItem.NameLocalized;

            Hud.Speak(text);
            item.LastSpeak = Hud.CreateAndStartWatch();
        }
示例#2
0
        public void PaintWorld(WorldLayer layer)
        {
            var portals = Hud.Game.Actors.Where(x => x.SnoActor.Sno == 410460);

            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.LastSpeak.TimerTest(5000))
                {
                    Hud.Speak(goblin.SnoMonster.NameLocalized);
                    goblin.LastSpeak = Hud.CreateAndStartWatch();
                }

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

                decorator.Paint(layer, goblin, goblin.FloorCoordinate, goblin.SnoMonster.NameLocalized);
            }
        }
        private void MarkSoundAlert(IItem item)
        {
            if (item.LastSpeak != null)
            {
                return;
            }

            item.LastSpeak = Hud.CreateAndStartWatch();
        }
示例#4
0
        public void PaintWorld(WorldLayer layer)
        {
            var banners = Hud.Game.Banners;

            foreach (var banner in banners)
            {
                Decorator.Paint(layer, null, banner.FloorCoordinate, "注意队友旗子");
            }
            var actors = Hud.Game.Actors.Where(actor => actor.DisplayOnOverlay && _actorSnoList.Contains(actor.SnoActor.Sno));

            foreach (var actor in actors)
            {
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000))
                {
                    Hud.Speak("注意队友旗子");
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }
        }
示例#5
0
        public void PaintWorld(WorldLayer layer)
        {
            var actors = Hud.Game.Actors.Where(x => x.SnoActor.Kind == ActorKind.PowerGlobe);

            foreach (var actor in actors)
            {
                PowerGlobeDecorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen); // do not display ground labels when the actor is on the screen
                PowerGlobeDecorator.Paint(layer, actor, actor.FloorCoordinate, "荣耀球");
            }

            actors = Hud.Game.Actors.Where(x => x.SnoActor.Kind == ActorKind.RiftOrb);
            foreach (var actor in actors)
            {
                RiftOrbDecorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen); // do not display ground labels when the actor is on the screen
                RiftOrbDecorator.Paint(layer, actor, actor.FloorCoordinate, "进度球");
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && !actor.IsOnScreen && Hud.Game.SpecialArea == SpecialArea.GreaterRift)
                {
                    Hud.Speak("进度球");
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }
        }
示例#6
0
        public void PaintWorld(WorldLayer layer)
        {
            var actors = Hud.Game.Actors.Where(actor => actor.DisplayOnOverlay && _actorSnoList.Contains(actor.SnoActor.Sno));

            foreach (var actor in actors)
            {
                Decorator.Paint(layer, actor, actor.FloorCoordinate, DisplayTextOnActors + ":" + actor.SnoActor.NameLocalized);
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000))
                {
                    Hud.Speak(DisplayTextOnActors + ":" + actor.SnoActor.NameLocalized);
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }

            var monsters = Hud.Game.AliveMonsters.Where(monster => _monsterSnoList.Contains(monster.SnoActor.Sno));

            foreach (var monster in monsters)
            {
                Decorator.Paint(layer, monster, monster.FloorCoordinate, DisplayTextOnMonsters + ":" + monster.SnoMonster.NameLocalized);
                if (EnableSpeak && (monster.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000))
                {
                    Hud.Speak(DisplayTextOnMonsters + ":" + monster.SnoMonster.NameLocalized);
                    monster.LastSpeak = Hud.CreateAndStartWatch();
                }
            }

            var items = Hud.Game.Items.Where(item => item.Location == ItemLocation.Floor && IsCosmetic(item));

            foreach (var item in items)
            {
                Decorator.Paint(layer, item, item.FloorCoordinate, DisplayTextOnItems + ":" + item.SnoItem.NameLocalized);
                if (EnableSpeak && (item.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000))
                {
                    Hud.Speak(DisplayTextOnItems + ":" + item.SnoItem.NameLocalized);
                    item.LastSpeak = Hud.CreateAndStartWatch();
                }
            }
        }
示例#7
0
        public void PaintWorld(WorldLayer layer)
        {
            var shrines = Hud.Game.Shrines.Where(x => x.DisplayOnOverlay && (x.Type != ShrineType.HealingWell) && (x.Type != ShrineType.PoolOfReflection));

            foreach (var actor in shrines)
            {
                switch (actor.SnoActor.Sno)
                {
                case 225025:
                case 176074:
                    BlessedShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && BlessedSpeak != "")
                    {
                        if (BlessedSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(BlessedSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 225262:
                case 176075:
                    EnlightenedShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && EnlightenedSpeak != "")
                    {
                        if (EnlightenedSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(EnlightenedSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 225263:
                case 176076:
                    FortuneShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && FortuneSpeak != "")
                    {
                        if (FortuneSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(FortuneSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 225266:
                case 176077:
                    FrenziedShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && FrenziedSpeak != "")
                    {
                        if (FrenziedSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(FrenziedSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 260342:
                case 260346:
                    FleetingShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && FleetingSpeak != "")
                    {
                        if (FleetingSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(FleetingSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 260343:
                case 260347:
                    EmpoweredShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && EmpoweredSpeak != "")
                    {
                        if (EmpoweredSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(EmpoweredSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 434409:
                case 269349:
                    BanditShrineDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && BanditSpeak != "")
                    {
                        if (BanditSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(BanditSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 330695:
                    PowerPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && PowerSpeak != "")
                    {
                        if (PowerSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(PowerSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 330696:
                case 398654:
                    ConduitPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && ConduitSpeak != "")
                    {
                        if (ConduitSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(ConduitSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 330697:
                    ChannelingPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && ChannelingSpeak != "")
                    {
                        if (ChannelingSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(ChannelingSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 330698:
                    ShieldPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && ShieldSpeak != "")
                    {
                        if (ShieldSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(ShieldSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

                case 330699:
                    SpeedPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                    if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && SpeedSpeak != "")
                    {
                        if (SpeedSpeak == "默认")
                        {
                            Hud.Speak(actor.SnoActor.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(SpeedSpeak);
                        }
                        actor.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;
                }
            }


            var healingWells = Hud.Game.Shrines.Where(x => x.DisplayOnOverlay && (x.Type == ShrineType.HealingWell));

            foreach (var actor in healingWells)
            {
                HealingWellDecorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen); // do not display ground labels when the actor is on the screen
                HealingWellDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && HealingSpeak != "")
                {
                    if (HealingSpeak == "默认")
                    {
                        Hud.Speak(actor.SnoActor.NameLocalized);
                    }
                    else
                    {
                        Hud.Speak(HealingSpeak);
                    }
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }

            var poolOfReflections = Hud.Game.Shrines.Where(x => x.DisplayOnOverlay && (x.Type == ShrineType.PoolOfReflection));

            foreach (var actor in poolOfReflections)
            {
                PoolOfReflectionDecorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen); // do not display ground labels when the actor is on the screen
                PoolOfReflectionDecorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameLocalized);
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && PoolSpeak != "")
                {
                    if (PoolSpeak == "默认")
                    {
                        Hud.Speak(actor.SnoActor.NameLocalized);
                    }
                    else
                    {
                        Hud.Speak(PoolSpeak);
                    }
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }

            var riftPylonSpawnPoints = Hud.Game.Actors.Where(x => x.SnoActor.Sno == 428690);

            foreach (var actor in riftPylonSpawnPoints)
            {
                PossibleRiftPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, "??塔");
                if (EnableSpeak && (actor.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && PossibleRiftPylonSpeak != "")
                {
                    Hud.Speak(PossibleRiftPylonSpeak);
                    actor.LastSpeak = Hud.CreateAndStartWatch();
                }
            }
        }
示例#8
0
        public void PaintWorld(WorldLayer layer)
        {
            var portals = Hud.Game.Actors.Where(x => x.SnoActor.Sno == 410460);

            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.LastSpeak.TimerTest(2000) && MalevolentSpeak != "")
                    {
                        if (MalevolentSpeak == "默认")
                        {
                            Hud.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(MalevolentSpeak);
                        }
                        monster.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

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

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

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

                case "Gelatinous Sire":
                    GelatinousDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    if (EnableSpeak && (monster.LastSpeak == null) && Hud.LastSpeak.TimerTest(2000) && GelatinousSpeak != "")
                    {
                        if (GelatinousSpeak == "默认")
                        {
                            Hud.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(GelatinousSpeak);
                        }
                        monster.LastSpeak = Hud.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.LastSpeak.TimerTest(2000) && GildedSpeak != "")
                    {
                        if (GildedSpeak == "默认")
                        {
                            Hud.Speak(monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            Hud.Speak(GildedSpeak);
                        }
                        monster.LastSpeak = Hud.CreateAndStartWatch();
                    }
                    break;

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

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

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

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

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