本文整理汇总了C#中Server.GenericWriter.WriteMobileList方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.WriteMobileList方法的具体用法?C# GenericWriter.WriteMobileList怎么用?C# GenericWriter.WriteMobileList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericWriter
的用法示例。
在下文中一共展示了GenericWriter.WriteMobileList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteMobileList( m_Voteds, true );
}
示例2: Serialize
private static bool Serialize(GenericWriter writer)
{
writer.WriteBlockDictionary(
Registry,
(name, players) =>
{
writer.Write(name);
writer.WriteMobileList(players, true);
});
return true;
}
示例3: SaveGlobalListens
public void SaveGlobalListens(GenericWriter writer)
{
writer.Write(1); // Version
writer.WriteMobileList(c_GIgnores, true);
writer.WriteMobileList(c_GListens, true);
}
示例4: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
writer.WriteMobileList<Mobile>( m_Spawned );
}
示例5: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
//ARTEGORDONMOD
// changed from version 13 to version 14
writer.Write( (int) 14 ); // version
writer.Write( (int)m_CurrentAI );
writer.Write( (int)m_DefaultAI );
writer.Write( (int)m_iRangePerception );
writer.Write( (int)m_iRangeFight );
writer.Write( (int)m_iTeam );
writer.Write( (double)m_dActiveSpeed );
writer.Write( (double)m_dPassiveSpeed );
writer.Write( (double)m_dCurrentSpeed );
writer.Write( (int) m_pHome.X );
writer.Write( (int) m_pHome.Y );
writer.Write( (int) m_pHome.Z );
// Version 1
writer.Write( (int) m_iRangeHome );
int i=0;
writer.Write( (int) m_arSpellAttack.Count );
for ( i=0; i< m_arSpellAttack.Count; i++ )
{
writer.Write( m_arSpellAttack[i].ToString() );
}
writer.Write( (int) m_arSpellDefense.Count );
for ( i=0; i< m_arSpellDefense.Count; i++ )
{
writer.Write( m_arSpellDefense[i].ToString() );
}
// Version 2
writer.Write( (int) m_FightMode );
writer.Write( (bool) m_bControled );
writer.Write( (Mobile) m_ControlMaster );
writer.Write( (Mobile) m_ControlTarget );
writer.Write( (Point3D) m_ControlDest );
writer.Write( (int) m_ControlOrder );
writer.Write( (double) m_dMinTameSkill );
// Removed in version 9
//writer.Write( (double) m_dMaxTameSkill );
writer.Write( (bool) m_bTamable );
writer.Write( (bool) m_bSummoned );
if ( m_bSummoned )
writer.WriteDeltaTime( m_SummonEnd );
writer.Write( (int) m_iControlSlots );
// Version 3
writer.Write( (int)m_Loyalty );
// Version 4
writer.Write( m_CurrentWayPoint );
// Verison 5
writer.Write( m_SummonMaster );
// Version 6
writer.Write( (int) m_HitsMax );
writer.Write( (int) m_StamMax );
writer.Write( (int) m_ManaMax );
writer.Write( (int) m_DamageMin );
writer.Write( (int) m_DamageMax );
// Version 7
writer.Write( (int) m_PhysicalResistance );
writer.Write( (int) m_PhysicalDamage );
writer.Write( (int) m_FireResistance );
writer.Write( (int) m_FireDamage );
writer.Write( (int) m_ColdResistance );
writer.Write( (int) m_ColdDamage );
writer.Write( (int) m_PoisonResistance );
writer.Write( (int) m_PoisonDamage );
writer.Write( (int) m_EnergyResistance );
writer.Write( (int) m_EnergyDamage );
// Version 8
writer.WriteMobileList( m_Owners, true );
// Version 10
writer.Write( (bool) m_IsDeadPet );
writer.Write( (bool) m_IsBonded );
writer.Write( (DateTime) m_BondingBegin );
writer.Write( (DateTime) m_OwnerAbandonTime );
//.........这里部分代码省略.........
示例6: Serialize
public override void Serialize( GenericWriter writer )
{
//cleanup our anti-macro table
foreach ( Hashtable t in m_AntiMacroTable.Values )
{
ArrayList remove = new ArrayList();
foreach ( CountAndTimeStamp time in t.Values )
{
if ( time.TimeStamp + SkillCheck.AntiMacroExpire <= DateTime.Now )
remove.Add( time );
}
for (int i=0;i<remove.Count;++i)
t.Remove( remove[i] );
}
if ( m_NextBountyDecay != DateTime.MinValue )
{
bool update = false;
while ( m_Bounty > 0 && m_NextBountyDecay < DateTime.Now )
{
update = true;
m_Bounty -= 100;
m_NextBountyDecay += TimeSpan.FromDays( 1.0 );
}
if ( m_Bounty < 0 )
m_Bounty = 0;
if ( update )
BountyBoard.Update( this );
}
base.Serialize( writer );
writer.Write( (int) 18 ); // version
writer.Write( m_NextBountyDecay );
writer.Write( m_LastUpdate );
writer.Write( m_LastLogin );
writer.Write( m_NextNotoUp );
writer.Write( m_Cohesion );
writer.Write( (TimeSpan)(DateTime.Now - m_LastCohesion) );
writer.Write( m_AssumeGhost );
writer.Write( (byte)m_SkillUsageOrder.Length );
for(int i=0;i<m_SkillUsageOrder.Length;i++)
writer.Write( (byte)m_SkillUsageOrder[i] );
writer.Write( (int) m_Bounty );
writer.WriteEncodedInt( m_CompassionGains );
if ( m_CompassionGains > 0 )
writer.WriteDeltaTime( m_NextCompassionDay );
bool useMods = ( m_HairModID != -1 || m_BeardModID != -1 );
writer.Write( useMods );
if ( useMods )
{
writer.Write( (int) m_HairModID );
writer.Write( (int) m_HairModHue );
writer.Write( (int) m_BeardModID );
writer.Write( (int) m_BeardModHue );
}
writer.Write( SavagePaintExpiration );
writer.Write( (int) m_NpcGuild );
writer.Write( (DateTime) m_NpcGuildJoinTime );
writer.Write( (TimeSpan) m_NpcGuildGameTime );
writer.WriteMobileList( m_PermaFlags, true );
writer.Write( NextTailorBulkOrder );
writer.Write( NextSmithBulkOrder );
writer.WriteDeltaTime( m_LastJusticeLoss );
writer.WriteMobileList( m_JusticeProtectors, true );
writer.WriteDeltaTime( m_LastSacrificeGain );
writer.WriteDeltaTime( m_LastSacrificeLoss );
writer.Write( m_AvailableResurrects );
writer.Write( (int) m_Flags );
writer.Write( m_LongTermElapse );
writer.Write( m_ShortTermElapse );
writer.Write( this.GameTime );
}
示例7: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 4 ); // version
writer.WriteMobileList( m_Identified, true );
writer.Write( (int)m_Effect );
writer.Write( (int)m_EffectCharges );
//writer.Write( m_Identified );
writer.Write( (bool) m_PlayerConstructed );
writer.Write( (Mobile) m_Crafter );
writer.Write( (int) m_Quality );
}
示例8: Serialize
public virtual void Serialize( GenericWriter writer )
{
writer.Write( (int) 28 ); // version
writer.WriteDeltaTime( m_LastStatGain );
writer.Write( (int) m_TithingPoints );
writer.Write( m_Corpse );
writer.Write( m_CreationTime );
writer.WriteMobileList( m_Stabled, true );
writer.Write( m_CantWalk );
VirtueInfo.Serialize( writer, m_Virtues );
writer.Write( m_Thirst );
writer.Write( m_BAC );
writer.Write( m_ShortTermMurders );
//writer.Write( m_ShortTermElapse );
//writer.Write( m_LongTermElapse );
//writer.Write( m_Followers );
writer.Write( m_FollowersMax );
writer.Write( m_MagicDamageAbsorb );
writer.Write( m_GuildFealty );
writer.Write( m_Guild );
writer.Write( m_DisplayGuildTitle );
writer.Write( m_CanSwim );
writer.Write( m_Squelched );
writer.Write( m_Holding );
writer.Write( m_VirtualArmor );
writer.Write( m_BaseSoundID );
writer.Write( m_DisarmReady );
writer.Write( m_StunReady );
//Poison.Serialize( m_Poison, writer );
writer.Write( m_StatCap );
writer.Write( m_NameHue );
writer.Write( m_Hunger );
writer.Write( m_Location );
writer.Write( (int) m_Body );
writer.Write( m_Name );
writer.Write( m_GuildTitle );
writer.Write( m_Criminal );
writer.Write( m_Kills );
writer.Write( m_SpeechHue );
writer.Write( m_EmoteHue );
writer.Write( m_WhisperHue );
writer.Write( m_YellHue );
writer.Write( m_Language );
writer.Write( m_Female );
writer.Write( m_Warmode );
writer.Write( m_Hidden );
writer.Write( (byte) m_Direction );
writer.Write( m_Hue );
writer.Write( m_Str );
writer.Write( m_Dex );
writer.Write( m_Int );
writer.Write( m_Hits );
writer.Write( m_Stam );
writer.Write( m_Mana );
writer.Write( m_Map );
writer.Write( m_Blessed );
writer.Write( m_Fame );
writer.Write( m_Karma );
writer.Write( (byte) m_AccessLevel );
m_Skills.Serialize( writer );
writer.Write( m_Items.Count );
for ( int i = 0; i < m_Items.Count; ++i )
writer.Write( (Item)m_Items[i] );
writer.Write( m_Player );
writer.Write( m_Title );
writer.Write( m_Profile );
writer.Write( m_ProfileLocked );
//writer.Write( m_LightLevel );
//writer.Write( m_TotalGold );
//writer.Write( m_TotalWeight );
//.........这里部分代码省略.........
示例9: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( (bool) ( m_Tasters != null && m_Tasters.Count > 0 ) );
if ( m_Tasters != null && m_Tasters.Count > 0 )
writer.WriteMobileList( m_Tasters, true );
writer.Write( (int) m_PotionEffect );
}
示例10: Serialize
// public void On
/// <summary>
/// Serializes the specified writer.
/// </summary>
/// <param name="writer">The writer.</param>
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)3); // version
writer.Write(m_LastAnnounceTime);
writer.WriteMobileList<PlayerMobile>(new List<PlayerMobile>(m_ShopperQueue));
writer.WriteMobileList<PlayerMobile>(new List<PlayerMobile>(m_VisitorQueue));
writer.Write((int)m_City);
writer.WriteItemList<ChampKinCity>(m_Champs);
}
示例11: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
// version 0
writer.WriteMobileList<Mobile>(m_mobiles, true);
writer.WriteItemList<Item>(m_items, true);
}
示例12: Serialize
public override void Serialize( GenericWriter writer )
{
if ( this.LastFealty+TimeSpan.FromDays( 1.0 ) < DateTime.Now )
this.CalculateGuildmaster();
writer.Write( (int) 4 );//version
writer.WriteGuildList( m_AllyDeclarations, true );
writer.WriteGuildList( m_AllyInvitations, true );
writer.Write( m_TypeLastChange );
writer.Write( (int)m_Type );
writer.Write( m_LastFealty );
writer.Write( m_Leader );
writer.Write( m_Name );
writer.Write( m_Abbreviation );
writer.WriteGuildList( m_Allies, true );
writer.WriteGuildList( m_Enemies, true );
writer.WriteGuildList( m_WarDeclarations, true );
writer.WriteGuildList( m_WarInvitations, true );
writer.WriteMobileList( m_Members, true );
writer.WriteMobileList( m_Candidates, true );
writer.WriteMobileList( m_Accepted, true );
writer.Write( m_Guildstone );
writer.Write( m_Teleporter );
writer.Write( m_Charter );
writer.Write( m_Website );
}
示例13: Save
protected void Save(GenericWriter writer)
{
writer.Write(1); // Version
writer.WriteMobileList(c_Mobiles, true);
writer.Write(c_Filter);
writer.Write(c_Delay);
writer.Write(c_Name);
writer.Write((int)c_Style);
writer.Write(c_ToIrc);
writer.Write(c_NewChars);
writer.Write(c_ShowStaff);
writer.Write(c_Enabled);
writer.Write(c_Colors.Count);
foreach(Mobile m in c_Colors.Keys)
{
writer.Write(m);
writer.Write((int)c_Colors[m]);
}
writer.Write(c_Commands.Count);
foreach (string str in c_Commands)
writer.Write(str);
}
示例14: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (Mobile) m_Peerless );
writer.Write( (Point3D) m_BossLocation );
writer.Write( (Point3D) m_TeleportDest );
writer.Write( (Point3D) m_ExitDest );
writer.Write( (DateTime) m_Deadline );
// serialize master keys
writer.WriteItemList( m_MasterKeys );
// serialize fighters
writer.WriteMobileList( m_Fighters );
// serialize pets
writer.Write( (int) m_Pets.Count );
foreach ( KeyValuePair<Mobile,List<Mobile>> pair in m_Pets )
{
writer.Write( (Mobile) pair.Key );
writer.WriteMobileList( pair.Value );
}
writer.Write( (bool) m_Spawned );
}
示例15: Serialize
//Serialize
#region serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize (writer);
writer.Write( (int) 3 ); // version
// version 3
writer.Write((double)m_LevelScale); // errors for this level
// version 2
writer.Write( (int)m_LevelError ); // errors for this level
// version 1
writer.WriteDeltaTime(m_End); //Next spawn time
// first up is the spawn data // version 0
writer.Write( (int)m_Type );
writer.Write( (int)SpawnLevels.Count );
foreach( ChampLevelData data in SpawnLevels )
data.Serialize(writer);
//now the monsters + misc data
writer.WriteMobileList ( m_Monsters );
writer.WriteMobileList( m_FreeMonsters );
writer.Write( (int)m_LevelCounter );
writer.Write( (int)m_Kills );
writer.Write((DateTime) m_ExpireTime );
// nav dest
writer.Write( (int)m_NavDest );
// the bools
writer.Write( (bool)m_bActive );
//pla: 02/11/07
//Check here incase the altar or platform has been deleted.
//in which case we just set the grpahics to false and they can be
//switched back on on reload. Prevents the champ from crashing on load
//if the gfx were accidentally deleted through [delete
/////////////////////////////////////////////////////////////////////
if (m_bGraphics && !m_Graphics.IsHealthy())
{
//call delete code as these save on world save anyway
m_Graphics.Delete();
m_bGraphics = false;
}
writer.Write( (bool)m_bGraphics );
// NavDest
// the altar and platform
if( m_bGraphics )
{
m_Graphics.Serialize( writer );
}
writer.Write( (bool)m_bRestart );
writer.Write( m_RestartDelay );
// And finally if the restart timer is currently on or not, and the delay value.
writer.Write( m_Restart != null );
}