public void PaintTopInGame(ClipState clipState)
        {
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            var DeadBody = Hud.Game.Actors.Where(d => d.SnoActor.Sno == ActorSnoEnum._p6_necro_corpse_flesh && d.IsOnScreen);
            int Count    = 0;
            var uiRect   = Hud.Render.GetUiElement("Root.NormalLayer.game_dialog_backgroundScreenPC.game_progressBar_manaBall").Rectangle;
            var w        = uiRect.Width / 1.6f;
            var h        = uiRect.Height * 0.15f;
            var x        = uiRect.Left + w * 0.28f;
            var y        = uiRect.Top - uiRect.Height * 0.17f;

            if (DeadBodyCount == true)
            {
                foreach (var actor in DeadBody)
                {
                    Count++;
                }
                if (Count > 0)
                {
                    switch (Hud.Game.Me.HeroClassDefinition.HeroClass)
                    {
                    case HeroClass.Necromancer:
                        DeadBodyCountDecorator.Paint(x, y, w, h, "Body:" + Count);
                        break;
                    }
                }
            }
        }
示例#2
0
        public void PaintTopInGame(ClipState clipState)
        {
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            var skill = Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == 454174 || x.SnoPower.Sno == 461650 || x.SnoPower.Sno == 460757 || x.SnoPower.Sno == 462239).FirstOrDefault();

            if (skill != null)
            {
                var DeadBody = Hud.Game.Actors.Where(d => d.SnoActor.Sno == 454066 && d.IsOnScreen);
                int Count    = 0;
                var uiRect   = Hud.Render.GetUiElement("Root.NormalLayer.game_dialog_backgroundScreenPC.game_progressBar_manaBall").Rectangle;
                var w        = uiRect.Width / 1.6f;
                var h        = uiRect.Height * 0.15f;
                var x        = uiRect.Left + w * 0.28f;
                var y        = uiRect.Top - uiRect.Height * 0.17f;
                if (DeadBodyCount == true)
                {
                    foreach (var actor in DeadBody)
                    {
                        Count++;
                    }
                    if (Count > 0)
                    {
                        switch (Hud.Game.Me.HeroClassDefinition.HeroClass)
                        {
                        case HeroClass.Necromancer:
                            DeadBodyCountDecorator.Paint(x, y, w, h, "尸骸:" + Count);
                            break;
                        }
                    }
                }
            }
        }
        public void PaintTopInGame(ClipState clipState)
        {
            if (clipState != ClipState.BeforeClip)
            {
                return;
            }
            var skill = Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == 454174 || x.SnoPower.Sno == 461650 || x.SnoPower.Sno == 460757 || x.SnoPower.Sno == 462239).FirstOrDefault();

            if (skill != null)
            {
                var DeadBody = Hud.Game.Actors.Where(d => d.SnoActor.Sno == ActorSnoEnum._p6_necro_corpse_flesh && d.IsOnScreen);
                int Count    = 0;
                var uiRect   = Hud.Render.GetUiElement("Root.NormalLayer.game_dialog_backgroundScreenPC.game_progressBar_manaBall").Rectangle;
                var w        = uiRect.Width / 3f;
                var h        = uiRect.Height * 0.15f;
                var x        = uiRect.Left + w;
                var y        = uiRect.Top - uiRect.Height * 0.17f;
                if (DeadBodyCount == true)
                {
                    foreach (var actor in DeadBody)
                    {
                        Count++;
                    }
                    if (Count > 0)
                    {
                        if (Count < 10)
                        {
                            DeadBodyCountDecorator.TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 175, 238, 238, true, false, false);
                        }
                        if (Count >= 10 && Count < 16)
                        {
                            DeadBodyCountDecorator.TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 0, true, false, false);
                        }
                        if (Count >= 16)
                        {
                            DeadBodyCountDecorator.TextFont = Hud.Render.CreateFont("tahoma", 8, 255, 255, 0, 0, true, false, false);
                        }
                        DeadBodyCountDecorator.TextFunc = () => Count.ToString();
                        DeadBodyCountDecorator.HintFunc = () => "尸体数量";
                        DeadBodyCountDecorator.Paint(x, y, w, h, HorizontalAlign.Center);
                    }
                }
            }
        }