public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 2:                     //Glacial Staff
            {
                m_GlacialSpells = (GlacialSpells)reader.ReadEncodedInt();
                goto case 0;
            }

            case 1:                     //Ice Staff
            {
                SetFlag(GlacialSpells.IceStrike, reader.ReadBool());
                SetFlag(GlacialSpells.IceBall, reader.ReadBool());
                SetFlag(GlacialSpells.Freeze, reader.ReadBool());

                goto case 0;
            }

            case 0:
            {
                if (version < 2)
                {
                    reader.ReadInt();                             //Staff Effect
                }
                m_UsesRemaining = reader.ReadInt();
                break;
            }
            }
        }
示例#2
0
		public void SetFlag( GlacialSpells flag, bool value )
		{
			if ( value )
				m_GlacialSpells |= flag;
			else
				m_GlacialSpells &= ~flag;
		}
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            Mobile from = e.Mobile;

            if (from == Parent && m_UsesRemaining > 0)
            {
                if (GetFlag(GlacialSpells.Freeze) && e.Speech.ToLower().IndexOf("an ex del") > -1)
                {
                    m_CurrentSpell = GlacialSpells.Freeze;
                    from.NetState.Send(new PlaySound(0xF6, from.Location));
                }
                else if (GetFlag(GlacialSpells.IceStrike) && e.Speech.ToLower().IndexOf("in corp del") > -1)
                {
                    m_CurrentSpell = GlacialSpells.IceStrike;
                    from.NetState.Send(new PlaySound(0xF7, from.Location));
                }
                else if (GetFlag(GlacialSpells.IceBall) && e.Speech.ToLower().IndexOf("des corp del") > -1)
                {
                    m_CurrentSpell = GlacialSpells.IceBall;
                    from.NetState.Send(new PlaySound(0xF8, from.Location));
                }
            }
        }
        public GlacialStaff(int usesremaining) : base()
        {
            ItemID = 0xDF1;
            Hue    = 0x480;
            Weight = 3.0;

            UsesRemaining = usesremaining;

            m_GlacialSpells = GetRandomSpells();
        }
 public void SetFlag(GlacialSpells flag, bool value)
 {
     if (value)
     {
         m_GlacialSpells |= flag;
     }
     else
     {
         m_GlacialSpells &= ~flag;
     }
 }
        public GlacialStaff(int usesremaining) : base()
        {
            Hue = 0x480;
            WeaponAttributes.HitHarm    = 5 * Utility.RandomMinMax(1, 5);
            WeaponAttributes.MageWeapon = Utility.RandomMinMax(5, 10);

            AosElementDamages[AosElementAttribute.Cold] = 20 + (5 * Utility.RandomMinMax(0, 6));
            UsesRemaining = usesremaining;

            m_GlacialSpells = GetRandomSpells();
        }
        public GlacialStaff( int usesremaining )
            : base()
        {
            Hue = 0x480;
            WeaponAttributes.HitHarm = 5 * Utility.RandomMinMax( 1, 5 );
            WeaponAttributes.MageWeapon = Utility.RandomMinMax( 5, 10 );

            AosElementDamages[AosElementAttribute.Cold] = 20 + (5 * Utility.RandomMinMax( 0, 6 ));
            UsesRemaining = usesremaining;

            m_GlacialSpells = GetRandomSpells();
        }
示例#8
0
        public GlacialStaff(int usesremaining) : base()
        {
            Identified = true;
            Hue        = 0x480;
            //
            //

            //AosElementDamages[AosElementAttribute.Cold] = 20 + (5 * Utility.RandomMinMax( 0, 6 ));
            UsesRemaining = usesremaining;

            m_GlacialSpells = GetRandomSpells();
        }
示例#9
0
		public GlacialStaff( int usesremaining ) : base()
		{
			Identified = true;
			Hue = 0x480;
			//
			//

			//AosElementDamages[AosElementAttribute.Cold] = 20 + (5 * Utility.RandomMinMax( 0, 6 ));
			UsesRemaining = usesremaining;

			m_GlacialSpells = GetRandomSpells();
		}
示例#10
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 0:
            {
                m_GlacialSpells = (GlacialSpells)reader.ReadEncodedInt();
                m_UsesRemaining = reader.ReadInt();
                break;
            }
            }
        }
 public bool GetFlag(GlacialSpells flag)
 {
     return((m_GlacialSpells & flag) != 0);
 }
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            Mobile from = e.Mobile;

            List <Mobile> list = new List <Mobile>();

            if (from == Parent && m_UsesRemaining > 0)
            {
                if (GetFlag(GlacialSpells.Freeze) && e.Speech.ToLower() == "an ex del")
                {
                    foreach (Mobile m in this.GetMobilesInRange(10))
                    {
                        if (m.Player)
                        {
                            list.Add(m);
                        }
                    }

                    foreach (Mobile m in list)
                    {
                        m.NetState.Send(new PlaySound(0xF6, from.Location));
                    }
                    m_DisplaySpells |= (m_CurrentSpell = GlacialSpells.Freeze);
                    InvalidateProperties();
                }
                else if (GetFlag(GlacialSpells.IceStrike) && e.Speech.ToLower() == "in corp del")
                {
                    foreach (Mobile m in this.GetMobilesInRange(10))
                    {
                        if (m.Player)
                        {
                            list.Add(m);
                        }
                    }

                    foreach (Mobile m in list)
                    {
                        m.NetState.Send(new PlaySound(0xF7, from.Location));
                    }
                    m_DisplaySpells |= (m_CurrentSpell = GlacialSpells.IceStrike);
                    InvalidateProperties();
                }
                else if (GetFlag(GlacialSpells.IceBall) && e.Speech.ToLower() == "des corp del")
                {
                    foreach (Mobile m in this.GetMobilesInRange(10))
                    {
                        if (m.Player)
                        {
                            list.Add(m);
                        }
                    }

                    foreach (Mobile m in list)
                    {
                        m.NetState.Send(new PlaySound(0xF8, from.Location));
                    }
                    m_DisplaySpells |= (m_CurrentSpell = GlacialSpells.IceBall);
                    InvalidateProperties();
                }
            }
        }
        public override void OnSpeech( SpeechEventArgs e )
        {
            base.OnSpeech( e );

            Mobile from = e.Mobile;

            if ( from == Parent && m_UsesRemaining > 0 )
            {
                if ( GetFlag( GlacialSpells.Freeze ) && e.Speech.ToLower().IndexOf( "an ex del" ) > -1 )
                {
                    m_CurrentSpell = GlacialSpells.Freeze;
                    from.NetState.Send( new PlaySound( 0xF6, from.Location ) );
                }
                else if ( GetFlag( GlacialSpells.IceStrike ) && e.Speech.ToLower().IndexOf( "in corp del" ) > -1 )
                {
                    m_CurrentSpell = GlacialSpells.IceStrike;
                    from.NetState.Send( new PlaySound( 0xF7, from.Location ) );
                }
                else if ( GetFlag( GlacialSpells.IceBall ) && e.Speech.ToLower().IndexOf( "des corp del" ) > -1 )
                {
                    m_CurrentSpell = GlacialSpells.IceBall;
                    from.NetState.Send( new PlaySound( 0xF8, from.Location ) );
                }
            }
        }
 public bool GetFlag( GlacialSpells flag )
 {
     return ( (m_GlacialSpells & flag) != 0 );
 }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_GlacialSpells = (GlacialSpells)reader.ReadEncodedInt();
                    m_UsesRemaining = reader.ReadInt();
                    break;
                }
            }
        }