public void PaintWorld(WorldLayer layer)
        {
            var players = Hud.Game.Players.Where(player => !player.IsMe && player.CoordinateKnown && Hud.Game.Me.SnoArea.Sno == player.SnoArea.Sno && (player.HeadStone == null));

            foreach (var player in players)
            {
                var HeroTexture = Hud.Texture.GetTexture(890155253);

                if (player.HeroClassDefinition.HeroClass.ToString() == "Barbarian")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3921484788);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(1030273087);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Crusader")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3742271755);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(3435775766);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "DemonHunter")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3785199803);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(2939779782);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Monk")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(2227317895);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(2918463890);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Necromancer")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3285997023);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(473831658);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "WitchDoctor")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3925954876);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(1603231623);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Wizard")
                {
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(44435619);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(876580014);
                    }
                }
                float PlayersHeadOpacity = 1f;
                var   Elites             = Hud.Game.Monsters.Where(M => M.IsAlive && M.Rarity != ActorRarity.Normal && M.Rarity != ActorRarity.RareMinion && M.Rarity != ActorRarity.Hireling && M.FloorCoordinate.XYDistanceTo(player.FloorCoordinate) <= 25);
                if (Elites.Count() > 0)
                {
                    PlayersHeadOpacity = 0.20f;
                }

                Hud.Render.GetMinimapCoordinates(player.FloorCoordinate.X, player.FloorCoordinate.Y, out float textureX, out float textureY);
                HeroTexture.Draw(textureX - 11, textureY - 11, 22.3f, 24.1f, PlayersHeadOpacity);

                if (!DecoratorByClass.TryGetValue(player.HeroClassDefinition.HeroClass, out WorldDecoratorCollection decorator))
                {
                    continue;
                }

                decorator.Paint(layer, null, player.FloorCoordinate.Offset(NameOffsetX, NameOffsetY, NameOffsetZ), player.BattleTagAbovePortrait);
                if (IsZDPS(player))
                {
                    ZDPSDecorator.Paint(layer, null, player.FloorCoordinate, "Z");
                }
            }

            if (ShowCompanions && Hud.Game.NumberOfPlayersInGame == 1)
            {
                var companions = Hud.Game.Actors.Where(C => C.SnoActor.Sno == 52694 || C.SnoActor.Sno == 4482 || C.SnoActor.Sno == 52693);
                foreach (var companion in companions)
                {
                    var CompTexture = Hud.Texture.GetTexture(890155253);
                    if (companion.SnoActor.Sno == 52694)
                    {
                        CompTexture = Hud.Texture.GetTexture(441912908);                                // scoundrel
                    }
                    else if (companion.SnoActor.Sno == 4482)
                    {
                        CompTexture = Hud.Texture.GetTexture(2807221403);                                    // enchantress
                    }
                    else if (companion.SnoActor.Sno == 52693)
                    {
                        CompTexture = Hud.Texture.GetTexture(1094113362);                                     // templar
                    }
                    else
                    {
                        continue;
                    }

                    float CompanionsHeadOpacity = 1f;
                    var   Elites = Hud.Game.Monsters.Where(M => M.IsAlive && M.Rarity != ActorRarity.Normal && M.Rarity != ActorRarity.RareMinion && M.Rarity != ActorRarity.Hireling && M.FloorCoordinate.XYDistanceTo(companion.FloorCoordinate) <= 25);
                    if (Elites.Count() > 0)
                    {
                        CompanionsHeadOpacity = 0.20f;
                    }

                    Hud.Render.GetMinimapCoordinates(companion.FloorCoordinate.X, companion.FloorCoordinate.Y, out float textureX, out float textureY);
                    CompTexture.Draw(textureX - 11, textureY - 11, 22.3f, 24.1f, CompanionsHeadOpacity);
                }
            }
        }
