コード例 #1
0
ファイル: GPartyHealthBar.cs プロジェクト: uotools/PlayUO
 public void OnFlagsChange(MobileFlags flags)
 {
     if (this.m_Mobile.Visible)
     {
         this.m_Name.Hue = Hues.GetNotoriety(this.m_Mobile.Notoriety);
     }
     else
     {
         this.m_Name.Hue = Hues.Grayscale;
     }
 }
コード例 #2
0
ファイル: GHealthBar.cs プロジェクト: uotools/PlayUO
 private int GetHealthGumpID(MobileFlags flags)
 {
     if (flags[MobileFlag.Poisoned])
     {
         return(0x808);
     }
     if (flags[MobileFlag.YellowHits])
     {
         return(0x809);
     }
     return(0x806);
 }
コード例 #3
0
ファイル: GHealthBar.cs プロジェクト: Skinny1001/PlayUO
 public GHealthBar(Mobile m, int X, int Y)
     : base(m.Player ? (m.Flags[MobileFlag.Warmode] ? 0x807 : 0x803) : 0x804, X, Y)
 {
     this.m_xName = "";
     this.m_Mobile = m;
     base.m_CanDrop = true;
     base.m_QuickDrag = false;
     this.m_Player = m.Player;
     if (!this.m_Player)
     {
         base.Hue = Hues.GetNotoriety(m.Notoriety);
     }
     if (Engine.Features.AOS)
     {
         base.Tooltip = new MobileTooltip(m);
     }
     if (this.m_Player)
     {
         this.m_HP = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 12, m.HPCur, m.HPMax);
         this.m_Mana = new GImageClip(0x806, 0x22, 0x19, m.ManaCur, m.ManaMax);
         this.m_Stam = new GImageClip(0x806, 0x22, 0x26, m.StamCur, m.StamMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 12));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x19));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_HP);
         base.m_Children.Add(this.m_Mana);
         base.m_Children.Add(this.m_Stam);
         this.m_xHPCur = m.HPCur;
         this.m_xHPMax = m.HPMax;
         this.m_xStamCur = m.StamCur;
         this.m_xStamMax = m.StamMax;
         this.m_xManaCur = m.ManaCur;
         this.m_xManaMax = m.ManaMax;
         this.m_xFlags = m.Flags.Clone();
     }
     else
     {
         this.m_Name = new GLabel(m.Name, Engine.GetFont(1), Hues.Load(0x455), 0x10, 0);
         this.m_Name.Y = 11 + ((0x18 - this.m_Name.Height) / 2);
         this.m_Name.Scissor(0, 0, 0x7a, this.m_Name.Height);
         this.m_HP = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 0x26, m.HPCur, m.HPMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_Name);
         base.m_Children.Add(this.m_HP);
         this.m_xName = m.Name;
         this.m_xHPCur = m.HPCur;
         this.m_xHPMax = m.HPMax;
         this.m_xFlags = m.Flags.Clone();
     }
 }
コード例 #4
0
ファイル: GHealthBar.cs プロジェクト: uotools/PlayUO
 public GHealthBar(Mobile m, int X, int Y) : base(m.Player ? (m.Flags[MobileFlag.Warmode] ? 0x807 : 0x803) : 0x804, X, Y)
 {
     this.m_xName     = "";
     this.m_Mobile    = m;
     base.m_CanDrop   = true;
     base.m_QuickDrag = false;
     this.m_Player    = m.Player;
     if (!this.m_Player)
     {
         base.Hue = Hues.GetNotoriety(m.Notoriety);
     }
     if (Engine.Features.AOS)
     {
         base.Tooltip = new MobileTooltip(m);
     }
     if (this.m_Player)
     {
         this.m_HP   = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 12, m.HPCur, m.HPMax);
         this.m_Mana = new GImageClip(0x806, 0x22, 0x19, m.ManaCur, m.ManaMax);
         this.m_Stam = new GImageClip(0x806, 0x22, 0x26, m.StamCur, m.StamMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 12));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x19));
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_HP);
         base.m_Children.Add(this.m_Mana);
         base.m_Children.Add(this.m_Stam);
         this.m_xHPCur   = m.HPCur;
         this.m_xHPMax   = m.HPMax;
         this.m_xStamCur = m.StamCur;
         this.m_xStamMax = m.StamMax;
         this.m_xManaCur = m.ManaCur;
         this.m_xManaMax = m.ManaMax;
         this.m_xFlags   = m.Flags.Clone();
     }
     else
     {
         this.m_Name   = new GLabel(m.Name, Engine.GetFont(1), Hues.Load(0x455), 0x10, 0);
         this.m_Name.Y = 11 + ((0x18 - this.m_Name.Height) / 2);
         this.m_Name.Scissor(0, 0, 0x7a, this.m_Name.Height);
         this.m_HP = new GImageClip(this.GetHealthGumpID(m.Flags), 0x22, 0x26, m.HPCur, m.HPMax);
         base.m_Children.Add(new GImage(0x805, 0x22, 0x26));
         base.m_Children.Add(this.m_Name);
         base.m_Children.Add(this.m_HP);
         this.m_xName  = m.Name;
         this.m_xHPCur = m.HPCur;
         this.m_xHPMax = m.HPMax;
         this.m_xFlags = m.Flags.Clone();
     }
 }
