public void UpdateHealthBar( HealthBarColor color, bool enabled ) { if ( m_Deleted || m_Map == null ) return; Packet p = Packet.Acquire( new HealthBarStatus( this, color, enabled ) ); foreach ( GameClient state in m_Map.GetClientsInRange( m_Location ) ) { if ( state.Mobile.CanSee( this ) ) state.Send( p ); } Packet.Release( p ); }
public HealthBarStatus( Mobile m, HealthBarColor color, bool enabled ) : base(0x17) { this.EnsureCapacity( 12 ); m_Stream.Write( (int) m.Serial ); m_Stream.Write( (ushort) 1 ); m_Stream.Write( (ushort) color ); m_Stream.Write( (byte) ( enabled ? 1 : 0 ) ); }