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

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

                decorator.Paint(layer, null, NameOffsetZ != 0 ? player.FloorCoordinate.Offset(0, 0, NameOffsetZ) : player.FloorCoordinate, player.BattleTagAbovePortrait);
            }
        }
        public void PaintWorld(WorldLayer layer)
        {
            var alivePlayers = Hud.Game.Players
                               .Where(player => !player.IsMe && player.CoordinateKnown && !player.IsDeadSafeCheck);

            foreach (var player in alivePlayers)
            {
                if (!DecoratorByClass.TryGetValue(player.HeroClassDefinition.HeroClass, out var decorator))
                {
                    continue;
                }

                var coord = NameOffsetZ != 0
                    ? player.FloorCoordinate.Offset(0, 0, NameOffsetZ)
                    : player.FloorCoordinate;

                var text = player.BattleTagAbovePortrait;

                decorator.Paint(layer, null, coord, text);
            }
        }
        public void PaintWorld(WorldLayer layer)
        {
            var players = Hud.Game.Players.Where(player => !player.IsMe && player.CoordinateKnown && (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;
                }

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

                WorldDecoratorCollection decorator;
                if (!DecoratorByClass.TryGetValue(player.HeroClassDefinition.HeroClass, out 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;
                    }

                    float textureX, textureY;
                    Hud.Render.GetMinimapCoordinates(companion.FloorCoordinate.X, companion.FloorCoordinate.Y, out textureX, out textureY);
                    CompTexture.Draw(textureX - 11, textureY - 11, 22.3f, 24.1f, CompanionsHeadOpacity);
                }
            }
        }