本文整理汇总了C#中GenericReader类的典型用法代码示例。如果您正苦于以下问题:C# GenericReader类的具体用法?C# GenericReader怎么用?C# GenericReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GenericReader类属于命名空间,在下文中一共展示了GenericReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
//ShowUsesRemaining = true;
}
示例2: Election
public Election( GenericReader reader )
{
int version = reader.ReadEncodedInt();
switch ( version )
{
case 0:
{
m_Faction = Faction.ReadReference( reader );
m_LastStateTime = reader.ReadDateTime();
m_State = (ElectionState)reader.ReadEncodedInt();
m_Candidates = new List<Candidate>();
int count = reader.ReadEncodedInt();
for ( int i = 0; i < count; ++i )
{
Candidate cd = new Candidate( reader );
if ( cd.Mobile != null )
m_Candidates.Add( cd );
}
break;
}
}
StartTimer();
}
示例3: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
/*int version = */
reader.ReadInt();
}
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Player = (PlayerMobile)reader.ReadMobile();
}
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
LootType = LootType.Blessed;
int version = reader.ReadInt();
}
示例6: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_MaxAmount = reader.ReadInt();
goto case 1;
}
case 1:
case 0:
{
m_Type = (PotionEffect)reader.ReadInt();
m_Held = reader.ReadInt();
break;
}
}
if ( version < 1 )
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( UpdateWeight ) );
}
示例7: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
TimeSpan duration = reader.ReadTimeSpan();
m_Timer = new InternalTimer(this, duration);
m_Timer.Start();
m_End = DateTime.Now + duration;
break;
}
case 0:
{
TimeSpan duration = TimeSpan.FromSeconds(10.0);
m_Timer = new InternalTimer(this, duration);
m_Timer.Start();
m_End = DateTime.Now + duration;
break;
}
}
}
示例8: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_End = reader.ReadDeltaTime();
m_EvolutionTimer = new EvolutionTimer( this, m_End - DateTime.Now );
m_EvolutionTimer.Start();
break;
}
case 0:
{
TimeSpan duration = TimeSpan.FromDays( 1.0 );
m_EvolutionTimer = new EvolutionTimer( this, duration );
m_EvolutionTimer.Start();
m_End = DateTime.Now + duration;
break;
}
}
}
示例9: Deserialize
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;
}
}
}
示例10: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
reader.ReadItemList();
goto case 0;
}
case 0:
{
reader.ReadBool();
reader.ReadItemList();
reader.ReadItemList();
reader.ReadItemList();
reader.ReadItemList();
reader.ReadItemList();
reader.ReadTimeSpan();
reader.ReadInt();
break;
}
}
DeleteAll();
Delete();
}
示例11: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_ManaLeeched = reader.ReadInt();
}
示例12: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
Range = reader.ReadInt();
goto case 0;
case 0:
// version 0
m_OriginalID = reader.ReadInt();
m_MorphID = reader.ReadInt();
m_Duration = reader.ReadTimeSpan();
ActivationWord = reader.ReadString();
TimeSpan remaining = reader.ReadTimeSpan();
if (remaining > TimeSpan.Zero)
{
DoTimer(remaining);
}
break;
}
}
示例13: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
m_Commodity = reader.ReadItem();
switch ( version )
{
case 0:
{
if (m_Commodity != null)
{
Hue = 0x592;
}
break;
}
}
if ( m_Commodity != null && !( m_Commodity is ICommodity ) ) //Apparently, there may be items out there with this. Funky.
{
Timer.DelayCall( TimeSpan.Zero, this.Delete );
}
}
示例14: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
DynamicFurniture.Close( this );
}
示例15: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
switch ( version )
{
case 1:
{
m_Music = (MusicName) reader.ReadInt();
break;
}
}
if ( version == 0 ) // Music wasn't serialized in version 0, pick a new track of random rarity
{
DawnsMusicRarity rarity;
double rand = Utility.RandomDouble();
if ( rand < 0.025 )
rarity = DawnsMusicRarity.Rare;
else if ( rand < 0.225 )
rarity = DawnsMusicRarity.Uncommon;
else
rarity = DawnsMusicRarity.Common;
m_Music = DawnsMusicBox.RandomTrack( rarity );
}
}