Exemplo n.º 1
0
        public void Add( Mobile m )
        {
            PartyMemberInfo mi = this[m];

            if ( mi == null )
            {
                m_Members.Add( new PartyMemberInfo( m ) );
                m.Party = this;

                Packet memberList = new PartyMemberList( this );
                Packet attrs  = new MobileAttributesN( m );

                for ( int i = 0; i < m_Members.Count; ++i )
                {
                    Mobile f = ((PartyMemberInfo)m_Members[i]).Mobile;

                    f.Send( memberList );

                    if ( f != m )
                    {
                        f.Send( new MobileStatusCompact( m.CanBeRenamedBy( f ), m ) );
                        f.Send( attrs );
                        m.Send( new MobileStatusCompact( f.CanBeRenamedBy( m ), f ) );
                        m.Send( new MobileAttributesN( f ) );
                    }
                }
            }
        }
Exemplo n.º 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 ) );
                    }
                }
            }
Exemplo n.º 3
0
		public void Add( Mobile m )
		{
			PartyMemberInfo mi = this[m];

			if ( mi == null )
			{
				m_Members.Add( new PartyMemberInfo( m ) );
				m.Party = this;

				Packet memberList = new PartyMemberList( this );
				Packet attrs  = new MobileAttributesN( m );

				for ( int i = 0; i < m_Members.Count; ++i )
				{
					Mobile f = ((PartyMemberInfo)m_Members[i]).Mobile;

					f.Send( memberList );

					if (! f.HasGump( typeof( PartyRadarGump)))
					{
						PartyRadarGump pr = new PartyRadarGump( f, m );
						f.SendGump( pr ); // Custom Radar Gump

						GumpTimer gumpTimer = new GumpTimer( f, m );
						gumpTimer.Start();

						GumpTimer gumpTimerT = new GumpTimer( m, f );
						gumpTimerT.Start();
					}

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