Ejemplo n.º 1
2
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadByte();

			if ( version == 0 )
			{
				Timer.DelayCall( TimeSpan.Zero, delegate()
				{
					for ( int i = 0; i < Components.Count; ++i )
					{
						AddonComponent ac = Components[i] as AddonComponent;

						if ( ac != null && ac.Hue == 2118 )
							ac.Hue = 1161;
					}
				} );
			}

			if ( version <= 1 )
			{
				Timer.DelayCall( TimeSpan.Zero, delegate()
				{
					for ( int i = 0; i < Components.Count; ++i )
					{
						AddonComponent ac = Components[i] as AddonComponent;

						if ( ac != null )
							ac.Name = "jack-o-lantern";
					}
				} );
			}
		}
Ejemplo n.º 2
2
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Boat = reader.ReadItem() as BaseBoat;
					m_Side = (PlankSide) reader.ReadInt();
					m_Locked = reader.ReadBool();
					m_KeyValue = reader.ReadUInt();

					if ( m_Boat == null )
						Delete();

					break;
				}
			}

			if ( IsOpen )
			{
				m_CloseTimer = new CloseTimer( this );
				m_CloseTimer.Start();
			}
		}
Ejemplo n.º 3
2
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			LootType = LootType.Blessed;

			int version = reader.ReadInt();
		}
Ejemplo n.º 4
1
        public VirtueInfo( GenericReader reader )
        {
            int version = reader.ReadByte();

            switch ( version )
            {
                case 1:	//Changed the values throughout the virtue system
                case 0:
                {
                    int mask = reader.ReadByte();

                    if ( mask != 0 )
                    {
                        m_Values = new int[8];

                        for ( int i = 0; i < 8; ++i )
                            if ( (mask & (1 << i)) != 0 )
                                m_Values[i] = reader.ReadInt();
                    }

                    break;
                }
            }

            if( version == 0 )
            {
                Compassion *= 200;
                Sacrifice *= 250;	//Even though 40 (the max) only gives 10k, It's because it was formerly too easy

                //No direct conversion factor for Justice, this is just an approximation
                Justice *= 500;

                //All the other virtues haven't been defined at 'version 0' point in time in the scripts.
            }
        }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			DynamicFurniture.Close( this );
		}
Ejemplo n.º 6
1
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 0:
                    {
                        m_Value = reader.ReadInt();

                        break;
                    }
            }

            if ( LootType != LootType.Cursed )
            {
                LootType = LootType.Cursed;
            }

            if ( Insured )
            {
                Insured = false;
            }
        }
Ejemplo n.º 7
1
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            int entryCount = reader.ReadInt();

            for (int i = 0; i < entryCount; i++)
                m_SystemEntries.Add(new SlayerSystemTracker(reader.ReadString(), reader.ReadInt(), reader.ReadString()));

            if (Owner is Mobile)
            {
                Mobile player = (Mobile)Owner;

                SlayerModule module = player.GetModule(typeof(SlayerModule)) as SlayerModule;

                if (module == null)
                    module = new SlayerModule(player);

                foreach (SlayerSystemTracker entry in m_SystemEntries)
                    module.SetSlayerCount(entry.SystemName, entry.SlayerCount);

                Delete();
            }
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            this.InitializeEvent();
        }
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();

            //ItemConversion.AddToRareConversion( this );
        }
Ejemplo n.º 10
1
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
            switch ( version )
            {
                case 1:
                {
                    string name = reader.ReadString();
                    if ( name != null && name.Length > 0 )
                    {
                        try
                        {
                            m_Contains = Type.GetType( name );
                        }
                        catch
                        {
                            m_Contains = null;
                        }
                    }
                    goto case 0;
                }
                case 0:
                {
                    break;
                }
            }
        }
Ejemplo n.º 11
1
 public override void Deserialize(GenericReader reader)
 {
     base.Deserialize(reader);
     int version = reader.ReadInt();
     m_CaughtBy = reader.ReadMobile();
     m_DateCaught = reader.ReadDateTime();
 }
