当前位置: 首页>>代码示例>>C#>>正文


C# GenericReader.ReadMobileList方法代码示例

本文整理汇总了C#中Server.GenericReader.ReadMobileList方法的典型用法代码示例。如果您正苦于以下问题:C# GenericReader.ReadMobileList方法的具体用法?C# GenericReader.ReadMobileList怎么用?C# GenericReader.ReadMobileList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.GenericReader的用法示例。


在下文中一共展示了GenericReader.ReadMobileList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

      public override void Deserialize( GenericReader reader ) 
      { 
         base.Deserialize( reader ); 

         int version = reader.ReadInt(); 
             
         m_Voteds = reader.ReadMobileList(); 
      }    
开发者ID:greeduomacro,项目名称:GoUO,代码行数:8,代码来源:votestone.cs

示例2: Candidate

        public Candidate( GenericReader reader )
        {
            int version = reader.ReadEncodedInt();

            switch ( version )
            {
                case 1:
                    {
                        m_Mobile = reader.ReadMobile();

                        int count = reader.ReadEncodedInt();
                        m_Voters = new ArrayList( count );

                        for ( int i = 0; i < count; ++i )
                        {
                            Voter voter = new Voter( reader, m_Mobile );

                            if ( voter.From != null )
                            {
                                m_Voters.Add( voter );
                            }
                        }

                        break;
                    }
                case 0:
                    {
                        m_Mobile = reader.ReadMobile();

                        ArrayList mobs = reader.ReadMobileList();
                        m_Voters = new ArrayList( mobs.Count );

                        for ( int i = 0; i < mobs.Count; ++i )
                        {
                            m_Voters.Add( new Voter( (Mobile) mobs[i], m_Mobile ) );
                        }

                        break;
                    }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:41,代码来源:Election.cs

示例3: LoadGlobalListens

        public void LoadGlobalListens(GenericReader reader)
        {
            int version = reader.ReadInt();

            c_GIgnores = reader.ReadMobileList();
            c_GListens = reader.ReadMobileList();
        }
开发者ID:guy489,项目名称:runuot2a,代码行数:7,代码来源:Data.cs

示例4: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			int count;

			switch ( version )
			{
				case 14:
				{
					m_RelativeBanLocation = reader.ReadPoint3D();
					goto case 13;
				}
				case 13: // removed ban location serialization
				case 12:
				{
					m_VendorRentalContracts = reader.ReadItemList();
					m_InternalizedVendors = reader.ReadMobileList();

					int relocatedCount = reader.ReadEncodedInt();
					for ( int i = 0; i < relocatedCount; i++ )
					{
						Point3D relLocation = reader.ReadPoint3D();
						IEntity entity = World.FindEntity( reader.ReadInt() );

						if ( entity != null )
							m_RelocatedEntities.Add( new RelocatedEntity( entity, relLocation ) );
					}

					int inventoryCount = reader.ReadEncodedInt();
					for ( int i = 0; i < inventoryCount; i++ )
					{
						VendorInventory inventory = new VendorInventory( this, reader );
						m_VendorInventories.Add( inventory );
					}

					goto case 11;
				}
				case 11:
				{
					m_LastRefreshed = reader.ReadDateTime();
					m_RestrictDecay = reader.ReadBool();
					goto case 10;
				}
				case 10: // just a signal for updates
				case 9:
				{
					m_Visits = reader.ReadInt();
					goto case 8;
				}
				case 8:
				{
					m_Price = reader.ReadInt();
					goto case 7;
				}
				case 7:
				{
					m_Access = reader.ReadMobileList();
					goto case 6;
				}
				case 6:
				{
					m_BuiltOn = reader.ReadDateTime();
					m_LastTraded = reader.ReadDateTime();
					goto case 5;
				}
				case 5: // just removed fields
				case 4:
				{
					m_Addons = reader.ReadItemList();
					goto case 3;
				}
				case 3:
				{
					count = reader.ReadInt();
					m_Secures = new ArrayList( count );

					for ( int i = 0; i < count; ++i )
					{
						SecureInfo info = new SecureInfo( reader );

						if ( info.Item != null )
						{
							info.Item.IsSecure = true;
							m_Secures.Add( info );
						}
					}

					goto case 2;
				}
				case 2:
				{
					m_Public = reader.ReadBool();
					goto case 1;
				}
				case 1:
				{
					if ( version < 13 )
						reader.ReadPoint3D(); // house ban location
//.........这里部分代码省略.........
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:101,代码来源:BaseHouse.cs

示例5: Deserialize


//.........这里部分代码省略.........
                    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.ReadMobileList();
                    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.ReadMobileList();
                    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;
                }
            }

            if ( m_PermaFlags == null )
                m_PermaFlags = new ArrayList();

            if ( m_JusticeProtectors == null )
                m_JusticeProtectors = new ArrayList();
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:67,代码来源:PlayerMobile.cs

示例6: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 4:
                {
                    m_Identified = reader.ReadMobileList();

                    goto case 3;
                }
                case 3:
                {
                    m_Effect = (SpellEffect)reader.ReadInt();
                    m_EffectCharges = reader.ReadInt();
                    if ( version < 4 )
                        /*m_Identified = */reader.ReadBool();
                    goto case 2;
                }
                case 2:
                {
                    m_PlayerConstructed = reader.ReadBool();
                    goto case 1;
                }
                case 1:
                {
                    m_Crafter = reader.ReadMobile();
                    m_Quality = (CraftQuality)reader.ReadInt();
                    break;
                }
                case 0:
                {
                    m_Crafter = null;
                    m_Quality = CraftQuality.Regular;
                    break;
                }
            }

            if ( version < 2 )
                m_PlayerConstructed = false;

            if ( Parent is Mobile && m_Effect != SpellEffect.None && m_EffectCharges > 0 && SpellCastEffect.IsRepeatingEffect( m_Effect ) )
            {
                m_Timer = new CheckTimer( this );
                m_Timer.Start();
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:50,代码来源:BaseClothing.cs

示例7: Deserialize

            public override void Deserialize( GenericReader reader )
            {
                base.Deserialize( reader );

                int version = reader.ReadInt();

                m_Mobiles = reader.ReadMobileList();

                for ( int i = 0; i < m_Mobiles.Count; ++i )
                    ((Mobile)m_Mobiles[i]).Delete();

                m_Mobiles.Clear();

                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();

                m_Table = new Hashtable();
            }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:26,代码来源:GenericBuy.cs

示例8: Deserialize

		public override void Deserialize( GenericReader reader )
		{
            base.Deserialize(reader);
            int version = reader.ReadInt();
            m_market = reader.ReadItemList();
            m_marketmob = reader.ReadMobileList();
		}
开发者ID:greeduomacro,项目名称:annox,代码行数:7,代码来源:MarketEast.cs

示例9: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_TrueForm = reader.ReadBool();
					m_GateItem = reader.ReadItem();
					m_Tentacles = reader.ReadMobileList();

					m_Timer = new TeleportTimer( this );
					m_Timer.Start();

					break;
				}
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:21,代码来源:Harrower.cs

示例10: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            int version = reader.ReadInt();

            switch ( version )
            {
                case 4:
                {
                    m_AllyDeclarations = reader.ReadGuildList();
                    m_AllyInvitations = reader.ReadGuildList();

                    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.ReadGuildList();
                    m_Enemies = reader.ReadGuildList();
                    m_WarDeclarations = reader.ReadGuildList();
                    m_WarInvitations = reader.ReadGuildList();

                    m_Members = reader.ReadMobileList();
                    m_Candidates = reader.ReadMobileList();
                    m_Accepted = reader.ReadMobileList();

                    m_Guildstone = reader.ReadItem();
                    m_Teleporter = reader.ReadItem();

                    m_Charter = reader.ReadString();
                    m_Website = reader.ReadString();

                    break;
                }
            }

            if ( m_AllyDeclarations == null )
                m_AllyDeclarations = new ArrayList();

            if ( m_AllyInvitations == null )
                m_AllyInvitations = new ArrayList();

            if ( m_Guildstone == null || m_Members.Count == 0 )
                Disband();
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:65,代码来源:Guild.cs

示例11: Load

        protected void Load(GenericReader reader)
        {
            int version = reader.ReadInt();

            c_Mobiles = reader.ReadMobileList();
            c_Filter = reader.ReadBool();
            c_Delay = reader.ReadBool();
            c_Name = reader.ReadString();
            c_Style = (ChatStyle)reader.ReadInt();
            c_ToIrc = reader.ReadBool();
            c_NewChars = reader.ReadBool();
            c_ShowStaff = reader.ReadBool();
            c_Enabled = reader.ReadBool();

            int count = reader.ReadInt();
            Mobile m;
            for (int i = 0; i < count; ++i)
            {
                m = reader.ReadMobile();
                if (m != null)
                    c_Colors[m] = reader.ReadInt();
                else
                    reader.ReadInt();
            }

            c_Commands.Clear();
            count = reader.ReadInt();
            for (int i = 0; i < count; ++i)
                c_Commands.Add(reader.ReadString());

            foreach (string str in c_Commands)
                AddCommand(str);

            ArrayList list = new ArrayList();
            foreach(Mobile mob in c_Mobiles)
                if (!list.Contains(mob))
                    list.Add(mob);

            c_Mobiles = new ArrayList(list);
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:40,代码来源:Channel.cs

示例12: Deserialize

		public override void Deserialize( GenericReader reader )
		{
            TimeSpan ts = TimeSpan.Zero;

			base.Deserialize( reader );

			int version = reader.ReadInt();
			
			switch ( version )
			{
				case 3:
					{
						m_LevelScale = reader.ReadDouble();
						goto case 2;
					}
        case 2:
        {
            m_LevelError = (LevelErrors)reader.ReadInt();
            goto case 1;
        }
        case 1:
        {                                      
            ts = reader.ReadDeltaTime() - DateTime.Now;                    
            goto case 0;
        }
				case 0:
				{

					// read it all back in									
					m_Type = ((ChampLevelData.SpawnTypes)reader.ReadInt());

					int a = reader.ReadInt();
					SpawnLevels  = new ArrayList();
					
					// create new level array through deserialise constructors
					for( int i = 0 ; i < a; ++i )
						SpawnLevels.Add( new ChampLevelData( reader ) );	

					m_Monsters = reader.ReadMobileList();
					m_FreeMonsters = reader.ReadMobileList();
					m_LevelCounter = reader.ReadInt();
					m_Kills = reader.ReadInt();
					m_ExpireTime = reader.ReadDateTime();
					m_NavDest = (NavDestinations)reader.ReadInt();
					
					// the bools
					m_bActive = reader.ReadBool();
					m_bGraphics = reader.ReadBool();					

					// if graphics were on remake them thru deserialise constructor
					if( m_bGraphics )
						m_Graphics = new ChampGraphics(this, reader);

					// and the restart...
					m_bRestart = reader.ReadBool();
					m_RestartDelay = reader.ReadTimeSpan();
					
					if( reader.ReadBool() && !m_bActive && m_bRestart )
					{
						// in this case the champ is activley in restart mode, so create new timer
						//pla: 13/01/07
						//changed so we don't lose time on restart
						if (ts == TimeSpan.Zero)
								DoTimer(m_RestartDelay);
						else
								DoTimer(ts);
					}
					else if( m_bActive )
					{					
						// if spawn was active then start the wheels turning...
						StartSlice();
					}
										
					break;
				}
				
			}

		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:79,代码来源:ChampEngine.cs

示例13: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			m_NestSpawnType = reader.ReadString();
			m_Spawn = reader.ReadMobileList();
			m_MaxCount = reader.ReadInt();
			m_RespawnTime = reader.ReadTimeSpan();
			m_HitsMax = reader.ReadInt();
			m_Hits = reader.ReadInt();
			m_RangeHome = reader.ReadInt();
			m_LootLevel = reader.ReadInt();
			m_Entity = reader.ReadMobile();
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:15,代码来源:MonsterNest.cs

示例14: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();
			int count;
			bool idocannc = false;

			m_Region = new HouseRegion(this);

			switch (version)
			{
				case 20:
					{
						m_NPCData = reader.ReadUInt32();
						goto case 19;
					}
				case 19:
					{
						m_RestartDecay = reader.ReadTimeSpan();
						goto case 18;
					}
				case 18:
					{
						m_Flags = (ImplFlags)reader.ReadUInt32();
						goto case 17;
					}
				case 17:
					{
						m_UpgradeCosts = reader.ReadUInt32();
						goto case 16;
					}
				case 16:
					{
						m_LockBoxData = reader.ReadUInt32();
						goto case 15;
					}
				case 15:
					{
						m_SecurePremises = reader.ReadBool();
						goto case 14;
					}
				case 14:
					{
						idocannc = reader.ReadBool();
						goto case 13;
					}
				case 13:
					{
						m_DecayMinutesStored = reader.ReadDouble();
						m_NeverDecay = reader.ReadBool();
						goto case 11; //note, this isn't a mistake - we want to skip 12
					}
				case 12:
					{
						DateTime tempDT = reader.ReadDeltaTime();
						//StructureDecayTime = reader.ReadDeltaTime();
						m_DecayMinutesStored = (tempDT - DateTime.Now).TotalMinutes;

						m_NeverDecay = reader.ReadBool();
						goto case 11;
					}
				case 11:
					{
						m_MaxLockBoxes = reader.ReadInt();
						m_LockBoxCount = reader.ReadInt();

						goto case 9;
					}
				case 10: // just a signal for updates
				case 9:
					{
						m_Visits = reader.ReadInt();
						goto case 8;
					}
				case 8:
					{
						m_Price = reader.ReadInt();
						goto case 7;
					}
				case 7:
					{
						m_Access = reader.ReadMobileList();
						goto case 6;
					}
				case 6:
					{
						m_BuiltOn = reader.ReadDateTime();
						m_LastTraded = reader.ReadDateTime();
						goto case 5;
					}
				case 5: // just removed fields
				case 4:
					{
						m_Addons = reader.ReadItemList();
						goto case 3;
					}
				case 3:
					{
						count = reader.ReadInt();
//.........这里部分代码省略.........
开发者ID:zerodowned,项目名称:angelisland,代码行数:101,代码来源:BaseHouse.cs

示例15: Deserialize


//.........这里部分代码省略.........
                    {
                        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.ReadMobileList();
                    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.ReadMobileList();
                    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:
                {
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:67,代码来源:PlayerMobile.cs


注:本文中的Server.GenericReader.ReadMobileList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。