本文整理汇总了C#中Server.GenericWriter.WriteItemList方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.WriteItemList方法的具体用法?C# GenericWriter.WriteItemList怎么用?C# GenericWriter.WriteItemList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericWriter
的用法示例。
在下文中一共展示了GenericWriter.WriteItemList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteItemList( m_DecoItems );
}
示例2: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)4 ); // version
writer.Write( m_ConfinedRoaming );
writer.Write( m_Idol );
writer.Write( m_HasBeenAdvanced );
writer.Write( m_SpawnArea );
writer.Write( m_RandomizeType );
// writer.Write( m_SpawnRange );
writer.Write( m_Kills );
writer.Write( (bool)m_Active );
writer.Write( (int)m_Type );
writer.WriteMobileList( m_Creatures, true );
writer.WriteItemList( m_RedSkulls, true );
writer.WriteItemList( m_WhiteSkulls, true );
writer.Write( m_Platform );
writer.Write( m_Altar );
writer.Write( m_ExpireDelay );
writer.WriteDeltaTime( m_ExpireTime );
writer.Write( m_Champion );
writer.Write( m_RestartDelay );
writer.Write( m_RestartTimer != null );
if( m_RestartTimer != null )
writer.WriteDeltaTime( m_RestartTime );
}
示例3: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write(m_spell); // version 1
writer.Write(m_Owner); // version 0
writer.Write(m_SleepingBodyName);
writer.Write(m_Blessed);
writer.WriteItemList( m_EquipItems, true );
}
示例4: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 14 ); // version
writer.Write( (Point3D) m_RelativeBanLocation );
writer.WriteItemList( m_VendorRentalContracts, true );
writer.WriteMobileList( m_InternalizedVendors, true );
writer.WriteEncodedInt( m_RelocatedEntities.Count );
foreach ( RelocatedEntity relEntity in m_RelocatedEntities )
{
writer.Write( (Point3D) relEntity.RelativeLocation );
if ( ( relEntity.Entity is Item && ((Item)relEntity.Entity).Deleted ) || ( relEntity.Entity is Mobile && ((Mobile)relEntity.Entity).Deleted ) )
writer.Write( (int) Serial.MinusOne );
else
writer.Write( (int) relEntity.Entity.Serial );
}
writer.WriteEncodedInt( m_VendorInventories.Count );
for ( int i = 0; i < m_VendorInventories.Count; i++ )
{
VendorInventory inventory = (VendorInventory) m_VendorInventories[i];
inventory.Serialize( writer );
}
writer.Write( (DateTime) m_LastRefreshed );
writer.Write( (bool) m_RestrictDecay );
writer.Write( (int) m_Visits );
writer.Write( (int) m_Price );
writer.WriteMobileList( m_Access );
writer.Write( m_BuiltOn );
writer.Write( m_LastTraded );
writer.WriteItemList( m_Addons, true );
writer.Write( m_Secures.Count );
for ( int i = 0; i < m_Secures.Count; ++i )
((SecureInfo)m_Secures[i]).Serialize( writer );
writer.Write( m_Public );
//writer.Write( BanLocation );
writer.Write( m_Owner );
// Version 5 no longer serializes region coords
/*writer.Write( (int)m_Region.Coords.Count );
foreach( Rectangle2D rect in m_Region.Coords )
{
writer.Write( rect );
}*/
writer.WriteMobileList( m_CoOwners, true );
writer.WriteMobileList( m_Friends, true );
writer.WriteMobileList( m_Bans, true );
writer.Write( m_Sign );
writer.Write( m_Trash );
writer.WriteItemList( m_Doors, true );
writer.WriteItemList( m_LockDowns, true );
//writer.WriteItemList( m_Secures, true );
writer.Write( (int) m_MaxLockDowns );
writer.Write( (int) m_MaxSecures );
// Items in locked down containers that aren't locked down themselves must decay!
for ( int i = 0; i < m_LockDowns.Count; ++i )
{
Item item = (Item)m_LockDowns[i];
if ( item is Container && !(item is BaseBoard) )
{
Container cont = (Container)item;
List<Item> children = cont.Items;
for ( int j = 0; j < children.Count; ++j )
{
Item child = children[j];
if ( child.Decays && !child.IsLockedDown && !child.IsSecure && (child.LastMoved + child.DecayTime) <= DateTime.Now )
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( child.Delete ) );
}
}
}
}
示例5: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
writer.Write(m_Cost);
writer.Write(m_AmountCollected);
writer.Write(m_Active);
if (m_Owner != null && m_Owner.Deleted)
m_Owner = null;
writer.Write(m_Owner);
writer.Write(m_Decays);
writer.Write(m_DecayTime);
writer.Write((int)m_AccessLevel);
if (m_RuneBooks != null && m_RuneBooks.Count > 0)
{
writer.Write(true);
writer.WriteItemList(m_RuneBooks);
}
else
writer.Write(false);
writer.Write(m_DecayRunning);
if (m_DecayRunning)
writer.Write(this.m_DecayEnd - DateTime.Now);
if (m_Active && m_RuneBooks != null && m_RuneBooks.Count > 0)
{
Runebook runebook = m_RuneBooks[0] as Runebook;
if (runebook.Hue != Hue)
Hue = runebook.Hue == 1121 ? 58 : runebook.Hue;
}
}
示例6: Serialize
//.........这里部分代码省略.........
long now = Core.Now.Ticks;
TimeSpan d;
try{ d = new TimeSpan( ticks-now ); }
catch{ if ( ticks < now ) d = TimeSpan.MaxValue; else d = TimeSpan.MaxValue; }
double minutes = -d.TotalMinutes;
if ( minutes < int.MinValue )
minutes = int.MinValue;
else if ( minutes > int.MaxValue )
minutes = int.MaxValue;
writer.WriteEncodedInt( (int) minutes );
/* end */
if ( GetSaveFlag( flags, SaveFlag.Direction ) )
writer.Write( (byte) m_Direction );
if ( GetSaveFlag( flags, SaveFlag.Bounce ) )
BounceInfo.Serialize( m_Bounce, writer );
if ( GetSaveFlag( flags, SaveFlag.LootType ) )
writer.Write( (byte) m_LootType );
if ( GetSaveFlag( flags, SaveFlag.LocationFull ) )
{
writer.WriteEncodedInt( x );
writer.WriteEncodedInt( y );
writer.WriteEncodedInt( z );
}
else
{
if ( GetSaveFlag( flags, SaveFlag.LocationByteXY ) )
{
writer.Write( (byte) x );
writer.Write( (byte) y );
}
else if ( GetSaveFlag( flags, SaveFlag.LocationShortXY ) )
{
writer.Write( (short) x );
writer.Write( (short) y );
}
if ( GetSaveFlag( flags, SaveFlag.LocationSByteZ ) )
writer.Write( (sbyte) z );
}
if ( GetSaveFlag( flags, SaveFlag.ItemID ) )
writer.WriteEncodedInt( (int) m_ItemID );
if ( GetSaveFlag( flags, SaveFlag.Hue ) )
writer.WriteEncodedInt( (int) m_Hue );
if ( GetSaveFlag( flags, SaveFlag.Amount ) )
writer.WriteEncodedInt( (int) m_Amount );
if ( GetSaveFlag( flags, SaveFlag.Layer ) )
writer.Write( (byte) m_Layer );
if ( GetSaveFlag( flags, SaveFlag.Name ) )
writer.Write( (string) m_Name );
if ( GetSaveFlag( flags, SaveFlag.Parent ) )
{
if ( m_Parent is Mobile && !((Mobile)m_Parent).Deleted )
writer.Write( ((Mobile)m_Parent).Serial );
else if ( m_Parent is Item && !((Item)m_Parent).Deleted )
writer.Write( ((Item)m_Parent).Serial );
else
writer.Write( (int) Serial.MinusOne );
}
if ( GetSaveFlag( flags, SaveFlag.Items ) )
writer.WriteItemList( m_Items, false );
if ( GetSaveFlag( flags, SaveFlag.IntWeight ) )
writer.WriteEncodedInt( (int) m_Weight );
else if ( GetSaveFlag( flags, SaveFlag.WeightNot1or0 ) )
writer.Write( (double) m_Weight );
if ( GetSaveFlag( flags, SaveFlag.Map ) )
writer.Write( (Map) m_Map );
if ( GetSaveFlag( flags, SaveFlag.ImplFlags ) )
writer.WriteEncodedInt( (int) implFlags );
if ( GetSaveFlag( flags, SaveFlag.InsuredFor ) )
writer.Write( (Mobile)null );
if ( GetSaveFlag( flags, SaveFlag.BlessedFor ) )
writer.Write( m_BlessedFor );
if ( GetSaveFlag( flags, SaveFlag.HeldBy ) )
writer.Write( m_HeldBy );
if ( GetSaveFlag( flags, SaveFlag.SavedFlags ) )
writer.WriteEncodedInt( m_SavedFlags );
}
示例7: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)30 ); // version
// Version 30
writer.Write( m_AllowNPCTriggering );
// Version 29
if( m_SpawnObjects != null )
{
writer.Write( m_SpawnObjects.Count );
for( int i = 0; i < m_SpawnObjects.Count; ++i )
{
// Write the spawns per tick value
writer.Write( ((SpawnObject)m_SpawnObjects[i]).SpawnsPerTick );
}
}
else
{
// empty spawner
writer.Write( (int)0 );
}
// Version 28
if( m_SpawnObjects != null )
{
for( int i = 0; i < m_SpawnObjects.Count; ++i )
{
// Write the pack range value
writer.Write( ((SpawnObject)m_SpawnObjects[i]).PackRange );
}
}
// Version 27
if( m_SpawnObjects != null )
{
for( int i = 0; i < m_SpawnObjects.Count; ++i )
{
// Write the disable spawn flag
writer.Write( ((SpawnObject)m_SpawnObjects[i]).Disabled );
}
}
// Version 26
writer.Write( m_SpawnOnTrigger );
writer.Write( m_FirstModified );
writer.Write( m_LastModified );
// Version 25
// eliminated the textentrybook serialization (they autodelete on deser now)
// Version 24
if( m_SpawnObjects != null )
{
for( int i = 0; i < m_SpawnObjects.Count; ++i )
{
SpawnObject so = (SpawnObject)m_SpawnObjects[i];
// Write the restrict kills flag
writer.Write( so.RestrictKillsToSubgroup );
// Write the clear on advance flag
writer.Write( so.ClearOnAdvance );
// Write the mindelay
writer.Write( so.MinDelay );
// Write the maxdelay
writer.Write( so.MaxDelay );
// write the next spawn time for the subgrop
writer.WriteDeltaTime( so.NextSpawn );
}
}
if( m_ShowBoundsItems != null && m_ShowBoundsItems.Count > 0 )
{
writer.Write( true );
writer.WriteItemList( m_ShowBoundsItems );
}
else
{
// empty showbounds item list
writer.Write( false );
}
// Version 23
writer.Write( IsInactivated );
writer.Write( m_SmartSpawning );
// Version 22
writer.Write( m_SkillTrigger );
writer.Write( (int)m_skill_that_triggered );
writer.Write( m_FreeRun );
writer.Write( m_mob_who_triggered );
// Version 21
writer.Write( m_DespawnTime );
// Version 20
if( m_SpawnObjects != null )
{
for( int i = 0; i < m_SpawnObjects.Count; ++i )
{
// Write the requiresurface flag
//.........这里部分代码省略.........
示例8: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize (writer);
writer.Write( (int)0 );
writer.WriteItemList( m_Links );
writer.Write( m_Charges );
}
示例9: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)m_KeyValue );
writer.Write( (int) m_Visits );
writer.Write( (int) m_Price );
writer.Write( m_BuiltOn );
writer.Write( m_LastTraded );
writer.Write( m_Public );
writer.Write( BanLocation );
writer.Write( m_Owner );
writer.Write( m_Sign );
writer.Write( m_Trash );
writer.WriteItemList( m_Doors, true );
writer.WriteItemList( m_Addons, true );
if ( m_Sign != null && !m_Sign.Deleted && m_Sign.HouseDecayDate < DateTime.Now )
Timer.DelayCall( TimeSpan.FromSeconds( Utility.Random( 60 ) + 60 ), new TimerCallback( m_Sign.CheckDecay ) );
}
示例10: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
writer.WriteItemList<Key>( m_Keys );
}
示例11: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize(writer);
writer.Write(1); // Version
writer.WriteItemList(m_market, true);
writer.WriteMobileList(m_marketmob, true);
}
示例12: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(verSion); // version
switch (verSion)
{
case 1:
writer.WriteItemList(locs);
break;
}
}
示例13: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 2 ); // version
writer.WriteMobileList( m_Guardians, true );
writer.Write( (bool) m_Temporary );
writer.Write( m_Owner );
writer.Write( (int) m_Level );
writer.WriteDeltaTime( m_DeleteTime );
writer.WriteItemList( m_Lifted, true );
}
示例14: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteItemList(PetHolders, true);
writer.Write( exit );
}
示例15: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 12 );
// Version 12
writer.Write( c_Free );
// Version 11
writer.Write( (int)c_Murderers );
// Version 10
writer.Write( c_LeaveItems );
// Version 9
writer.Write( c_RentToOwn );
writer.Write( c_OriginalRentTime );
writer.Write( c_RTOPayments );
// Version 7
writer.WriteItemList( c_PreviewItems, true );
// Version 6
writer.Write( c_ItemsPrice );
writer.Write( c_KeepItems );
// Version 5
writer.Write( c_DecoreItemInfos.Count );
foreach( DecoreItemInfo info in c_DecoreItemInfos )
info.Save( writer );
writer.Write( c_Relock );
// Version 4
writer.Write( c_RecurRent );
writer.Write( c_RentByTime );
writer.Write( c_RentTime );
writer.Write( c_DemolishTime );
writer.Write( c_YoungOnly );
writer.Write( c_MinTotalSkill );
writer.Write( c_MaxTotalSkill );
// Version 3
writer.Write( c_MinZ );
writer.Write( c_MaxZ );
// Version 2
writer.Write( c_House );
// Version 1
writer.Write( c_Price );
writer.Write( c_Locks );
writer.Write( c_Secures );
writer.Write( c_BanLoc );
writer.Write( c_SignLoc );
writer.Write( c_Skill );
writer.Write( c_SkillReq );
writer.Write( c_Blocks.Count );
foreach( Rectangle2D rect in c_Blocks )
writer.Write( rect );
}