Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
 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();
     }
 }