本文整理汇总了C#中GenericWriter.WriteMobile方法的典型用法代码示例。如果您正苦于以下问题:C# GenericWriter.WriteMobile方法的具体用法?C# GenericWriter.WriteMobile怎么用?C# GenericWriter.WriteMobile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericWriter
的用法示例。
在下文中一共展示了GenericWriter.WriteMobile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.WriteMobile(Owner);
writer.Write(OverallScore);
writer.Write(SpecificPortalScores.Count);
if (SpecificPortalScores.Count > 0)
{
foreach (KeyValuePair<PortalSerial, int> kvp in SpecificPortalScores)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
}
break;
}
}
示例2: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.WriteMobile(m_Player);
}
示例3: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(1); // version
writer.Write(m_Recipe);
writer.Write(m_MobileList.Count);
foreach (KeyValuePair<Serial, Mobile> keyValuePair in m_MobileList)
writer.WriteMobile(keyValuePair.Value);
}
示例4: Serialize
/// <summary>
/// Serialization
/// </summary>
public virtual void Serialize( GenericWriter writer )
{
writer.Write((int)0); //version
writer.WriteMobile<Player>(Player);
writer.Write((int)Expenditures.Count);
foreach( EoCExpenditure exp in Expenditures )
{
writer.Write(exp.GetType().FullName);
exp.Serialize(writer);
}
}
示例5: SerializePlayerProfiles
private static bool SerializePlayerProfiles(GenericWriter writer)
{
writer.SetVersion(0);
writer.WriteBlockDictionary(
PlayerProfiles,
(pm, p) =>
{
writer.WriteMobile(pm);
p.Serialize(writer);
});
return true;
}
示例6: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(2);
switch (version)
{
case 2:
{
writer.Write(Tier1Cap);
writer.Write(Tier2Cap);
writer.Write(Tier3Cap);
writer.Write(Tier4Cap);
writer.Write(Tier5Cap);
writer.Write(Tier6Cap);
writer.Write(Tier7Cap);
writer.Write(Tier8Cap);
writer.Write(Tier9Cap);
writer.Write(Tier10Cap);
}
goto case 1;
case 1:
{
writer.Write(DragonBossDamage);
}
goto case 0;
case 0:
{
writer.WriteMobile(Owner);
writer.Write(OverallScore);
writer.Write(SpendablePoints);
writer.Write(Kills);
writer.Write(Deaths);
writer.Write(ZombieAvatar);
writer.Write(Active);
writer.Write(ZombieSavePoint);
writer.Write(ZombieKills.Count);
if (ZombieKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in ZombieKills)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
writer.Write(DaemonKills.Count);
if (DaemonKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in DaemonKills)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
writer.Write(FeyKills.Count);
if (FeyKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in FeyKills)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
writer.Write(GoreFiendKills.Count);
if (GoreFiendKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in GoreFiendKills)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
writer.Write(TentacleKills.Count);
if (TentacleKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in TentacleKills)
{
kvp.Key.Serialize(writer);
writer.Write(kvp.Value);
}
}
writer.Write(TreefellowKills.Count);
if (TreefellowKills.Count > 0)
{
foreach (KeyValuePair<ZombieInstanceSerial, int> kvp in TreefellowKills)
{
kvp.Key.Serialize(writer);
//.........这里部分代码省略.........
示例7: Serialize
/// <summary>
/// Serializes the context data
/// </summary>
public void Serialize( GenericWriter writer )
{
writer.Write((int)0);
writer.WriteMobile<Player>(Player);
writer.Write(_boats);
writer.Write(_lastLogin);
writer.Write(_mountedSteps);
writer.Write(_walkingSteps);
}
示例8: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(1);
switch (version)
{
case 1:
writer.WriteMobile(Pet);
goto case 0;
case 0:
break;
}
}
示例9: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.WriteMobile(Owner);
writer.WriteBlockList(Titles, CustomTitles.WriteTitle);
writer.WriteBlockList(Hues, CustomTitles.WriteTitleHue);
CustomTitles.WriteTitle(writer, SelectedTitle);
CustomTitles.WriteTitleHue(writer, SelectedHue);
}
break;
}
}
示例10: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
//Version 1
if (House == null || House.Deleted)
{
writer.Write(false);
YardSystem.AddOrphanedItem(this);
}
else
{
writer.Write(true);
writer.Write(House);
}
//Version 0
writer.WriteMobile(Placer);
writer.Write(Price);
writer.WriteItemList(Pieces);
}
示例11: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.WriteMobile(this.m_DeadPlayer);
}
示例12: Serialize
public void Serialize( GenericWriter writer )
{
// Version info is written in MLQuestPersistence.Serialize
writer.WriteMobile<PlayerMobile>( m_Owner );
writer.Write( m_QuestInstances.Count );
foreach ( MLQuestInstance instance in m_QuestInstances )
instance.Serialize( writer );
writer.Write( m_DoneQuests.Count );
foreach ( MLDoneQuestInfo info in m_DoneQuests )
info.Serialize( writer );
writer.Write( m_ChainOffers.Count );
foreach ( MLQuest quest in m_ChainOffers )
MLQuestSystem.WriteQuestRef( writer, quest );
writer.WriteEncodedInt( (int)m_Flags );
}
示例13: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(0);
switch (version)
{
case 0:
{
writer.WriteMobile(Pet);
writer.Write((int)m_CommandCharges);
writer.Write((int)m_LoyaltyCharges);
writer.Write(Activated);
}
break;
}
}
示例14: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
int version = writer.SetVersion(1);
switch (version)
{
case 1:
writer.WriteMobile(BoundToMobile);
goto case 0;
case 0:
writer.Write(RawTitle);
break;
}
}
示例15: Serialize
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
writer.WriteMobile(Owner);
}