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


C# GenericReader.ReadGuild方法代码示例

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


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

示例1: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_Guild = reader.ReadGuild() as Server.Guilds.Guild;

                    goto case 0;
                }
                case 0:
                {
                    break;
                }
            }

            if ( m_Guild == null )
                this.Delete();
            else
                Timer.DelayCall( TimeSpan.Zero, new TimerCallback( ResetType ) );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:25,代码来源:Guildstone.cs

示例2: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                    {
                        m_Guild = reader.ReadGuild() as Guild;

                        goto case 0;
                    }
                case 0:
                    {
                        break;
                    }
            }

            if ( m_Guild == null )
            {
                this.Delete();
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:GuildStone.cs

示例3: AllianceInfo

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

            switch( version )
            {
                case 0:
                    {
                        this.m_Name = reader.ReadString();
                        this.m_Leader = reader.ReadGuild() as Guild;

                        this.m_Members = reader.ReadStrongGuildList<Guild>();
                        this.m_PendingMembers = reader.ReadStrongGuildList<Guild>();

                        break;
                    }
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:18,代码来源:Guild.cs

示例4: Deserialize

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

            int version = reader.ReadInt();

            switch (version)
            {
                case 3:
                    {
                        m_BeforeChangeover = reader.ReadBool();
                        goto case 2;
                    }
                case 2:
                    {
                        m_GuildName = reader.ReadString();
                        m_GuildAbbrev = reader.ReadString();

                        goto case 1;
                    }
                case 1:
                    {
                        m_Guild = reader.ReadGuild() as Guild;

                        goto case 0;
                    }
                case 0:
                    {
                        break;
                    }
            }

            if (Guild.NewGuildSystem && ItemID == 0xED4)
                ItemID = 0xED6;

            if (version <= 2)
                m_BeforeChangeover = true;

            if (Guild.NewGuildSystem && m_BeforeChangeover)
                Timer.DelayCall(TimeSpan.Zero, new TimerCallback(AddToHouse));

            if (!Guild.NewGuildSystem && m_Guild == null)
                this.Delete();
        }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:44,代码来源:Guildstone.cs

示例5: WarDeclaration

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

			switch ( version )
			{
				case 0:
				{
					m_Kills = reader.ReadInt();
					m_MaxKills = reader.ReadInt();

					m_WarLength = reader.ReadTimeSpan();
					m_WarBeginning = reader.ReadDateTime();

					m_Guild = reader.ReadGuild() as Guild;
					m_Opponent = reader.ReadGuild() as Guild;

					m_WarRequester = reader.ReadBool();

					break;
				}
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:23,代码来源:Guild.cs

示例6: Deserialize

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

			switch ( version )
			{
				case 5:
				{
					int count = reader.ReadInt();

					m_PendingWars = new List<WarDeclaration>();
					for( int i = 0; i < count; i++ )
					{
						m_PendingWars.Add( new WarDeclaration( reader ) );
					}

					count = reader.ReadInt();
					m_AcceptedWars = new List<WarDeclaration>();
					for( int i = 0; i < count; i++ )
					{
						m_AcceptedWars.Add( new WarDeclaration( reader ) );
					}

					bool isAllianceLeader = reader.ReadBool();

					if( isAllianceLeader )
						m_AllianceInfo = new AllianceInfo( reader );
					else
						m_AllianceLeader = reader.ReadGuild() as Guild;


					goto case 4;
				}
				case 4:
				{
					m_AllyDeclarations = reader.ReadStrongGuildList<Guild>();
					m_AllyInvitations = reader.ReadStrongGuildList<Guild>();

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

					if( m_Leader is PlayerMobile )
						((PlayerMobile)m_Leader).GuildRank = RankDefinition.Leader;

					m_Name = reader.ReadString();
					m_Abbreviation = reader.ReadString();

					m_Allies = reader.ReadStrongGuildList<Guild>();
					m_Enemies = reader.ReadStrongGuildList<Guild>();
					m_WarDeclarations = reader.ReadStrongGuildList<Guild>();
					m_WarInvitations = reader.ReadStrongGuildList<Guild>();

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

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

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

					break;
				}
			}

			if ( m_AllyDeclarations == null )
				m_AllyDeclarations = new List<Guild>();

			if ( m_AllyInvitations == null )
				m_AllyInvitations = new List<Guild>();


			if ( m_AcceptedWars == null )
				m_AcceptedWars = new List<WarDeclaration>();

			if ( m_PendingWars == null )
				m_PendingWars = new List<WarDeclaration>();

//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:last-wish,代码行数:101,代码来源:Guild.cs

示例7: Deserialize

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

			int version = reader.ReadInt();

			switch( version )
			{
				case 3:
				{
					m_BeforeChangeover = reader.ReadBool();
					goto case 2;
				}
				case 2:
				{
					m_GuildName = reader.ReadString();
					m_GuildAbbrev = reader.ReadString();

					goto case 1;
				}
				case 1:
				{
					m_Guild = reader.ReadGuild() as Guild;

					goto case 0;
				}
				case 0:
				{
					break;
				}
			}

			if( version <= 2 )
				m_BeforeChangeover = true;

			if( m_Guild == null )
				this.Delete();
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:38,代码来源:Guildstone.cs

示例8: AllianceInfo

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

            switch( version )
            {
                case 0:
                    {
                        m_Name = reader.ReadString();
                        m_Leader = reader.ReadGuild() as Guild;

                        m_Members = reader.ReadStrongGuildList<Guild>();
                        m_PendingMembers = reader.ReadStrongGuildList<Guild>();

                        break;
                    }
            }

            if( !m_Alliances.ContainsKey(m_Name.ToLower()) )
                m_Alliances.Add(m_Name.ToLower(), this);
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:21,代码来源:Guild.cs

示例9: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
                case 3:
                {   // data removed, skip load in case 2
                    goto case 1;
                }
				case 2:
				{
					bool dmy = reader.ReadBool();
					
					goto case 1;
				}
				case 1:
				{
					m_Guild = reader.ReadGuild() as Guild;

					goto case 0;
				}
				case 0:
				{
					break;
				}
			}

			if ( m_Guild == null )
				this.Delete();
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:33,代码来源:Guildstone.cs

示例10: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 2:
				{
					m_StartDecay = reader.ReadDateTime();
					goto case 1;
				}
				case 1:
				{
					m_Guild = reader.ReadGuild() as Guild;

					goto case 0;
				}
				case 0:
				{
					break;
				}
			}

			if ( m_Guild == null )
				this.Delete();
			if ( m_StartDecay != DateTime.MinValue && DateTime.Now - m_StartDecay > TimeSpan.FromDays( 7.0 ) )
				Delete();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:30,代码来源:Guildstone.cs

