Beispiel #1
0
        private void TalRashaElements(IPlayer me)
        {
            RashaBackgroundBrush.DrawRectangle((HudWidth * 0.5f - _lRashaSize * .5f) - _lRashaSize * 1.6f, HudHeight * RashaIndicatorsYpos - _lRashaSize * 0.1f, _lRashaSize * 4.1f, _lRashaSize * 1.1f);

            if (me.Powers.BuffIsActive(429855, 1))
            {
                ArcaneBrush.DrawRectangle((HudWidth * 0.5f - _lRashaSize * .5f) - _lRashaSize * 1.5f, HudHeight * RashaIndicatorsYpos, _lRashaSize * _lRashaSizeMod, _lRashaSize * _lRashaSizeMod);
            }
            else
            {
                DrawGreyBrush(-_lRashaSize * 1.5f);
            }

            if (me.Powers.BuffIsActive(429855, 2))
            {
                ColdBrush.DrawRectangle((HudWidth * 0.5f - _lRashaSize * .5f) - _lRashaSize / 2, HudHeight * RashaIndicatorsYpos, _lRashaSize * _lRashaSizeMod, _lRashaSize * _lRashaSizeMod);
            }
            else
            {
                DrawGreyBrush(-_lRashaSize / 2);
            }

            if (me.Powers.BuffIsActive(429855, 3))
            {
                FireBrush.DrawRectangle((HudWidth * 0.5f - _lRashaSize * .5f) + _lRashaSize / 2, HudHeight * RashaIndicatorsYpos, _lRashaSize * _lRashaSizeMod, _lRashaSize * _lRashaSizeMod);
            }
            else
            {
                DrawGreyBrush(_lRashaSize / 2);
            }

            if (me.Powers.BuffIsActive(429855, 4))
            {
                LightningBrush.DrawRectangle((HudWidth * 0.5f - _lRashaSize * .5f) + _lRashaSize * 1.5f, HudHeight * RashaIndicatorsYpos, _lRashaSize * _lRashaSizeMod, _lRashaSize * _lRashaSizeMod);
            }
            else
            {
                DrawGreyBrush(_lRashaSize * 1.5f);
            }
        }
        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 (player == null)
                {
                    continue;
                }
                var ScreenWidth      = Hud.Window.Size.Width;
                var ScreenHeight     = Hud.Window.Size.Height;
                var HeroTexture      = Hud.Texture.GetTexture(890155253);
                var HPbarWidth       = (float)(ScreenWidth / 13);
                var HPbarHeight      = (float)(ScreenHeight / 130);
                var ResbarWidth      = (float)(ScreenWidth / 13);
                var ResbarHeight     = (float)(ScreenHeight / 200);
                var CurRes           = 0f;
                var CurRes2          = 0f;
                var ScreenCoordinate = player.FloorCoordinate.ToScreenCoordinate();
                var PlayerX          = ScreenCoordinate.X;
                var PlayerY          = ScreenCoordinate.Y;
                if (HPbar == true)
                {
                    var CurHealth = player.Defense.HealthCur / player.Defense.HealthMax;
                    BorderBrush.DrawRectangle(PlayerX - (float)HPbarWidth / 2, PlayerY - (float)(ScreenHeight / 16) / 2, HPbarWidth, HPbarHeight);
                    BackgroundBrush.DrawRectangle(PlayerX - (float)HPbarWidth / 2, PlayerY - (float)(ScreenHeight / 16) / 2, HPbarWidth, HPbarHeight);
                    HPbarBrush.DrawRectangle(PlayerX - (float)HPbarWidth / 2, PlayerY - (float)(ScreenHeight / 16) / 2, HPbarWidth * CurHealth, HPbarHeight);
                }

                if (player.HeroClassDefinition.HeroClass.ToString() == "Barbarian")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurFury / player.Stats.ResourceMaxFury;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        FuryBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }

                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3921484788);                    // male/female can't be determined, let's keep it for later...
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(1030273087);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Crusader")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurWrath / player.Stats.ResourceMaxWrath;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        WrathBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3742271755);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(3435775766);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "DemonHunter")
                {
                    if (Resbar == true)
                    {
                        CurRes  = player.Stats.ResourceCurHatred / player.Stats.ResourceMaxHatred;
                        CurRes2 = player.Stats.ResourceCurDiscipline / player.Stats.ResourceMaxDiscipline;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        HatreBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 40) / 1.45f, ResbarWidth, ResbarHeight);
                        DisciplineBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 40) / 1.45f, ResbarWidth * CurRes2, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3785199803);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(2939779782);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Monk")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurSpirit / player.Stats.ResourceMaxSpirit;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        SpiritBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(2227317895);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(2918463890);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Necromancer")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurEssence / player.Stats.ResourceMaxEssence;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        EssenceBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3285997023);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(473831658);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "WitchDoctor")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurMana / player.Stats.ResourceMaxMana;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        ManaBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(3925954876);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(1603231623);
                    }
                }
                else if (player.HeroClassDefinition.HeroClass.ToString() == "Wizard")
                {
                    if (Resbar == true)
                    {
                        CurRes = player.Stats.ResourceCurArcane / player.Stats.ResourceMaxArcane;
                        BackgroundBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth, ResbarHeight);
                        ArcaneBrush.DrawRectangle(PlayerX - (float)ResbarWidth / 2, PlayerY - (float)(ScreenHeight / 28) / 1.6f, ResbarWidth * CurRes, ResbarHeight);
                    }
                    if (player.HeroIsMale)
                    {
                        HeroTexture = Hud.Texture.GetTexture(44435619);
                    }
                    else
                    {
                        HeroTexture = Hud.Texture.GetTexture(876580014);
                    }
                }

                if (Tag == true)
                {
                    string battleTag = player.BattleTagAbovePortrait;
                    if (battleTag == null)
                    {
                        continue;
                    }
                    TagDecorator.TextFunc = () => battleTag.ToString();
                    var BattleTagTexture = Hud.Texture.GetTexture(3098562643);
                    BattleTagTexture.Draw(PlayerX - (float)(ScreenWidth / 10) / 2, PlayerY - (float)(ScreenHeight / 7.8f) / 2, (float)(ScreenWidth / 10), (float)(ScreenHeight / 28), 0.7843f);
                    HeroTexture.Draw(PlayerX - (float)(Hud.Window.Size.Height / 31) / 2, PlayerY - (float)(ScreenHeight / 6.1f) / 2, (float)(ScreenHeight / 31), (float)(Hud.Window.Size.Height / 31), 1f);
                    TagDecorator.Paint(PlayerX - (float)(ScreenWidth / 11.5) / 2, PlayerY - (float)(ScreenHeight / 9.23f) / 2, (float)(ScreenWidth / 11.5), (float)(ScreenHeight / 45), HorizontalAlign.Center);
                }
            }
        }