当前位置: 首页>>代码示例>>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;未经允许,请勿转载。