public AckPartyLocations( Mobile from, Party party ) : base(0x01, ( ( party.Members.Count - 1 ) * 9 ) + 4) { foreach ( PartyMemberInfo pmi in party.Members ) { if ( pmi == null || pmi.Mobile == from ) continue; Mobile m = pmi.Mobile; if ( from.InUpdateRange( m ) && from.CanSee( m ) ) continue; m_Stream.Write( (int) m.Serial ); m_Stream.Write( (short) m.X ); m_Stream.Write( (short) m.Y ); m_Stream.Write( (byte) ( m.Map == null ? 0 : m.Map.MapID ) ); } m_Stream.Write( (int) 0 ); }
/// <summary> /// Overridable. Event invoked when <paramref name="from" /> wants to see this Mobile's stats. /// </summary> /// <param name="from"></param> public virtual void OnStatsQuery( Mobile from ) { if ( from.Map == this.Map && from.CanSee( this ) && from.InUpdateRange( this ) ) from.Send( new MobileStatus( from, this ) ); if ( from == this ) Send( new StatLockInfo( this ) ); IParty ip = m_Party as IParty; if ( ip != null ) ip.OnStatsQuery( from, this ); }
public void OnStatsQuery( Mobile beholder, Mobile beheld ) { if ( beholder != beheld && Contains( beholder ) && beholder.Map == beheld.Map && beholder.InUpdateRange( beheld ) ) { if ( !beholder.CanSee( beheld ) ) beholder.Send( new MobileStatusCompact( beheld.CanBeRenamedBy( beholder ), beheld ) ); beholder.Send( new MobileAttributesN( beheld ) ); } }
public bool CanInteractWith( Mobile from, bool ownerOnly ) { if ( !from.CanSee( this ) || !from.InUpdateRange( this ) || !from.CheckAlive() ) return false; if ( ownerOnly ) return IsOwner( from ); if ( House != null && House.IsBanned( from ) && !IsOwner( from ) ) { from.SendLocalizedMessage( 1062674 ); // You can't shop from this home as you have been banned from this establishment. return false; } return true; }