Exemple #1
0
        public void PublicOverheadMessage( MessageType type, int hue, int number, AffixType affixType, string affix, string args, bool noLineOfSight )
        {
            if ( m_Map != null )
            {
                Packet p = null;

                IPooledEnumerable eable = m_Map.GetClientsInRange( m_Location );

                foreach ( NetState state in eable )
                {
                    if ( state.Mobile.CanSee( this ) && (noLineOfSight || state.Mobile.InLOS( this )) )
                    {
                        if ( p == null )
                            p = new MessageLocalizedAffix( m_Serial, Body, type, hue, 3, number, Name, affixType, affix, args );

                        state.Send( p );
                    }
                }

                eable.Free();
            }
        }
Exemple #2
0
            protected override void OnTick()
            {
                Party p = Party.Get( m_Mobile );

                if ( p == null )
                    return;

                m_Mobile.SendLocalizedMessage( 1005437 ); // You have rejoined the party.
                m_Mobile.Send( new PartyMemberList( p ) );

                Packet message = new MessageLocalizedAffix( Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008087, "", AffixType.Prepend | AffixType.System, m_Mobile.Name, "" );
                Packet attrs   = new MobileAttributesN( m_Mobile );

                foreach ( PartyMemberInfo mi in p.Members )
                {
                    Mobile m = mi.Mobile;

                    if ( m != m_Mobile )
                    {
                        m.Send( message );
                        m.Send( new MobileStatusCompact( m_Mobile.CanBeRenamedBy( m ), m_Mobile ) );
                        m.Send( attrs );
                        m_Mobile.Send( new MobileStatusCompact( m.CanBeRenamedBy( m_Mobile ), m ) );
                        m_Mobile.Send( new MobileAttributesN( m ) );
                    }
                }
            }