Exemple #1
0
        public void PaintWorld(WorldLayer layer)
        {
            if ((Hud.Game.MapMode == MapMode.WaypointMap) || (Hud.Game.MapMode == MapMode.ActMap) || (Hud.Game.MapMode == MapMode.Map))
            {
                return;
            }
            var inRift   = Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.GreaterRift;
            var monsters = Hud.Game.AliveMonsters;

            foreach (var monster in monsters)
            {
                bool illusionist = false;
                if (monster.SummonerAcdDynamicId == 0)
                {
                    illusionist = false;
                }
                else
                {
                    illusionist = true;
                }
                // trash
                if (!monster.Invisible && !monster.IsElite && (monster.SnoMonster.Priority != MonsterPriority.goblin) && (monster.SnoMonster.Priority != MonsterPriority.boss) && (monster.SnoMonster.Priority != MonsterPriority.keywarden))
                {
                    TrashDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.Rarity == ActorRarity.Unique)
                {
                    UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.SnoMonster.Priority == MonsterPriority.boss)
                {
                    BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.Rarity == ActorRarity.Champion && illusionist == false)
                {
                    ChampionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.Rarity == ActorRarity.RareMinion && illusionist == false)
                {
                    RareMinionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.Rarity == ActorRarity.Rare && illusionist == false)
                {
                    RareDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if ((monster.Rarity == ActorRarity.Unique) && (monster.SnoMonster.Priority < MonsterPriority.keywarden) && illusionist == false)
                {
                    UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
                if (monster.SnoMonster.Priority == MonsterPriority.boss && illusionist == false)
                {
                    BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
            }
        }
        public void PaintWorld(WorldLayer layer)
        {
            var monster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1;

            if (monster == null)
            {
                return;
            }
            if (monster.SummonerAcdDynamicId != 0 && monster.IsElite)
            {
                return;
            }
            if (!monster.Invisible && !monster.IsElite && (monster.SnoMonster.Priority != MonsterPriority.goblin) && (monster.SnoMonster.Priority != MonsterPriority.boss) && (monster.SnoMonster.Priority != MonsterPriority.keywarden))
            {
                TrashDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.Rarity == ActorRarity.Unique)
            {
                UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.SnoMonster.Priority == MonsterPriority.boss)
            {
                BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.Rarity == ActorRarity.Champion)
            {
                ChampionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.Rarity == ActorRarity.RareMinion)
            {
                RareMinionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.Rarity == ActorRarity.Rare)
            {
                RareDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if ((monster.Rarity == ActorRarity.Unique) && (monster.SnoMonster.Priority < MonsterPriority.keywarden))
            {
                UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
            if (monster.SnoMonster.Priority == MonsterPriority.boss)
            {
                BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
            }
        }
Exemple #3
0
        public void PaintWorld(WorldLayer layer)
        {
            var monsters = Hud.Game.AliveMonsters;
            var goblins  = Hud.Game.AliveMonsters.Where(x => x.SnoMonster.Priority == MonsterPriority.goblin);

            foreach (var monster in goblins)
            {
                GoblinDecorator.Paint(layer, monster, monster.FloorCoordinate, null);
            }

            List <IMonster> monstersElite = new List <IMonster>();

            foreach (var monster in monsters)
            {
                if (monster.Rarity == ActorRarity.Champion || monster.Rarity == ActorRarity.Rare)
                {
                    monstersElite.Add(monster);
                }

                if (monster.Rarity == ActorRarity.RareMinion)
                {
                    RareMinionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }

                if (monster.Rarity == ActorRarity.Unique)
                {
                    UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }

                if (monster.Rarity == ActorRarity.Boss)
                {
                    BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                }
            }
            foreach (var monster in monstersElite)
            {
                if (monster.SummonerAcdDynamicId == 0)
                {
                    bool flag = true;
                    foreach (var snoMonsterAffix in monster.AffixSnoList)
                    {
                        string affixName = null;
                        if (CustomAffixNames.ContainsKey(snoMonsterAffix.Affix))
                        {
                            affixName = CustomAffixNames[snoMonsterAffix.Affix];
                        }
                        else
                        {
                            affixName = snoMonsterAffix.NameLocalized;
                        }
                        if (snoMonsterAffix.Affix == MonsterAffix.Juggernaut)
                        {
                            flag = false;
                        }

                        WorldDecoratorCollection decorator;
                        if (!AffixDecorators.TryGetValue(snoMonsterAffix.Affix, out decorator))
                        {
                            continue;
                        }
                        decorator.Paint(layer, monster, monster.FloorCoordinate, affixName);
                    }
                    if (monster.Rarity == ActorRarity.Rare)
                    {
                        if (flag)
                        {
                            RareDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                        }
                        else
                        {
                            JuggernautDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                        }
                    }
                    if (monster.Rarity == ActorRarity.Champion)
                    {
                        ChampionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
                    }
                }
            }

            monstersElite.Clear();
        }