Ejemplo n.º 12
1
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 2:
                    {
                        m_Charges = reader.ReadInt();
                        goto case 1;
                    }
                case 1:
				{
					m_SecureLevel = (SecureLevel)reader.ReadInt();
					goto case 0;
				}
				case 0:
				{
					m_Redyable = reader.ReadBool();
					m_DyedHue = reader.ReadInt();

					break;
				}
			}

            if (version < 2)
                m_Charges = 10;
		}
Ejemplo n.º 13
1
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();

            BankRestockAmount = 0x40000000;
        }
Ejemplo n.º 14
1
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			Light = LightType.Circle300;
		}
Ejemplo n.º 15
1
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 2:
                {
                    m_ShowUsesRemaining = reader.ReadBool();
                    goto case 1;
                }
                case 1:
                {
                    m_UsesRemaining = reader.ReadInt();
                    goto case 0;
                }
                case 0:
                {
                    if ( m_UsesRemaining < 1 )
                        m_UsesRemaining = 150;

                    break;
                }
            }
        }
Ejemplo n.º 16
1
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.GetVersion();

			switch (version)
			{
				case 1:
					reader.ReadBlock(r => Misc = r.ReadTypeCreate<AutoPvPMiscOptions>(r) ?? new AutoPvPMiscOptions(r));
					goto case 0;
				case 0:
					{
						if (version == 0)
						{
							Misc = new AutoPvPMiscOptions();
						}

						reader.ReadBlock(r => Commands = r.ReadTypeCreate<AutoPvPCommandOptions>(r) ?? new AutoPvPCommandOptions(r));
						reader.ReadBlock(r => Profiles = r.ReadTypeCreate<AutoPvPProfileOptions>(r) ?? new AutoPvPProfileOptions(r));
						reader.ReadBlock(r => Seasons = r.ReadTypeCreate<AutoPvPSeasonOptions>(r) ?? new AutoPvPSeasonOptions(r));
					}
					break;
			}
		}
Ejemplo n.º 17
1
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_Level = (SecureLevel)reader.ReadInt();
                    goto case 0;
                }
                case 0:
                {
                    if ( version < 1 )
                        m_Level = SecureLevel.Anyone;

                    m_Title = reader.ReadString();

                    if ( reader.ReadBool() )
                        m_Greeting = new PlayerBBMessage( reader );

                    int count = reader.ReadEncodedInt();

                    m_Messages = new List<PlayerBBMessage>( count );

                    for ( int i = 0; i < count; ++i )
                        m_Messages.Add( new PlayerBBMessage( reader ) );

                    break;
                }
            }
        }
Ejemplo n.º 18
1
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					if ( CheckType( "BottleAle" ) )
					{
						Quantity = MaxQuantity;
						Content = BeverageType.Ale;
					}
					else if ( CheckType( "BottleLiquor" ) )
					{
						Quantity = MaxQuantity;
						Content = BeverageType.Liquor;
					}
					else if ( CheckType( "BottleWine" ) )
					{
						Quantity = MaxQuantity;
						Content = BeverageType.Wine;
					}
					else
					{
						throw new Exception( World.LoadingType );
					}

					break;
				}
			}
		}
Ejemplo n.º 19
1
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            m_Resource = (CraftResource)reader.ReadEncodedInt();
        }
Ejemplo n.º 20
1
        public VendorInventory( BaseHouse house, GenericReader reader )
        {
            m_House = house;

            int version = reader.ReadEncodedInt();

            m_Owner = reader.ReadMobile();
            m_VendorName = reader.ReadString();
            m_ShopName = reader.ReadString();

            m_Items = reader.ReadStrongItemList();
            m_Gold = reader.ReadInt();

            m_ExpireTime = reader.ReadDeltaTime();

            if ( m_Items.Count == 0 && m_Gold == 0 )
            {
                Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
            }
            else
            {
                TimeSpan delay = m_ExpireTime - DateTime.UtcNow;
                m_ExpireTimer = new ExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
                m_ExpireTimer.Start();
            }
        }
Ejemplo n.º 21
1
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			i_Timer=new DBSTimer(this);
			i_Timer.Start();
		}