示例11: DeserializeObject

		public object DeserializeObject(GenericReader reader)
		{
			object output = null;
			XmlObjectType xmlObjectType = (XmlObjectType)reader.ReadInt();

			if (xmlObjectType == XmlObjectType.Mobile)
			{
				output = reader.ReadMobile();
			}
			else if (xmlObjectType == XmlObjectType.Item)
			{
				output = reader.ReadItem();
			}
			else if (xmlObjectType == XmlObjectType.MobileList)
			{
				output = reader.ReadStrongMobileList();
			}
			else if (xmlObjectType == XmlObjectType.ItemList)
			{
				output = reader.ReadStrongItemList();
			}
			else if (xmlObjectType == XmlObjectType.ArrayList)
			{
				int elements = reader.ReadInt();
				ArrayList list = new ArrayList(elements);
				for (int i = 0; i < elements; i++)
				{
					list.Add(DeserializeObject(reader));
				}
				output = list;
			}
			else if (xmlObjectType == XmlObjectType.DateTime)
			{
				output = reader.ReadDateTime();
			}
			else if (xmlObjectType == XmlObjectType.DateTimeOffset)
			{
				output = reader.ReadDateTimeOffset();
			}
			else if (xmlObjectType == XmlObjectType.BaseGuild)
			{
				output = reader.ReadGuild();
			}
			else if (xmlObjectType == XmlObjectType.IPAddress)
			{
				output = reader.ReadIPAddress();
			}
			else if (xmlObjectType == XmlObjectType.Map)
			{
				output = reader.ReadMap();
			}
			else if (xmlObjectType == XmlObjectType.Point3D)
			{
				output = reader.ReadPoint3D();
			}
			else if (xmlObjectType == XmlObjectType.Point2D)
			{
				output = reader.ReadPoint2D();
			}
			else if (xmlObjectType == XmlObjectType.TimeSpan)
			{
				output = reader.ReadTimeSpan();
			}
			else if (xmlObjectType == XmlObjectType.Rectangle2D)
			{
				output = reader.ReadRect2D();
			}
			else if (xmlObjectType == XmlObjectType.Rectangle3D)
			{
				output = reader.ReadRect3D();
			}
			else if (xmlObjectType == XmlObjectType.Double)
			{
				output = reader.ReadDouble();
			}
			else if (xmlObjectType == XmlObjectType.Integer)
			{
				output = reader.ReadInt();
			}
			else if (xmlObjectType == XmlObjectType.Boolean)
			{
				output = reader.ReadBool();
			}
			else if (xmlObjectType == XmlObjectType.UInt64)
			{
				output = reader.ReadULong();
			}
			else if (xmlObjectType == XmlObjectType.String)
			{
				output = reader.ReadString();
			}
			else if (xmlObjectType == XmlObjectType.Type)
			{
				output = UberScriptFunctions.Methods.TYPE(null, reader.ReadString());
			}
			else if (xmlObjectType == XmlObjectType.Other)
			{
				LoggingCustom.Log(
					"ERROR_Uberscript.txt",
					DateTime.Now + ": xmlobject: " + Name + " attached to " + AttachedTo +
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:XmlObject.cs

示例12: Deserialize

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

            if ( version < 5 )
            {
                FixGuilds();
            }

            switch ( version )
            {
                case 5:
                    {
                        m_WarInitializations = reader.ReadGuildList();
                        m_WarKills = new WarKillsItem[reader.ReadInt()];
                        for ( int i = 0; i < m_WarKills.Length; ++i )
                        {
                            m_WarKills[i].w_Guild = reader.ReadGuild() as Guild;
                            m_WarKills[i].Kills = reader.ReadInt();
                            m_WarKills[i].MaxKills = reader.ReadInt();
                            m_WarKills[i].WarTime = (uint) reader.ReadInt();
                            m_WarKills[i].ExpTime = (uint) reader.ReadInt();
                        }
                        m_AllianceLeader = reader.ReadBool();
                        m_AllianceName = reader.ReadString();
                        goto case 4;
                    }
                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_WarInitializations == null )
            {
                m_WarInitializations = new ArrayList();
            }

            if ( WarTimer1 == null )
            {
                WarTimer1 = new WarTimer();
                WarTimer1.Start();
            }

            if ( m_Guildstone == null || m_Members.Count == 0 )
            {
//.........这里部分代码省略.........
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:101,代码来源:Guild.cs


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