當前位置: 首頁>>代碼示例>>C#>>正文


C# GenericReader.ReadEncodedInt方法代碼示例

本文整理匯總了C#中Server.GenericReader.ReadEncodedInt方法的典型用法代碼示例。如果您正苦於以下問題:C# GenericReader.ReadEncodedInt方法的具體用法?C# GenericReader.ReadEncodedInt怎麽用?C# GenericReader.ReadEncodedInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.GenericReader的用法示例。


在下文中一共展示了GenericReader.ReadEncodedInt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Deserialize

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

            int version = reader.ReadInt();
            m_Resource = (CraftResource)reader.ReadEncodedInt();
        }
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:7,代碼來源:ForgeInacheve.cs

示例2: VendorInventory

        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();
            }
        }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:26,代碼來源:VendorInventory.cs

示例3: LoyaltyInfo

        public LoyaltyInfo( GenericReader reader )
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 0:
                    {
                        int length = reader.ReadEncodedInt();
                        m_Values = new int[length];

                        for ( int i = 0; i < length; i++ )
                            m_Values[i] = reader.ReadEncodedInt();

                        if ( m_Values.Length != LoyaltyGroupInfo.Table.Length )
                        {
                            int[] oldValues = m_Values;
                            m_Values = new int[LoyaltyGroupInfo.Table.Length];

                            for ( int i = 0; i < m_Values.Length && i < oldValues.Length; i++ )
                                m_Values[i] = oldValues[i];
                        }
                        break;
                    }
            }
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:26,代碼來源:LoyaltyInfo.cs

示例4: Deserialize

 public override void Deserialize(GenericReader reader)
 {
     base.Deserialize(reader);
     reader.ReadInt();
     MinItemID = reader.ReadEncodedInt();
     MaxItemID = reader.ReadEncodedInt();
 }
開發者ID:Vorpalstar,項目名稱:runuo-custom-scripts,代碼行數:7,代碼來源:Bricks.cs

示例5: Preferences

        public Preferences( GenericReader reader )
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 0:
                {
                    int count = reader.ReadEncodedInt();

                    m_Table = new Hashtable( count );
                    m_Entries = new ArrayList( count );

                    for ( int i = 0; i < count; ++i )
                    {
                        PreferencesEntry entry = new PreferencesEntry( reader, this, version );

                        if ( entry.Mobile != null )
                        {
                            m_Table[entry.Mobile] = entry;
                            m_Entries.Add( entry );
                        }
                    }

                    break;
                }
            }
        }
開發者ID:greeduomacro,項目名稱:divinity,代碼行數:28,代碼來源:Preferences.cs

示例6: Deserialize

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

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

            m_Level = (SecureLevel) reader.ReadEncodedInt();
        }
開發者ID:BackupTheBerlios,項目名稱:sunuo-svn,代碼行數:8,代碼來源:TapestryOfSosaria.cs

示例7: TextDefinition

		public TextDefinition( GenericReader reader )
		{
			int type = reader.ReadEncodedInt();

			switch ( type )
			{
				case 1: m_Number = reader.ReadEncodedInt(); m_String = null; break;
				case 2: m_Number = 0; m_String = reader.ReadString(); break;
				default: m_Number = 0; m_String = null; break;
			}
		}
開發者ID:PepeBiondi,項目名稱:runsa,代碼行數:11,代碼來源:TextDefinition.cs

示例8: ChildDeserialize

        public override void ChildDeserialize( GenericReader reader )
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 0:
                    m_iLevel = reader.ReadEncodedInt();
                    break;
            }

            m_MonsterType = GetCurMonster( m_iLevel );
            if( CurProgress > MaxProgress )
                CurProgress = MaxProgress - 1;
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:15,代碼來源:Objectives.cs

示例9: ChildDeserialize

        public override void ChildDeserialize(GenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            switch (version)
            {
                case 0:
                    m_iLevel = reader.ReadEncodedInt();
                    break;
            }

            m_PlantEntry = GetCurrentPlantEntry();
            if (CurProgress > MaxProgress)
                CurProgress = MaxProgress - 1;
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:15,代碼來源:Objectives.cs

示例10: TalismanAttribute

		public TalismanAttribute( GenericReader reader )
		{
			int version = reader.ReadInt();

			SaveFlag flags = (SaveFlag) reader.ReadEncodedInt();

			if ( GetSaveFlag( flags, SaveFlag.Type ) )
				m_Type = ScriptCompiler.FindTypeByFullName( reader.ReadString(), false );

			if ( GetSaveFlag( flags, SaveFlag.Name ) )
				m_Name = TextDefinition.Deserialize( reader );

			if ( GetSaveFlag( flags, SaveFlag.Amount ) )
				m_Amount = reader.ReadEncodedInt();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:15,代碼來源:TalismanAttribute.cs

示例11: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadEncodedInt();

			m_IsRewardItem = reader.ReadBool();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:7,代碼來源:DecoAnkhAddon.cs

示例12: Deserialize

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

            int version = reader.ReadEncodedInt();
            mActive = reader.ReadBool();
        }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:7,代碼來源:ShameAltarAddon.cs

示例13: Deserialize

        public static TextDefinition Deserialize(GenericReader reader)
        {
            int type = reader.ReadEncodedInt();

            switch ( type )
            {
                case 0:
                    return new TextDefinition();
                case 1:
                    return new TextDefinition(reader.ReadEncodedInt());
                case 2:
                    return new TextDefinition(reader.ReadString());
            }

            return null;
        }
開發者ID:Crome696,項目名稱:ServUO,代碼行數:16,代碼來源:TextDefinition.cs

示例14: Deserialize

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

            int version = reader.ReadEncodedInt();
            m_Chest = reader.ReadItem() as IngotChest;
        }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:7,代碼來源:ScoreBook.cs

示例15: Deserialize

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

			int version = reader.ReadEncodedInt(); // version

			m_EndDate = reader.ReadDateTime();
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:8,代碼來源:TrickOrTreatBag.cs


注:本文中的Server.GenericReader.ReadEncodedInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。