本文整理汇总了C#中Server.GenericReader.ReadItemList方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadItemList方法的具体用法?C# GenericReader.ReadItemList怎么用?C# GenericReader.ReadItemList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadItemList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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.ReadItemList();
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.Now;
m_ExpireTimer = new ExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
m_ExpireTimer.Start();
}
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
m_Receivers = reader.ReadItemList();
}
示例3: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
verSion = reader.ReadInt();
switch (verSion)
{
case 1:
locs = reader.ReadItemList();
break;
}
}
示例4: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
BodyMod = reader.ReadInt();
goto case 1;
}
case 1:
{
m_Items = reader.ReadItemList();
break;
}
case 0:
{
m_Items = new ArrayList();
break;
}
}
}
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_RegionBounds = reader.ReadRect2D();
m_Traps = reader.ReadItemList();
goto case 0;
}
case 0:
{
if ( version < 1 )
{
m_Traps = new ArrayList();
m_RegionBounds = new Rectangle2D( X - 40, Y - 40, 80, 80 );
}
m_Creatures = reader.ReadMobileList();
m_TypeName = reader.ReadString();
m_Door = reader.ReadItem() as BaseDoor;
m_Addon = reader.ReadItem() as BaseAddon;
m_Sequence = reader.ReadItem() as GauntletSpawner;
State = (GauntletSpawnerState)reader.ReadInt();
break;
}
}
}
示例6: Deserialize
public override void Deserialize( GenericReader reader )
{
m_spell = true;
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:
{
m_spell = reader.ReadBool();
goto case 0;
}
case 0:
{
m_Owner = reader.ReadMobile();
m_SleepingBodyName = reader.ReadString();
m_Blessed = reader.ReadBool();
m_EquipItems = reader.ReadItemList();
break;
}
}
m_NextSnoreTrigger = DateTime.Now;
// Delete on Server restart if spell action
if( m_spell )
this.Delete();
}
示例7: Deserialize
/// <summary>
/// Deserializes the specified reader.
/// </summary>
/// <param name="reader">The reader.</param>
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 3:
{
m_LastAnnounceTime = reader.ReadDateTime();
goto case 2;
}
case 2:
{
m_ShopperQueue = new Queue<PlayerMobile>(reader.ReadMobileList<PlayerMobile>());
goto case 1;
}
case 1:
{
m_VisitorQueue = new Queue<PlayerMobile>(reader.ReadMobileList<PlayerMobile>());
m_City = (KinFactionCities)reader.ReadInt();
m_Champs = reader.ReadItemList<ChampKinCity>();
goto case 0;
}
case 0:
break;
}
}
示例8: Deserialize
public virtual void Deserialize( GenericReader reader )
{
int version = reader.ReadInt();
SetLastMoved();
switch ( version )
{
case 7:
case 6:
{
SaveFlag flags = (SaveFlag)reader.ReadInt();
if ( version < 7 )
{
LastMoved = reader.ReadDeltaTime();
}
else
{
int minutes = reader.ReadEncodedInt();
try{ LastMoved = Core.Now - TimeSpan.FromMinutes( minutes ); }
catch{ LastMoved = Core.Now; }
}
if ( GetSaveFlag( flags, SaveFlag.Direction ) )
m_Direction = (Direction)reader.ReadByte();
if ( GetSaveFlag( flags, SaveFlag.Bounce ) )
m_Bounce = BounceInfo.Deserialize( reader );
if ( GetSaveFlag( flags, SaveFlag.LootType ) )
m_LootType = (LootType)reader.ReadByte();
int x = 0, y = 0, z = 0;
if ( GetSaveFlag( flags, SaveFlag.LocationFull ) )
{
x = reader.ReadEncodedInt();
y = reader.ReadEncodedInt();
z = reader.ReadEncodedInt();
}
else
{
if ( GetSaveFlag( flags, SaveFlag.LocationByteXY ) )
{
x = reader.ReadByte();
y = reader.ReadByte();
}
else if ( GetSaveFlag( flags, SaveFlag.LocationShortXY ) )
{
x = reader.ReadShort();
y = reader.ReadShort();
}
if ( GetSaveFlag( flags, SaveFlag.LocationSByteZ ) )
z = reader.ReadSByte();
}
m_Location = new Point3D( x, y, z );
if ( GetSaveFlag( flags, SaveFlag.ItemID ) )
m_ItemID = reader.ReadEncodedInt();
if ( GetSaveFlag( flags, SaveFlag.Hue ) )
m_Hue = reader.ReadEncodedInt();
if ( GetSaveFlag( flags, SaveFlag.Amount ) )
m_Amount = reader.ReadEncodedInt();
else
m_Amount = 1;
if ( GetSaveFlag( flags, SaveFlag.Layer ) )
m_Layer = (Layer)reader.ReadByte();
if ( GetSaveFlag( flags, SaveFlag.Name ) )
m_Name = string.Intern(reader.ReadString());
if ( GetSaveFlag( flags, SaveFlag.Parent ) )
{
Serial parent = reader.ReadInt();
if ( parent.IsMobile )
m_Parent = World.FindMobile( parent );
else if ( parent.IsItem )
m_Parent = World.FindItem( parent );
else
m_Parent = null;
if ( m_Parent == null && (parent.IsMobile || parent.IsItem) )
Delete();
}
if ( GetSaveFlag( flags, SaveFlag.Items ) )
m_Items = reader.ReadItemList();
//else
// m_Items = new ArrayList( 1 );
if ( GetSaveFlag( flags, SaveFlag.IntWeight ) )
m_Weight = reader.ReadEncodedInt();
//.........这里部分代码省略.........
示例9: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
{
m_Cost = reader.ReadInt();
m_AmountCollected = reader.ReadLong();
goto case 0;
}
case 0:
{
m_Active = reader.ReadBool();
m_Owner = reader.ReadMobile();
m_Decays = reader.ReadBool();
m_DecayTime = reader.ReadTimeSpan();
m_AccessLevel = (AccessLevel)reader.ReadInt();
if (reader.ReadBool())
m_RuneBooks = reader.ReadItemList();
m_DecayRunning = reader.ReadBool();
if (m_DecayRunning)
this.DoDecayTimer(reader.ReadTimeSpan());
break;
}
}
UpdateDate();
}
示例10: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize (reader);
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Links = reader.ReadItemList();
m_Charges = reader.ReadInt();
break;
}
}
}
示例11: Deserialize
//.........这里部分代码省略.........
}
case 25:
{
goto case 24;
}
case 24:
{
if( version < 27 )
tmpSpawnListSize = reader.ReadInt();
tmpRestrictKillsToSubgroup = new ArrayList( tmpSpawnListSize );
tmpClearOnAdvance = new ArrayList( tmpSpawnListSize );
tmpMinDelay = new ArrayList( tmpSpawnListSize );
tmpMaxDelay = new ArrayList( tmpSpawnListSize );
tmpNextSpawn = new ArrayList( tmpSpawnListSize );
for( int i = 0; i < tmpSpawnListSize; ++i )
{
bool restrictkills = reader.ReadBool();
bool clearadvance = reader.ReadBool();
double mind = reader.ReadDouble();
double maxd = reader.ReadDouble();
DateTime nextspawn = reader.ReadDeltaTime();
tmpRestrictKillsToSubgroup.Add( restrictkills );
tmpClearOnAdvance.Add( clearadvance );
tmpMinDelay.Add( mind );
tmpMaxDelay.Add( maxd );
tmpNextSpawn.Add( nextspawn );
}
bool hasitems = reader.ReadBool();
if( hasitems )
{
m_ShowBoundsItems = reader.ReadItemList();
}
goto case 23;
}
case 23:
{
IsInactivated = reader.ReadBool();
SmartSpawning = reader.ReadBool();
goto case 22;
}
case 22:
{
SkillTrigger = reader.ReadString(); // note this will also register the skill
m_skill_that_triggered = (SkillName)reader.ReadInt();
m_FreeRun = reader.ReadBool();
m_mob_who_triggered = reader.ReadMobile();
goto case 21;
}
case 21:
{
m_DespawnTime = reader.ReadTimeSpan();
goto case 20;
}
case 20:
{
if( version < 24 )
tmpSpawnListSize = reader.ReadInt();
tmpRequireSurface = new ArrayList( tmpSpawnListSize );
for( int i = 0; i < tmpSpawnListSize; ++i )
{
bool requiresurface = reader.ReadBool();
tmpRequireSurface.Add( requiresurface );
示例12: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
{
m_Guardians = reader.ReadMobileList();
m_Temporary = reader.ReadBool();
goto case 1;
}
case 1:
{
m_Owner = reader.ReadMobile();
goto case 0;
}
case 0:
{
m_Level = reader.ReadInt();
m_DeleteTime = reader.ReadDeltaTime();
m_Lifted = reader.ReadItemList();
if ( version < 2 )
m_Guardians = new ArrayList();
break;
}
}
if ( !m_Temporary )
{
m_Timer = new DeleteTimer( this, m_DeleteTime );
m_Timer.Start();
}
else
{
Delete();
}
}
示例13: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Items = reader.ReadItemList();
m_Mobiles = reader.ReadMobileList();
m_DecayTime = reader.ReadDeltaTime();
RefreshDecay( false );
break;
}
}
}
示例14: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
PetHolders = reader.ReadItemList();
exit = reader.ReadItem();
}
示例15: Deserialize
//.........这里部分代码省略.........
restartTime = reader.ReadDateTime();
m_DoneQuests.Add( new QuestRestartInfo( questType, restartTime ) );
}
}
m_Profession = reader.ReadEncodedInt();
goto case 15;
}
case 15:
{
m_LastCompassionLoss = reader.ReadDeltaTime();
goto case 14;
}
case 14:
{
m_CompassionGains = reader.ReadEncodedInt();
if ( m_CompassionGains > 0 )
m_NextCompassionDay = reader.ReadDeltaTime();
goto case 13;
}
case 13: // just removed m_PayedInsurance list
case 12:
{
m_BOBFilter = new Engines.BulkOrders.BOBFilter( reader );
goto case 11;
}
case 11:
{
if ( version < 13 )
{
ArrayList payed = reader.ReadItemList();
// Adam: no more insurance
//for ( int i = 0; i < payed.Count; ++i )
//((Item)payed[i]).PayedInsurance = true;
}
goto case 10;
}
case 10:
{
if ( reader.ReadBool() )
{
m_HairModID = reader.ReadInt();
m_HairModHue = reader.ReadInt();
m_BeardModID = reader.ReadInt();
m_BeardModHue = reader.ReadInt();
// We cannot call SetHairMods( -1, -1 ) here because the items have not yet loaded
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RevertHair ) );
}
goto case 9;
}
case 9:
{
SavagePaintExpiration = reader.ReadTimeSpan();
if ( SavagePaintExpiration > TimeSpan.Zero )
{
// BodyMod = ( Female ? 184 : 183 );
HueMod = 0;
}