public lookGump( Mobile m, Mobile target ) : base(100, 100) { AddPage( 0 ); AddBackground( 0, 0, Width, Height, 0xDAC ); AddPage( 1 ); AddHtml(0, 10, Width, 25, "<CENTER>" + "Observing " + target.GetNameUseBy(m), false, false); AddHtml( 20, 30, Width-40, Height-50, target.Profile, true, true ); }
public void OnDecline( Mobile from, Mobile leader ) { // : Does not wish to join the party. leader.SendLocalizedMessage( 1008091, false, from.GetNameUseBy(leader) ); from.SendLocalizedMessage( 1008092 ); // You notify them that you do not wish to join the party. m_Candidates.Remove( from ); from.Send( new PartyEmptyList( from ) ); if ( m_Candidates.Count == 0 && m_Members.Count <= 1 ) { for ( int i = 0; i < m_Members.Count; ++i ) { this[i].Mobile.Send( new PartyEmptyList( this[i].Mobile ) ); this[i].Mobile.Party = null; } m_Members.Clear(); } }
public MobileStatusCompact(bool canBeRenamed, Mobile m, Mobile beholder) : base(0x11) { //string name = m.Name; //string oldname = name; string name = m.GetNameUseBy(beholder); //string name = "co jest grane???"; if (name == null) name = ""; //if ( name == null ) name = ""; //string name = m.Name; //if ( name == null ) name = ""; this.EnsureCapacity( 43 ); m_Stream.Write( (int) m.Serial ); m_Stream.WriteAsciiFixed( name, 30 ); AttributeNormalizer.WriteReverse( m_Stream, m.Hits, m.HitsMax ); m_Stream.Write( canBeRenamed ); m_Stream.Write( (byte) 0 ); // type }
public MobileStatus( Mobile beholder, Mobile beheld, NetState ns ) : base(0x11) { //string name = beheld.Name; string name = beheld.GetNameUseBy(beholder); if ( name == null ) name = ""; bool sendMLExtended = (Core.ML && ns != null && ns.SupportsExpansion( Expansion.ML )); this.EnsureCapacity( 43 + (beholder == beheld ? (sendMLExtended ? 48 : 45) : 0) ); m_Stream.Write( beheld.Serial ); m_Stream.WriteAsciiFixed( name, 30 ); if ( beholder == beheld ) WriteAttr( beheld.Hits, beheld.HitsMax ); else WriteAttrNorm( beheld.Hits, beheld.HitsMax ); m_Stream.Write( beheld.CanBeRenamedBy( beholder ) ); if ( beholder == beheld ) { m_Stream.Write( (byte)(sendMLExtended ? 0x05 : Core.AOS ? 0x04 : 0x03) ); // type m_Stream.Write( beheld.Female ); m_Stream.Write( (short) beheld.Str ); m_Stream.Write( (short) beheld.Dex ); m_Stream.Write( (short) beheld.Int ); WriteAttr( beheld.Stam, beheld.StamMax ); WriteAttr( beheld.Mana, beheld.ManaMax ); m_Stream.Write( (int) beheld.TotalGold ); m_Stream.Write( (short) (Core.AOS ? beheld.PhysicalResistance : (int)(beheld.ArmorRating + 0.5)) ); m_Stream.Write( (short) (Mobile.BodyWeight + beheld.TotalWeight) ); if( sendMLExtended ) { m_Stream.Write( (short)beheld.MaxWeight ); m_Stream.Write( (byte)(beheld.Race.RaceID + 1) ); // Would be 0x00 if it's a non-ML enabled account but... } m_Stream.Write( (short) beheld.StatCap ); m_Stream.Write( (byte) beheld.Followers ); m_Stream.Write( (byte) beheld.FollowersMax ); if ( Core.AOS ) { m_Stream.Write( (short) beheld.FireResistance ); // Fire m_Stream.Write( (short) beheld.ColdResistance ); // Cold m_Stream.Write( (short) beheld.PoisonResistance ); // Poison m_Stream.Write( (short) beheld.EnergyResistance ); // Energy m_Stream.Write( (short) beheld.Luck ); // Luck IWeapon weapon = beheld.Weapon; int min = 0, max = 0; if ( weapon != null ) weapon.GetStatusDamage( beheld, out min, out max ); m_Stream.Write( (short) min ); // Damage min m_Stream.Write( (short) max ); // Damage max m_Stream.Write( (int) beheld.TithingPoints ); } } else { m_Stream.Write( (byte) 0x00 ); } }
public MobileName( Mobile m, Mobile from ) : base(0x98) { /*string name = m.Name; if (m is PlayerMobile) if (m.Female) { name = "Female"; } else { name = "Male"; }*/ string name = m.GetNameUseBy(from); if ( name == null ) name = ""; this.EnsureCapacity( 37 ); m_Stream.Write( (int) m.Serial ); m_Stream.WriteAsciiFixed( name, 30 ); }
public DisplaySecureTrade( Mobile them, Container first, Container second, string name, Mobile from ) : base(0x6F) { name = them.GetNameUseBy(from); if ( name == null ) name = ""; EnsureCapacity( 18 + name.Length ); m_Stream.Write( (byte) 0 ); // Display m_Stream.Write( (int) them.Serial ); m_Stream.Write( (int) first.Serial ); m_Stream.Write( (int) second.Serial ); m_Stream.Write( (bool) true ); m_Stream.WriteAsciiFixed( name, 30 ); }