Example #1
1
		public override void Deserialize( GenericReader reader ) 
		{ 
			base.Deserialize( reader ); 
			int version = reader.ReadInt(); 

			m_Player = (PlayerMobile)reader.ReadMobile(); 
		} 
Example #2
1
        public VendorInventory(BaseHouse house, GenericReader reader)
        {
            this.m_House = house;

            int version = reader.ReadEncodedInt();

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

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

            this.m_ExpireTime = reader.ReadDeltaTime();

            if (this.m_Items.Count == 0 && this.m_Gold == 0)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Delete));
            }
            else
            {
                TimeSpan delay = this.m_ExpireTime - DateTime.Now;
                this.m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
                this.m_ExpireTimer.Start();
            }
        }
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_BondOwner = reader.ReadMobile();
                    goto case 0;
                }
                case 0:
                {
                    m_link = (BaseCreature)reader.ReadMobile();
                    m_toDeletePet = reader.ReadBool();
                    break;
                }

            }

            if ( m_link != null )
                m_link.IsStabled = true;
        }
Example #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            m_To = reader.ReadMobile();
            m_From = reader.ReadMobile();
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadEncodedInt();

            m_Owner = reader.ReadMobile();
        }
        public CraftContext(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_Items = new List<CraftItem>();

            Owner = reader.ReadMobile();
            int sysIndex = reader.ReadInt();
            m_LastResourceIndex = reader.ReadInt();
            m_LastResourceIndex2 = reader.ReadInt();
            m_LastGroupIndex = reader.ReadInt();
            m_DoNotColor = reader.ReadBool();
            m_MarkOption = (CraftMarkOption)reader.ReadInt();
            m_QuestOption = (CraftQuestOption)reader.ReadInt();

            m_MakeTotal = reader.ReadInt();

            System = GetCraftSystem(sysIndex);

            if (System != null && Owner != null)
            {
                System.AddContext(Owner, this);
                Contexts.Add(this);
            }
        }
Example #7
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch (version)
			{
				case 0:
					{
						m_Owner = reader.ReadMobile();
						m_Open = reader.ReadBool();

						if (m_Owner == null)
						{
							Delete();
						}

						break;
					}
			}

			if (ItemID == 0xE41)
			{
				ItemID = 0xE7C;
			}
		}
Example #8
0
        public Orders( BaseFactionGuard guard, GenericReader reader )
        {
            m_Guard = guard;

            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 1:
                {
                    m_Follow = reader.ReadMobile();
                    goto case 0;
                }
                case 0:
                {
                    int count = reader.ReadEncodedInt();
                    m_Reactions = new ArrayList( count );

                    for ( int i = 0; i < count; ++i )
                        m_Reactions.Add( new Reaction( reader ) );

                    m_Movement = (MovementType)reader.ReadEncodedInt();

                    break;
                }
            }
        }
Example #9
0
		public BOBSmallEntry( GenericReader reader )
		{
			int version = reader.ReadEncodedInt();

			switch ( version )
			{
				case 1:
				{
					m_Owner = reader.ReadMobile();
					goto case 0;
				}
				case 0:
				{
					string type = reader.ReadString();

					if ( type != null )
						m_ItemType = ScriptCompiler.FindTypeByFullName( type );

					m_RequireExceptional = reader.ReadBool();

					m_DeedType = (BODType)reader.ReadEncodedInt();

					m_Material = (BulkMaterialType)reader.ReadEncodedInt();
					m_AmountCur = reader.ReadEncodedInt();
					m_AmountMax = reader.ReadEncodedInt();
					m_Number = reader.ReadEncodedInt();
					m_Graphic = reader.ReadEncodedInt();
					m_Price = reader.ReadEncodedInt();

					break;
				}
			}
		}
Example #10
0
        public PlayerState(GenericReader reader, Faction faction, List<PlayerState> owner)
        {
            this.m_Faction = faction;
            this.m_Owner = owner;

            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 1:
                    {
                        this.m_IsActive = reader.ReadBool();
                        this.m_LastHonorTime = reader.ReadDateTime();
                        goto case 0;
                    }
                case 0:
                    {
                        this.m_Mobile = reader.ReadMobile();

                        this.m_KillPoints = reader.ReadEncodedInt();
                        this.m_MerchantTitle = (MerchantTitle)reader.ReadEncodedInt();

                        this.m_Leaving = reader.ReadDateTime();

                        break;
                    }
            }

            this.Attach();
        }
 public void Deserialize( GenericReader reader )
 {
     Points = reader.ReadInt();
     Wins = reader.ReadInt();
     Losses = reader.ReadInt();
     Part = reader.ReadMobile();
 }
