本文整理汇总了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();
}
示例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();
}
}
示例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;
}
}
}
示例4: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
MinItemID = reader.ReadEncodedInt();
MaxItemID = reader.ReadEncodedInt();
}
示例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;
}
}
}
示例6: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
/*int version = */reader.ReadEncodedInt();
m_Level = (SecureLevel) reader.ReadEncodedInt();
}
示例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;
}
}
示例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;
}
示例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;
}
示例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();
}
示例11: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
m_IsRewardItem = reader.ReadBool();
}
示例12: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
mActive = reader.ReadBool();
}
示例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;
}
示例14: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
m_Chest = reader.ReadItem() as IngotChest;
}
示例15: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt(); // version
m_EndDate = reader.ReadDateTime();
}