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

            LootType = LootType.Blessed;

            if (Core.SE && Weight == 3.0)
            {
                Weight = 1.0;
            }

            int version = reader.ReadInt();

            switch (version)
            {
            case 2:
            {
                m_Crafter_Name = reader.ReadString();

                m_Crafter = reader.ReadMobile();

                m_Quality = (RunebookQuality)reader.ReadEncodedInt();

                goto case 1;
            }

            case 1:
            {
                m_Level = (SecureLevel)reader.ReadInt();
                goto case 0;
            }

            case 0:
            {
                int count = reader.ReadInt();

                m_Entries = new ArrayList(count);

                for (int i = 0; i < count; ++i)
                {
                    m_Entries.Add(new RunebookEntry(reader));
                }

                m_Description  = reader.ReadString();
                m_CurCharges   = reader.ReadInt();
                m_MaxCharges   = reader.ReadInt();
                m_DefaultIndex = reader.ReadInt();

                break;
            }
            }
        }
예제 #2
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			LootType = LootType.Blessed;

			if ( Weight == 0.0 )
				Weight = 3.0;

			int version = reader.ReadInt();

			switch ( version )
			{
				case 2:
				{
					m_Crafter = reader.ReadMobile();
					m_Quality = (RunebookQuality)reader.ReadShort();
					goto case 1;
				}
				case 1:
				{
					m_Level = (SecureLevel)reader.ReadInt();
					goto case 0;
				}
				case 0:
				{
					int count = reader.ReadInt();

					m_Entries = new ArrayList( count );

					for ( int i = 0; i < count; ++i )
						m_Entries.Add( new RunebookEntry( reader ) );

					m_Description = reader.ReadString();
					m_CurCharges = reader.ReadInt();
					m_MaxCharges = reader.ReadInt();
					m_DefaultIndex = reader.ReadInt();

					break;
				}
			}
		}