コード例 #5
0
ファイル: GHealthBar.cs プロジェクト: uotools/PlayUO
 public void OnFlagsChange(MobileFlags Flags)
 {
     if ((this.m_xFlags == null) || (this.m_xFlags.Value != Flags.Value))
     {
         if (this.m_Player && ((this.m_xFlags == null) || (this.m_xFlags[MobileFlag.Warmode] != Flags[MobileFlag.Warmode])))
         {
             base.GumpID = Flags[MobileFlag.Warmode] ? 0x807 : 0x803;
         }
         if (((this.m_xFlags == null) || (this.m_xFlags[MobileFlag.Poisoned] != Flags[MobileFlag.Poisoned])) || (this.m_xFlags[MobileFlag.YellowHits] != Flags[MobileFlag.YellowHits]))
         {
             this.m_HP.GumpID = this.GetHealthGumpID(Flags);
         }
         this.m_xFlags = Flags.Clone();
     }
 }
コード例 #6
0
ファイル: Mobile.cs プロジェクト: uotools/PlayUO
 private void InternalOnFlagsChanged(MobileFlags flags)
 {
     if (!this.m_Refresh && (this.m_StatusBar != null))
     {
         this.m_StatusBar.OnFlagsChange(flags);
     }
     this.m_Flags = flags;
     if ((this.m_Flags.Value & -223) != 0)
     {
         this.Trace();
         string message = string.Format("Unknown mobile flags: 0x{0:X2}", this.m_Flags.Value);
         Debug.Error(message);
         Engine.AddTextMessage(message);
     }
     if (this.m_Player && ((this.m_Flags.Value & 0x80) == 0))
     {
         Engine.m_Stealth      = false;
         Engine.m_StealthSteps = 0;
     }
 }
コード例 #7
0
ファイル: Mobile.cs プロジェクト: Skinny1001/PlayUO
 private void InternalOnFlagsChanged(MobileFlags flags)
 {
     if (!this.m_Refresh && (this.m_StatusBar != null))
     {
         this.m_StatusBar.OnFlagsChange(flags);
     }
     this.m_Flags = flags;
     if ((this.m_Flags.Value & -223) != 0)
     {
         this.Trace();
         string message = string.Format("Unknown mobile flags: 0x{0:X2}", this.m_Flags.Value);
         Debug.Error(message);
         Engine.AddTextMessage(message);
     }
     if (this.m_Player && ((this.m_Flags.Value & 0x80) == 0))
     {
         Engine.m_Stealth = false;
         Engine.m_StealthSteps = 0;
     }
 }
コード例 #8
0
ファイル: Mobile.cs プロジェクト: Skinny1001/PlayUO
 public Mobile(int serial)
 {
     this.m_Flags = new MobileFlags(this);
     this.m_Walking = new Queue(0);
     this.m_Serial = serial;
 }
コード例 #9
0
ファイル: GPartyHealthBar.cs プロジェクト: Skinny1001/PlayUO
 public void OnFlagsChange(MobileFlags flags)
 {
     if (this.m_Mobile.Visible)
     {
         this.m_Name.Hue = Hues.GetNotoriety(this.m_Mobile.Notoriety);
     }
     else
     {
         this.m_Name.Hue = Hues.Grayscale;
     }
 }
コード例 #10
0
ファイル: Mobile.cs プロジェクト: uotools/PlayUO
 public Mobile(int serial)
 {
     this.m_Flags   = new MobileFlags(this);
     this.m_Walking = new Queue(0);
     this.m_Serial  = serial;
 }
コード例 #11
0
 public void OnFlagsChange(MobileFlags flags)
 {
 }
