Example #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_SSum = reader.ReadMobile() as SSum;
            m_Fake = reader.ReadMobile() as BaseFakeMob;
            m_Type = (BellType)reader.ReadInt();

            if (m_SSum != null)
            {
                m_SSum.Delete();
            }
        }
Example #2
0
        public virtual void EndSummon(object state)
        {
            Mobile from = (Mobile)state;

            if (m_SSum != null && !m_SSum.Deleted)
            {
                from.SendMessage("The bell has already been rang, so be patient!");
            }
            else if (m_Fake != null && !m_Fake.Deleted)
            {
                from.SendMessage("This bell has been rung not to long ago, you must wait!");
            }
            else if (m_Summoning)
            {
                m_Summoning = false;

                Point3D loc = GetWorldLocation();

                loc.Z -= 16;

                Effects.SendLocationParticles(EffectItem.Create(loc, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0, 0, 2023, 0);
                Effects.PlaySound(loc, Map, 0x1FE);

                switch (m_Type)
                {
                case BellType.DarkIron: m_SSum = new SSum(BellType.DarkIron); break;

                case BellType.Wooden: m_SSum = new SSum(BellType.Wooden); break;

                case BellType.Blood: m_SSum = new SSum(BellType.Blood); break;

                case BellType.Beast: m_SSum = new SSum(BellType.Beast); break;

                case BellType.Noxious: m_SSum = new SSum(BellType.Noxious); break;
                }

                m_SSum.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo(loc)));;
                m_SSum.MoveToWorld(loc, Map);

                m_SSum.Bell    = this;
                m_SSum.AngryAt = from;
                m_SSum.BeginGiveWarning();
                m_SSum.BeginRemove(TimeSpan.FromSeconds(40.0));
            }
        }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_SSum = reader.ReadMobile() as SSum;
			m_Fake = reader.ReadMobile() as BaseFakeMob;
			m_Type = (BellType)reader.ReadInt();

			if ( m_SSum != null )
				m_SSum.Delete();
		}
		public virtual void EndSummon( object state )
		{
			Mobile from = (Mobile)state;

			if ( m_SSum != null && !m_SSum.Deleted )
			{
				from.SendMessage("The bell has already been rang, so be patient!" );
			}
			else if ( m_Fake != null && !m_Fake.Deleted )
			{
				from.SendMessage("This bell has been rung not to long ago, you must wait!" );
			}
			else if ( m_Summoning )
			{
				m_Summoning = false;

				Point3D loc = GetWorldLocation();

				loc.Z -= 16;

				Effects.SendLocationParticles( EffectItem.Create( loc, Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
				Effects.PlaySound( loc, Map, 0x1FE );

				switch ( m_Type )
				{
					case BellType.DarkIron: m_SSum = new SSum( BellType.DarkIron ); break;
					case BellType.Wooden: m_SSum = new SSum( BellType.Wooden ); break;
					case BellType.Blood: m_SSum = new SSum( BellType.Blood ); break;
					case BellType.Beast: m_SSum = new SSum( BellType.Beast ); break;
					case BellType.Noxious: m_SSum = new SSum( BellType.Noxious ); break;
				}

				m_SSum.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo( loc )));;
				m_SSum.MoveToWorld( loc, Map );

				m_SSum.Bell = this;
				m_SSum.AngryAt = from;
				m_SSum.BeginGiveWarning();
				m_SSum.BeginRemove( TimeSpan.FromSeconds( 40.0 ) );
			}
		}