Exemple #2
0
        public override void Load(IController hud)
        {
            base.Load(hud);

            var pingTransformator = new StandardPingRadiusTransformator(Hud, 333);
            var shapePainter      = new CircleShapePainter(Hud);

            var grounLabelBackgroundBrush = Hud.Render.CreateBrush(255, 0, 0, 0, 0);

            DecoratorByClass.Add(HeroClass.Barbarian, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 200, 250, 10, 10, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(200, 250, 10, 10, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 200, 250, 10, 10, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Crusader, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 240, 0, 200, 250, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(240, 0, 200, 250, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 240, 0, 200, 250, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.DemonHunter, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 0, 0, 200, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 0, 0, 200, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 0, 0, 200, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Monk, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 245, 120, 0, 200, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(245, 120, 0, 200, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 245, 120, 0, 200, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.WitchDoctor, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 155, 0, 155, 125, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(155, 0, 155, 125, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 155, 0, 155, 125, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Wizard, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 250, 50, 180, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 250, 50, 180, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 250, 50, 180, false, false, 128, 0, 0, 0, true),
            }
                                     ));
        }
        public override void Load(IController hud)
        {
            base.Load(hud);

            var groundLabelBackgroundBrush = Hud.Render.CreateBrush(255, 0, 0, 0, 0);

            DecoratorByClass.Add(HeroClass.Barbarian, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 200, 255, 60, 60, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(200, 250, 10, 10, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 200, 255, 60, 60, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Crusader, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 240, 0, 200, 250, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(240, 0, 200, 250, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 240, 0, 200, 250, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.DemonHunter, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 180, 180, 255, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 0, 0, 200, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 180, 180, 255, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Monk, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 245, 170, 0, 255, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(245, 120, 0, 200, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 245, 170, 0, 255, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Necromancer, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 175, 238, 238, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 175, 238, 238, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 175, 238, 238, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.WitchDoctor, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 155, 0, 155, 125, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(155, 0, 155, 125, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 155, 0, 155, 125, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Wizard, new WorldDecoratorCollection(
                                     new MapLabelDecorator(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 250, 50, 180, false, false, 128, 0, 0, 0, true),
                Up        = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = groundLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 250, 50, 180, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 250, 50, 180, false, false, 128, 0, 0, 0, true),
            }
                                     ));
        }
Exemple #4
0
        public override void Load(IController hud)
        {
            base.Load(hud);

            var grounLabelBackgroundBrush = Hud.Render.CreateBrush(120, 0, 0, 0, 0);

            ZDPSDecorator = new WorldDecoratorCollection(
                new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 255, 255, false, false, 128, 0, 0, 0, true),
                UpUp      = true,
            });

            DecoratorByClass.Add(HeroClass.Barbarian, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 237, 20, 20, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 237, 20, 20, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 237, 20, 20, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Crusader, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 204, 0, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 255, 204, 0, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 204, 0, false, false, 128, 0, 0, 0, false),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.DemonHunter, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 0, 168, 255, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 0, 168, 255, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 0, 168, 255, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Monk, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 132, 0, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 255, 132, 0, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 255, 132, 0, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Necromancer, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 215, 201, 164, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 215, 201, 164, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 215, 201, 164, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.WitchDoctor, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 43, 231, 6, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 43, 231, 6, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 43, 231, 6, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            DecoratorByClass.Add(HeroClass.Wizard, new WorldDecoratorCollection(
                                     new MapLabelDecorator2(Hud)
            {
                LabelFont = Hud.Render.CreateFont("tahoma", 6f, 255, 182, 26, 255, false, false, 128, 0, 0, 0, true),
                Down      = true,
            },
                                     new GroundLabelDecorator(Hud)
            {
                BackgroundBrush = grounLabelBackgroundBrush,
                BorderBrush     = Hud.Render.CreateBrush(255, 182, 26, 255, 1),
                TextFont        = Hud.Render.CreateFont("tahoma", 6f, 255, 182, 26, 255, false, false, 128, 0, 0, 0, true),
            }
                                     ));

            FemalePlayer1 = false;
            FemalePlayer2 = false;
            FemalePlayer3 = false;
        }