本文整理汇总了C#中Server.GenericWriter.WriteDeltaTime方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.WriteDeltaTime方法的具体用法?C# GenericWriter.WriteDeltaTime怎么用?C# GenericWriter.WriteDeltaTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericWriter
的用法示例。
在下文中一共展示了GenericWriter.WriteDeltaTime方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteDeltaTime( m_End );
}
示例2: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (Mobile) m_Owner );
writer.Write( (Mobile) m_Killer );
writer.WriteDeltaTime( m_TimeOfDeath );
}
示例3: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write(m_Decays);
if (m_Decays)
writer.WriteDeltaTime(m_DecayTime);
}
示例4: 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 );
//.........这里部分代码省略.........
示例5: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)4); // version
writer.Write(m_WalkingRange);
writer.Write(m_SpawnID);
writer.Write(m_CountA);
writer.Write(m_CountB);
writer.Write(m_CountC);
writer.Write(m_CountD);
writer.Write(m_CountE);
writer.Write(m_WayPoint);
writer.Write(m_Group);
writer.Write(m_MinDelay);
writer.Write(m_MaxDelay);
writer.Write(m_Count);
writer.Write(m_Team);
writer.Write(m_HomeRange);
writer.Write(m_Running);
if (m_Running)
writer.WriteDeltaTime(m_End);
writer.Write(m_CreaturesName.Count);
for (int i = 0; i < m_CreaturesName.Count; ++i)
writer.Write(m_CreaturesName[i]);
writer.Write(m_CreaturesNameA.Count);
for (int i = 0; i < m_CreaturesNameA.Count; ++i)
writer.Write((string)m_CreaturesNameA[i]);
writer.Write(m_CreaturesNameB.Count);
for (int i = 0; i < m_CreaturesNameB.Count; ++i)
writer.Write((string)m_CreaturesNameB[i]);
writer.Write(m_CreaturesNameC.Count);
for (int i = 0; i < m_CreaturesNameC.Count; ++i)
writer.Write((string)m_CreaturesNameC[i]);
writer.Write(m_CreaturesNameD.Count);
for (int i = 0; i < m_CreaturesNameD.Count; ++i)
writer.Write((string)m_CreaturesNameD[i]);
writer.Write(m_CreaturesNameE.Count);
for (int i = 0; i < m_CreaturesNameE.Count; ++i)
writer.Write((string)m_CreaturesNameE[i]);
writer.Write(m_Creatures.Count);
for (int i = 0; i < m_Creatures.Count; ++i)
{
IEntity e = m_Creatures[i];
if (e is Item)
writer.Write((Item)e);
else if (e is Mobile)
writer.Write((Mobile)e);
else
writer.Write(Serial.MinusOne);
}
writer.Write(m_CreaturesA.Count);
for (int i = 0; i < m_CreaturesA.Count; ++i)
{
IEntity e = m_CreaturesA[i];
if (e is Item)
writer.Write((Item)e);
else if (e is Mobile)
writer.Write((Mobile)e);
else
writer.Write(Serial.MinusOne);
}
writer.Write(m_CreaturesB.Count);
for (int i = 0; i < m_CreaturesB.Count; ++i)
{
IEntity e = m_CreaturesB[i];
if (e is Item)
writer.Write((Item)e);
else if (e is Mobile)
writer.Write((Mobile)e);
else
writer.Write(Serial.MinusOne);
}
//.........这里部分代码省略.........
示例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]);
}
//decay our kills
if (m_ShortTermElapse < this.GameTime)
{
m_ShortTermElapse += TimeSpan.FromHours(8);
if (ShortTermMurders > 0)
--ShortTermMurders;
}
if (m_LongTermElapse < this.GameTime)
{
m_LongTermElapse += TimeSpan.FromHours(40);
if (Kills > 0)
--Kills;
}
CheckAtrophies(this);
base.Serialize(writer);
writer.Write((int)26); // version
#region GeNova: Mondain's Legacy version 26
QuestWriter.Quests(writer, m_Quests);
QuestWriter.Chains(writer, m_Chains);
if (m_Collections == null)
{
writer.Write((int)0);
}
else
{
writer.Write((int)m_Collections.Count);
foreach (KeyValuePair<Collection, int> pair in m_Collections)
{
writer.Write((int)pair.Key);
writer.Write((int)pair.Value);
}
}
if (m_CollectionTitles == null)
{
writer.Write((int)0);
}
else
{
writer.Write((int)m_CollectionTitles.Count);
for (int i = 0; i < m_CollectionTitles.Count; i++)
QuestWriter.Object(writer, m_CollectionTitles[i]);
}
writer.Write((int)m_SelectedTitle);
writer.Write((DateTime)m_Peaced);
#endregion
if (m_AcquiredRecipes == null)
{
writer.Write((int)0);
}
else
{
writer.Write(m_AcquiredRecipes.Count);
foreach (KeyValuePair<int, bool> kvp in m_AcquiredRecipes)
{
writer.Write(kvp.Key);
writer.Write(kvp.Value);
}
}
writer.WriteDeltaTime(m_LastHonorLoss);
ChampionTitleInfo.Serialize(writer, m_ChampionTitles);
writer.Write(m_LastValorLoss);
writer.WriteEncodedInt(m_ToTItemsTurnedIn);
writer.Write(m_ToTTotalMonsterFame); //This ain't going to be a small #.
writer.WriteEncodedInt(m_AllianceMessageHue);
writer.WriteEncodedInt(m_GuildMessageHue);
writer.WriteEncodedInt(m_GuildRank.Rank);
writer.Write(m_LastOnline);
//.........这里部分代码省略.........
示例7: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)4 ); // version
writer.Write( m_ConfinedRoaming );
writer.WriteItem<IdolOfTheChampion>( 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.Write( m_Creatures, true );
writer.Write( m_RedSkulls, true );
writer.Write( m_WhiteSkulls, true );
writer.WriteItem<ChampionPlatform>( m_Platform );
writer.WriteItem<ChampionAltar>( 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 );
}
示例8: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( (bool) BaseHouse.NewVendorSystem );
writer.Write( (string) m_ShopName );
writer.WriteDeltaTime( (DateTime) m_NextPayTime );
writer.Write( (Item) House );
writer.Write( (Mobile) m_Owner );
writer.Write( (int) m_BankAccount );
writer.Write( (int) m_HoldGold );
writer.Write( (int) m_SellItems.Count );
foreach ( VendorItem vi in m_SellItems.Values )
{
writer.Write( (Item) vi.Item );
writer.Write( (int) vi.Price );
writer.Write( (string) vi.Description );
writer.Write( (DateTime) vi.Created );
}
}
示例9: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)5); // version
writer.Write(m_DamageEntries.Count);
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
writer.Write(kvp.Key);
writer.Write(kvp.Value);
}
writer.Write(m_ConfinedRoaming);
writer.WriteItem<IdolOfTheChampion>(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.Write(m_Creatures, true);
writer.Write(m_RedSkulls, true);
writer.Write(m_WhiteSkulls, true);
writer.WriteItem<ChampionPlatform>(m_Platform);
writer.WriteItem<ChampionAltar>(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);
}
示例10: 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
//.........这里部分代码省略.........
示例11: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.WriteDeltaTime( m_NextWoolTime );
}
示例12: 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 );
}
示例13: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 11 ); // version
writer.Write( (int)m_Flags );
writer.WriteDeltaTime( m_TimeOfDeath );
List<KeyValuePair<Item, Point3D>> list = ( m_RestoreTable == null ? null : new List<KeyValuePair<Item, Point3D>>( m_RestoreTable ) );
int count = ( list == null ? 0 : list.Count );
writer.Write( count );
for ( int i = 0; i < count; ++i )
{
KeyValuePair<Item, Point3D> kvp = list[i];
Item item = kvp.Key;
Point3D loc = kvp.Value;
writer.Write( item );
if ( item.Location == loc )
{
writer.Write( false );
}
else
{
writer.Write( true );
writer.Write( loc );
}
}
writer.Write( m_DecayTimer != null );
if ( m_DecayTimer != null )
writer.WriteDeltaTime( m_DecayTime );
writer.Write( m_Looters );
writer.Write( m_Killer );
writer.Write( m_Aggressors );
writer.Write( m_Owner );
writer.Write( (string) m_CorpseName );
writer.Write( (int) m_AccessLevel );
writer.Write( (Guild) m_Guild );
writer.Write( (int) m_Kills );
writer.Write( m_EquipItems );
}
示例14: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_Crafter );
writer.WriteEncodedInt( (int) m_Quality );
writer.WriteEncodedInt( (int) m_Resource );
writer.Write( m_BurntOut );
writer.Write( m_Burning );
writer.Write( m_Duration );
writer.Write( m_Protected );
if ( m_Burning && m_Duration != TimeSpan.Zero )
writer.WriteDeltaTime( m_End );
}
示例15: Serialize
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.WriteItemList( m_Items, true );
writer.WriteMobileList( m_Mobiles, true );
writer.WriteDeltaTime( m_DecayTime );
}