Example #12
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();
            m_StabledPet = reader.ReadMobile();
        }
Example #13
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_Placer = reader.ReadMobile();

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

                    m_Components = new ArrayList( count );

                    for ( int i = 0; i < count; ++i )
                    {
                        Item item = reader.ReadItem();

                        if ( item != null )
                            m_Components.Add( item );
                    }

                    break;
                }
            }
        }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			m_Owner = reader.ReadMobile();
			m_Direction = Direction;
			m_WayPoints = new ArrayList();
		}
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_Parrot = reader.ReadMobile() as PetParrot;
        }
Example #16
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
            m_Owner = reader.ReadMobile() as BaseCreature;

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

            int version = reader.ReadInt();
            m_MobileLock = reader.ReadMobile();
            m_BeltName = reader.ReadString();
        }
Example #18
0
        public EnchantContext( GenericReader reader, BaseWeapon weapon )
        {
            m_Owner = reader.ReadMobile();
            m_Attribute = (WeaponAttribute) reader.ReadInt();
            m_SpellChanneling = reader.ReadBool();
            m_Timer = Timer.DelayCall( reader.ReadTimeSpan(), new TimerStateCallback<BaseWeapon>( EnchantSpell.RemoveEnchantContext ), weapon );

            weapon.EnchantContext = this;
        }
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            /*int version = */
            reader.ReadInt();

            m_Representative = reader.ReadMobile() as BaseLibraryRepresentative;
        }
Example #20
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            this.m_Daemon = reader.ReadMobile() as BoneDemon;

            this.CheckDaemon();
        }
Example #21
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			LootType = LootType.Blessed;

			int version = reader.ReadInt();

			m_Owner = reader.ReadMobile();
		}
Example #22
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            var version = reader.ReadInt();

            Created = reader.ReadDateTime();
            Bounty = reader.ReadInt();
            Player = reader.ReadMobile<PlayerMobile>();
        }
Example #23
0
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            if (version == 1)
                reader.ReadMobile();
            else if (version == 2)
                m_Owner = reader.ReadString();
        }
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			m_Placer = reader.ReadMobile();
			m_Value = reader.ReadInt();
			ID1 = reader.ReadInt();
			ID2 = reader.ReadInt();
			ID3 = reader.ReadInt();
			ID4 = reader.ReadInt();
		}
        private static void Deserialize(GenericReader reader)
        {
            int version = reader.ReadInt();

            int count = reader.ReadInt();
            for (int i = 0; i < count; i++)
            {
                PlayerMobile m = reader.ReadMobile() as PlayerMobile;
                if(m != null)
                    NewPlayers.Add((PlayerMobile)m);
            }
        }
Example #26
0
        public TownState( GenericReader reader )
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 3:
                {
                    m_LastIncome = reader.ReadDateTime();

                    goto case 2;
                }
                case 2:
                {
                    m_Tax = reader.ReadEncodedInt();
                    m_LastTaxChange = reader.ReadDateTime();

                    goto case 1;
                }
                case 1:
                {
                    m_Silver = reader.ReadEncodedInt();

                    goto case 0;
                }
                case 0:
                {
                    m_Town = Town.ReadReference( reader );
                    m_Owner = Faction.ReadReference( reader );

                    m_Sheriff = reader.ReadMobile();
                    m_Finance = reader.ReadMobile();

                    m_Town.State = this;

                    break;
                }
            }
        }
Example #27
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            int size = reader.ReadInt();

            DonationList = new Dictionary<PlayerMobile, int>();
            for (int i = 0; i < size; i++)
            {
                PlayerMobile m = reader.ReadMobile() as PlayerMobile;
                int value = reader.ReadInt();
                DonationList.Add(m, value);
            }
            UpdateBook();

            m_James = reader.ReadMobile();

            if (version == 0 && Weight == 25)
                Weight = -1;
        }
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			reader.ReadEncodedInt();

			m_Statue = reader.ReadMobile<CharacterStatue>();

			if (m_Statue == null || m_Statue.SculptedBy == null || Map == Map.Internal)
			{
				Timer.DelayCall(TimeSpan.Zero, Delete);
			}
		}
Example #29
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            this.m_Statue = reader.ReadMobile() as CharacterStatue;

            if (this.m_Statue == null || this.m_Statue.SculptedBy == null || this.Map == Map.Internal)
            {
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(Delete));
            }
        }
Example #30
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_Title = reader.ReadString();
			m_Rank = (TrophyRank) reader.ReadInt();
			m_Owner = reader.ReadMobile();
			m_Date = reader.ReadDateTime();

			if ( version == 0 )
				LootType = LootType.Blessed;
		}