Ejemplo n.º 22
1
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_MultiID = reader.ReadInt();
					m_Offset = reader.ReadPoint3D();
					m_ShipName = reader.ReadString();

					if ( version == 0 )
						reader.ReadUInt();

					break;
				}
			}

			if ( LootType == LootType.Newbied )
				LootType = LootType.Blessed;

			if ( Weight == 0.0 )
				Weight = 1.0;
		}
Ejemplo n.º 23
1
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.GetVersion();

        }
Ejemplo n.º 24
0
        public DeathEntry( GenericReader reader )
        {
            int version = reader.ReadByte();

            m_Name = reader.ReadString();
            m_Deaths = reader.ReadInt();
        }
Ejemplo n.º 25
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
            m_portalID = reader.ReadInt();
        }
Ejemplo n.º 26
0
 public override void Deserialize( GenericReader reader ) 
 { 
    base.Deserialize( reader ); 
    int version = reader.ReadInt(); 
    DefSerUss = reader.ReadInt(); 
    DefSerTimeLimit = reader.ReadDateTime(); 
 } 
Ejemplo n.º 27
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                case 0:
                {
                    m_Type = (ChampionSkullType)reader.ReadInt();

                    break;
                }
            }

            if( version == 0 )
            {
                if ( LootType != LootType.Cursed )
                    LootType = LootType.Cursed;

                if ( Insured )
                    Insured = false;
            }
        }
Ejemplo n.º 28
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			Delete();
		}
Ejemplo n.º 29
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			
			m_stone = (CityManagementStone)reader.ReadItem();
		}
Ejemplo n.º 30
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			/*int version = */
			reader.ReadInt();
		}
Ejemplo n.º 31
0
        public Skill(Skills owner, SkillInfo info, GenericReader reader)
        {
            m_Owner = owner;
            m_Info  = info;

            int version = reader.ReadByte();

            switch (version)
            {
            case 0:
            {
                m_Base = reader.ReadUShort();
                m_Cap  = reader.ReadUShort();
                m_Lock = (SkillLock)reader.ReadByte();

                break;
            }

            case 0xFF:
            {
                m_Base = 0;
                m_Cap  = 1000;
                m_Lock = SkillLock.Up;

                break;
            }

            default:
            {
                if ((version & 0xC0) == 0x00)
                {
                    if ((version & 0x1) != 0)
                    {
                        m_Base = reader.ReadUShort();
                    }

                    if ((version & 0x2) != 0)
                    {
                        m_Cap = reader.ReadUShort();
                    }
                    else
                    {
                        m_Cap = 1000;
                    }

                    if ((version & 0x4) != 0)
                    {
                        m_Lock = (SkillLock)reader.ReadByte();
                    }
                }

                break;
            }
            }

            if (m_Lock < SkillLock.Up || m_Lock > SkillLock.Locked)
            {
                Console.WriteLine("Bad skill lock -> {0}.{1}", owner.Owner, m_Lock);
                m_Lock = SkillLock.Up;
            }
        }
Ejemplo n.º 32
0
        public Skills(Mobile owner, GenericReader reader)
        {
            m_Owner = owner;

            int version = reader.ReadInt();

            switch (version)
            {
            case 3:
            case 2:
            {
                m_Cap = reader.ReadInt();

                goto case 1;
            }

            case 1:
            {
                if (version < 2)
                {
                    m_Cap = 7000;
                }

                if (version < 3)
                {
                    /*m_Total =*/ reader.ReadInt();
                }

                SkillInfo[] info = SkillInfo.Table;

                m_Skills = new Skill[info.Length];

                int count = reader.ReadInt();

                for (int i = 0; i < count; ++i)
                {
                    if (i < info.Length)
                    {
                        Skill sk = new Skill(this, info[i], reader);

                        if (sk.BaseFixedPoint != 0 || sk.CapFixedPoint != 1000 || sk.Lock != SkillLock.Up)
                        {
                            m_Skills[i] = sk;
                            m_Total    += sk.BaseFixedPoint;
                        }
                    }
                    else
                    {
                        new Skill(this, null, reader);
                    }
                }

                //for ( int i = count; i < info.Length; ++i )
                //	m_Skills[i] = new Skill( this, info[i], 0, 1000, SkillLock.Up );

                break;
            }

            case 0:
            {
                reader.ReadInt();

                goto case 1;
            }
            }
        }