本文整理汇总了C#中Server.GenericReader类的典型用法代码示例。如果您正苦于以下问题:C# GenericReader类的具体用法?C# GenericReader怎么用?C# GenericReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GenericReader类属于Server命名空间,在下文中一共展示了GenericReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_Charges = reader.ReadInt();
goto case 1;
}
case 1:
{
m_SecureLevel = (SecureLevel)reader.ReadInt();
goto case 0;
}
case 0:
{
m_Redyable = reader.ReadBool();
m_DyedHue = reader.ReadInt();
break;
}
}
if (version < 2)
m_Charges = 10;
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
Light = LightType.Circle300;
}
示例3: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
}
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
if ( CheckType( "BottleAle" ) )
{
Quantity = MaxQuantity;
Content = BeverageType.Ale;
}
else if ( CheckType( "BottleLiquor" ) )
{
Quantity = MaxQuantity;
Content = BeverageType.Liquor;
}
else if ( CheckType( "BottleWine" ) )
{
Quantity = MaxQuantity;
Content = BeverageType.Wine;
}
else
{
throw new Exception( World.LoadingType );
}
break;
}
}
}
示例5: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.GetVersion();
switch (version)
{
case 1:
reader.ReadBlock(r => Misc = r.ReadTypeCreate<AutoPvPMiscOptions>(r) ?? new AutoPvPMiscOptions(r));
goto case 0;
case 0:
{
if (version == 0)
{
Misc = new AutoPvPMiscOptions();
}
reader.ReadBlock(r => Commands = r.ReadTypeCreate<AutoPvPCommandOptions>(r) ?? new AutoPvPCommandOptions(r));
reader.ReadBlock(r => Profiles = r.ReadTypeCreate<AutoPvPProfileOptions>(r) ?? new AutoPvPProfileOptions(r));
reader.ReadBlock(r => Seasons = r.ReadTypeCreate<AutoPvPSeasonOptions>(r) ?? new AutoPvPSeasonOptions(r));
}
break;
}
}
示例6: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
case 0:
{
m_MultiID = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
m_ShipName = reader.ReadString();
if ( version == 0 )
reader.ReadUInt();
break;
}
}
if ( LootType == LootType.Newbied )
LootType = LootType.Blessed;
if ( Weight == 0.0 )
Weight = 1.0;
}
示例7: 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();
}
}
示例8: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int entryCount = reader.ReadInt();
for (int i = 0; i < entryCount; i++)
m_SystemEntries.Add(new SlayerSystemTracker(reader.ReadString(), reader.ReadInt(), reader.ReadString()));
if (Owner is Mobile)
{
Mobile player = (Mobile)Owner;
SlayerModule module = player.GetModule(typeof(SlayerModule)) as SlayerModule;
if (module == null)
module = new SlayerModule(player);
foreach (SlayerSystemTracker entry in m_SystemEntries)
module.SetSlayerCount(entry.SystemName, entry.SlayerCount);
Delete();
}
}
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Value = reader.ReadInt();
break;
}
}
if ( LootType != LootType.Cursed )
{
LootType = LootType.Cursed;
}
if ( Insured )
{
Insured = false;
}
}
示例10: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadByte();
if ( version == 0 )
{
Timer.DelayCall( TimeSpan.Zero, delegate()
{
for ( int i = 0; i < Components.Count; ++i )
{
AddonComponent ac = Components[i] as AddonComponent;
if ( ac != null && ac.Hue == 2118 )
ac.Hue = 1161;
}
} );
}
if ( version <= 1 )
{
Timer.DelayCall( TimeSpan.Zero, delegate()
{
for ( int i = 0; i < Components.Count; ++i )
{
AddonComponent ac = Components[i] as AddonComponent;
if ( ac != null )
ac.Name = "jack-o-lantern";
}
} );
}
}
示例11: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
this.InitializeEvent();
}
示例12: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
//ItemConversion.AddToRareConversion( this );
}
示例13: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
string name = reader.ReadString();
if ( name != null && name.Length > 0 )
{
try
{
m_Contains = Type.GetType( name );
}
catch
{
m_Contains = null;
}
}
goto case 0;
}
case 0:
{
break;
}
}
}
示例14: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_CaughtBy = reader.ReadMobile();
m_DateCaught = reader.ReadDateTime();
}
示例15: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
i_Timer=new DBSTimer(this);
i_Timer.Start();
}