コード例 #12
0
ファイル: GPartyHealthBar.cs プロジェクト: uotools/PlayUO
        protected internal override void Draw(int x, int y)
        {
            Renderer.SetTexture(null);
            Renderer.AlphaTestEnable = false;
            Renderer.SetAlphaEnable(true);
            Renderer.SetAlpha(0.4f);
            Renderer.SolidRect(0, x + 1, y + 1, this.m_Width - 2, this.m_Height - 2);
            Renderer.SetAlphaEnable(false);
            Renderer.TransparentRect(0, x, y, this.m_Width, this.m_Height);
            y += this.m_Height;
            y -= 0x13;
            Renderer.SolidRect(0, x, y, this.m_Width, 0x13);
            x++;
            y++;
            int width = this.m_Width - 2;

            if (this.m_Mobile.Ghost)
            {
                Renderer.GradientRect(0xc0c0c0, 0x606060, x, y, width, 5);
                y += 6;
                Renderer.GradientRect(0xc0c0c0, 0x606060, x, y, width, 5);
                y += 6;
                Renderer.GradientRect(0xc0c0c0, 0x606060, x, y, width, 5);
            }
            else
            {
                int         num2;
                int         num3;
                MobileFlags flags = this.m_Mobile.Flags;
                if (flags[MobileFlag.Poisoned])
                {
                    num2 = 0xff00;
                    num3 = 0x8000;
                }
                else if (flags[MobileFlag.YellowHits])
                {
                    num2 = 0xffc000;
                    num3 = 0x806000;
                }
                else
                {
                    num2 = 0x20c0ff;
                    num3 = 0x106080;
                }
                int num4 = (this.m_Mobile.HPCur * width) / Math.Max(1, this.m_Mobile.HPMax);
                if (num4 > width)
                {
                    num4 = width;
                }
                else if (num4 < 0)
                {
                    num4 = 0;
                }
                Renderer.GradientRect(num2, num3, x, y, num4, 5);
                Renderer.GradientRect(0xff0000, 0x800000, x + num4, y, width - num4, 5);
                y   += 6;
                num4 = (this.m_Mobile.ManaCur * width) / Math.Max(1, this.m_Mobile.ManaMax);
                if (num4 > width)
                {
                    num4 = width;
                }
                else if (num4 < 0)
                {
                    num4 = 0;
                }
                Renderer.GradientRect(0x20c0ff, 0x106080, x, y, num4, 5);
                Renderer.GradientRect(0xff0000, 0x800000, x + num4, y, width - num4, 5);
                y   += 6;
                num4 = (this.m_Mobile.StamCur * width) / Math.Max(1, this.m_Mobile.StamMax);
                if (num4 > width)
                {
                    num4 = width;
                }
                else if (num4 < 0)
                {
                    num4 = 0;
                }
                Renderer.GradientRect(0x20c0ff, 0x106080, x, y, num4, 5);
                Renderer.GradientRect(0xff0000, 0x800000, x + num4, y, width - num4, 5);
            }
            Renderer.AlphaTestEnable = true;
        }
コード例 #13
0
ファイル: GStatusBar.cs プロジェクト: Skinny1001/PlayUO
 public void OnFlagsChange(MobileFlags flags)
 {
 }
コード例 #14
0
ファイル: GHealthBar.cs プロジェクト: Skinny1001/PlayUO
 private int GetHealthGumpID(MobileFlags flags)
 {
     if (flags[MobileFlag.Poisoned])
     {
         return 0x808;
     }
     if (flags[MobileFlag.YellowHits])
     {
         return 0x809;
     }
     return 0x806;
 }
コード例 #15
0
ファイル: GHealthBar.cs プロジェクト: Skinny1001/PlayUO
 public void OnFlagsChange(MobileFlags Flags)
 {
     if ((this.m_xFlags == null) || (this.m_xFlags.Value != Flags.Value))
     {
         if (this.m_Player && ((this.m_xFlags == null) || (this.m_xFlags[MobileFlag.Warmode] != Flags[MobileFlag.Warmode])))
         {
             base.GumpID = Flags[MobileFlag.Warmode] ? 0x807 : 0x803;
         }
         if (((this.m_xFlags == null) || (this.m_xFlags[MobileFlag.Poisoned] != Flags[MobileFlag.Poisoned])) || (this.m_xFlags[MobileFlag.YellowHits] != Flags[MobileFlag.YellowHits]))
         {
             this.m_HP.GumpID = this.GetHealthGumpID(Flags);
         }
         this.m_xFlags = Flags.Clone();
     }
 }