本文整理汇总了C#中Server.GenericReader.ReadMobileListOrNull方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadMobileListOrNull方法的具体用法?C# GenericReader.ReadMobileListOrNull怎么用?C# GenericReader.ReadMobileListOrNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.GenericReader
的用法示例。
在下文中一共展示了GenericReader.ReadMobileListOrNull方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize( GenericReader reader )
{
int version = reader.ReadInt();
switch ( version )
{
case 28:
{
m_LastStatGain = reader.ReadDeltaTime();
goto case 27;
}
case 27:
{
m_TithingPoints = reader.ReadInt();
goto case 26;
}
case 26:
case 25:
case 24:
{
m_Corpse = reader.ReadItem() as Container;
goto case 23;
}
case 23:
{
m_CreationTime = reader.ReadDateTime();
goto case 22;
}
case 22: // Just removed followers
case 21:
{
m_Stabled = reader.ReadMobileListOrNull();
goto case 20;
}
case 20:
{
m_CantWalk = reader.ReadBool();
goto case 19;
}
case 19: // Just removed variables
case 18:
{
m_Virtues = VirtueInfo.Deserialize( reader );
goto case 17;
}
case 17:
{
m_Thirst = reader.ReadInt();
m_BAC = reader.ReadInt();
goto case 16;
}
case 16:
{
m_ShortTermMurders = reader.ReadInt();
if ( version <= 24 )
{
reader.ReadDateTime();
reader.ReadDateTime();
}
goto case 15;
}
case 15:
{
if ( version < 22 )
reader.ReadInt(); // followers
m_FollowersMax = reader.ReadInt();
goto case 14;
}
case 14:
{
m_MagicDamageAbsorb = reader.ReadInt();
goto case 13;
}
case 13:
{
m_GuildFealty = reader.ReadMobile();
goto case 12;
}
case 12:
{
m_Guild = reader.ReadGuild();
goto case 11;
}
case 11:
{
//.........这里部分代码省略.........
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
/*int version = */reader.ReadInt();
m_Mobiles = reader.ReadMobileListOrNull();
if (m_Mobiles != null) {
for ( int i = 0; i < m_Mobiles.Count; ++i )
((Mobile)m_Mobiles[i]).Delete();
m_Mobiles.Clear();
m_Mobiles = null;
}
for ( int i = Items.Count - 1; i >= 0; --i )
{
if ( i < Items.Count )
((Item)Items[i]).Delete();
}
if ( m_Cache == null )
m_Cache = this;
else
Delete();
}
示例3: Deserialize
//.........这里部分代码省略.........
m_dMinTameSkill = reader.ReadDouble();
if ( version < 9 )
reader.ReadDouble();
m_bTamable = reader.ReadBool();
m_bSummoned = reader.ReadBool();
if ( m_bSummoned )
{
m_SummonEnd = reader.ReadDeltaTime();
new UnsummonTimer( m_ControlMaster, this, m_SummonEnd - Core.Now ).Start();
}
m_iControlSlots = reader.ReadInt();
}
else
{
m_FightMode = FightMode.Closest;
m_bControled = false;
m_ControlMaster = null;
m_ControlTarget = null;
m_ControlOrder = OrderType.None;
}
if ( version >= 3 )
m_Loyalty = (PetLoyalty)reader.ReadInt();
else
m_Loyalty = PetLoyalty.WonderfullyHappy;
if ( version >= 4 )
m_CurrentWayPoint = reader.ReadItem() as WayPoint;
if ( version >= 5 )
m_SummonMaster = reader.ReadMobile();
if ( version >= 6 )
{
m_HitsMax = reader.ReadInt();
m_StamMax = reader.ReadInt();
m_ManaMax = reader.ReadInt();
m_DamageMin = reader.ReadInt();
m_DamageMax = reader.ReadInt();
}
if ( version >= 7 )
{
m_PhysicalResistance = reader.ReadInt();
m_PhysicalDamage = reader.ReadInt();
m_FireResistance = reader.ReadInt();
m_FireDamage = reader.ReadInt();
m_ColdResistance = reader.ReadInt();
m_ColdDamage = reader.ReadInt();
m_PoisonResistance = reader.ReadInt();
m_PoisonDamage = reader.ReadInt();
m_EnergyResistance = reader.ReadInt();
m_EnergyDamage = reader.ReadInt();
}
if ( version >= 8 )
m_Owners = reader.ReadMobileListOrNull();
if ( version >= 10 )
{
m_IsDeadPet = reader.ReadBool();
m_IsBonded = reader.ReadBool();
m_BondingBegin = reader.ReadDateTime();
m_OwnerAbandonTime = reader.ReadDateTime();
}
if ( version >= 11 )
m_HasGeneratedLoot = reader.ReadBool();
else
m_HasGeneratedLoot = true;
if ( version >= 12 )
m_Paragon = reader.ReadBool();
else
m_Paragon = false;
if ( version >= 13 && reader.ReadBool() )
m_Friends = reader.ReadMobileList();
else if ( version < 13 && m_ControlOrder >= OrderType.Unfriend )
++m_ControlOrder;
CheckStatTimers();
ChangeAIType(m_CurrentAI);
AddFollowers();
if ( IsAnimatedDead )
Spells.Necromancy.AnimateDeadSpell.Register( m_SummonMaster, this );
}
示例4: Deserialize
//.........这里部分代码省略.........
}
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;
}
goto case 8;
}
case 8:
{
m_NpcGuild = (NpcGuild)reader.ReadInt();
m_NpcGuildJoinTime = reader.ReadDateTime();
m_NpcGuildGameTime = reader.ReadTimeSpan();
goto case 7;
}
case 7:
{
m_PermaFlags = reader.ReadMobileListOrNull();
goto case 6;
}
case 6:
{
NextTailorBulkOrder = reader.ReadTimeSpan();
goto case 5;
}
case 5:
{
NextSmithBulkOrder = reader.ReadTimeSpan();
goto case 4;
}
case 4:
{
m_LastJusticeLoss = reader.ReadDeltaTime();
m_JusticeProtectors = reader.ReadMobileListOrNull();
goto case 3;
}
case 3:
{
m_LastSacrificeGain = reader.ReadDeltaTime();
m_LastSacrificeLoss = reader.ReadDeltaTime();
m_AvailableResurrects = reader.ReadInt();
goto case 2;
}
case 2:
{
m_Flags = (PlayerFlag)reader.ReadInt();
goto case 1;
}
case 1:
{
m_LongTermElapse = reader.ReadTimeSpan();
m_ShortTermElapse = reader.ReadTimeSpan();
m_GameTime = reader.ReadTimeSpan();
goto case 0;
}
case 0:
{
break;
}
}
// Professions weren't verified on 1.0 RC0
if ( !CharacterCreation.VerifyProfession( m_Profession ) )
m_Profession = 0;
if ( m_BOBFilter == null )
m_BOBFilter = new Engines.BulkOrders.BOBFilter();
IList list = this.StabledOrNull;
for (int i = 0; list != null && i < list.Count; ++i)
{
BaseCreature bc = list[i] as BaseCreature;
if ( bc != null )
bc.IsStabled = true;
}
}
示例5: Deserialize
public override void Deserialize( GenericReader reader )
{
int version = reader.ReadInt();
switch ( version )
{
case 4:
{
m_AllyDeclarations = reader.ReadGuildListOrNull();
m_AllyInvitations = reader.ReadGuildListOrNull();
goto case 3;
}
case 3:
{
m_TypeLastChange = reader.ReadDateTime();
goto case 2;
}
case 2:
{
m_Type = (GuildType)reader.ReadInt();
goto case 1;
}
case 1:
{
m_LastFealty = reader.ReadDateTime();
goto case 0;
}
case 0:
{
m_Leader = reader.ReadMobile();
m_Name = reader.ReadString();
m_Abbreviation = reader.ReadString();
m_Allies = reader.ReadGuildListOrNull();
m_Enemies = reader.ReadGuildListOrNull();
m_WarDeclarations = reader.ReadGuildListOrNull();
m_WarInvitations = reader.ReadGuildListOrNull();
m_Members = reader.ReadMobileList();
m_Candidates = reader.ReadMobileListOrNull();
m_Accepted = reader.ReadMobileListOrNull();
m_Guildstone = reader.ReadItem();
m_Teleporter = reader.ReadItem();
m_Charter = reader.ReadString();
m_Website = reader.ReadString();
break;
}
}
if ( m_Guildstone == null || m_Members.Count == 0 )
Disband();
}