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


C# GenericReader.ReadULong方法代码示例

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


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

示例1: Deserialize

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
            m_Active = reader.ReadBool();
            m_Theme = (ThemeType)reader.ReadInt();
            m_TotalSpins = reader.ReadULong();
            m_TotalCollected = reader.ReadULong();
            m_TotalWon = reader.ReadULong();
            m_ErrorCode = reader.ReadInt();
            m_OrigHue = reader.ReadInt();
            m_Throttle = reader.ReadBool();
            m_ThrottleSeconds = reader.ReadDouble();
            m_CardClubOnly = reader.ReadBool();
            m_MembershipCard = reader.ReadBool();

            m_LastWonBy = reader.ReadMobile();
            m_LastWonByDate = reader.ReadDateTime();
            m_LastWonAmount = reader.ReadInt();

            m_SecurityCamMobile = reader.ReadMobile();
            m_SecurityChatter = (VerboseType)reader.ReadInt();
            m_TotalPlayers = reader.ReadInt();
            InvalidateProperties();
            if (m_TotalPlayers > 0)
            {
                for (int i = 0; i < m_TotalPlayers; i++)
                {
                    PlayerInfo player = new PlayerInfo();

                    player.mobile = reader.ReadMobile();
                    player.LastPlayed = reader.ReadDateTime();
                    player.OnCredit = reader.ReadInt();
                    player.Cost = reader.ReadInt();
                    PlayerList.Add(player);
                }
            }

            for (int i = 0; i < m_HitStats.Length; i++)
                m_HitStats[i] = reader.ReadULong();

            if (m_OrigHue != -1 && m_Active)
            {
                Hue = m_OrigHue;
                m_OrigHue = -1;
            }
            SetupTheme(m_Theme);
            ActivateIdleTimer(TimeSpan.FromMinutes(5));
            m_GameSpeed = Utility.RandomList(5, 6, 7, 8, 9, 10, 11, 12);
        }
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:50,代码来源:KenoBoard.cs

示例2: Deserialize

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

			int version = reader.ReadInt();

			switch (version)
			{
				case 1:
					Credit = reader.ReadULong();
					goto case 0;
				case 0:
					{
						Owner = reader.ReadMobile();
						Opened = reader.ReadBool();

						if (Owner == null)
						{
							Delete();
						}
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:24,代码来源:Containers.cs

示例3: Deserialize

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

			int version = reader.ReadInt();

			switch (version)
			{
				case 5:
					{
						m_Quality = (BookQuality)reader.ReadByte();

						goto case 4;
					}
				case 4:
					{
						m_EngravedText = reader.ReadString();

						goto case 3;
					}
				case 3:
					{
						m_Crafter = reader.ReadMobile();
						goto case 2;
					}
				case 2:
					{
						m_Slayer = (SlayerName)reader.ReadInt();
						m_Slayer2 = (SlayerName)reader.ReadInt();
						goto case 1;
					}
				case 1:
					{
						m_AosAttributes = new AosAttributes(this, reader);
						m_AosSkillBonuses = new AosSkillBonuses(this, reader);

						goto case 0;
					}
				case 0:
					{
						m_Content = reader.ReadULong();
						m_Count = reader.ReadInt();

						break;
					}
			}

			if (m_AosAttributes == null)
			{
				m_AosAttributes = new AosAttributes(this);
			}

			if (m_AosSkillBonuses == null)
			{
				m_AosSkillBonuses = new AosSkillBonuses(this);
			}

			if (Core.AOS && Parent is Mobile)
			{
				m_AosSkillBonuses.AddTo((Mobile)Parent);
			}

			int strBonus = m_AosAttributes.BonusStr;
			int dexBonus = m_AosAttributes.BonusDex;
			int intBonus = m_AosAttributes.BonusInt;

			if (Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
			{
				Mobile m = (Mobile)Parent;

				string modName = Serial.ToString();

				if (strBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero));
				}

				if (dexBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero));
				}

				if (intBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero));
				}
			}

			if (Parent is Mobile)
			{
				((Mobile)Parent).CheckStatTimers();
			}
		}
开发者ID:mtPrimo,项目名称:ServUO,代码行数:93,代码来源:Spellbook.cs

示例4: Deserialize

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

            int version = reader.ReadInt();

            switch ( version ) {
            case 0:
                drawing = reader.ReadUInt();

                for (uint i = 0; i < jackpot.Length; i++)
                    jackpot[i] = reader.ReadULong();

                for (uint i = 0; i < awards.Length; i++)
                    awards[i] = reader.ReadULong();

                award = reader.ReadULong();
                given = reader.ReadULong();
                destroyed = reader.ReadULong();
                mode = (LotteryBasketMode)reader.ReadInt();

                if (reader.ReadBool()) {
                    outcome = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        outcome[p] = reader.ReadUInt();
                }

                uint count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    RegisteredTicket rt = new RegisteredTicket(id, data);
                    rt.Class = reader.ReadInt();
                    tickets[id] = rt;
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    incoming[id] = new RegisteredTicket(id, data);
                }

		board = reader.ReadItem();
		itemPrize = reader.ReadBool();
                break;

	    case 1:
	        drawing = reader.ReadUInt();

                for (uint i = 0; i < drawingCount.Length; i++)
                    drawingCount[i] = reader.ReadUInt();

                for (uint i = 0; i < jackpot.Length; i++)
                    jackpot[i] = reader.ReadULong();

                for (uint i = 0; i < awards.Length; i++)
                    awards[i] = reader.ReadULong();

		for (uint i = 0; i < winners.Length; i++)
                    winners[i] = reader.ReadInt();

		oldParticipants = reader.ReadUInt();

		award = reader.ReadULong();
                given = reader.ReadULong();
                destroyed = reader.ReadULong();
                mode = (LotteryBasketMode)reader.ReadInt();

                if (reader.ReadBool()) {
                    outcome = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        outcome[p] = reader.ReadUInt();
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
                        data[p] = reader.ReadUInt();
                    RegisteredTicket rt = new RegisteredTicket(id, data);
                    rt.Class = reader.ReadInt();
                    tickets[id] = rt;
                }

                count = reader.ReadUInt();
                for (uint i = 0; i < count; i++) {
                    int id = reader.ReadInt();
                    uint[] data = new uint[LotteryConstants.Picks];
                    for (uint p = 0; p < LotteryConstants.Picks; p++)
		        data[p] = reader.ReadUInt();
                    incoming[id] = new RegisteredTicket(id, data);
                }

		board = reader.ReadItem();
		itemPrize = reader.ReadBool();
//.........这里部分代码省略.........
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:101,代码来源:LotteryBasket.cs

示例5: Deserialize

		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
			int version = reader.ReadInt();
			m_Active = reader.ReadBool();
			m_Casino = (Casino)reader.ReadInt();
			m_CasinoName = reader.ReadString();
			m_TotalPlays = reader.ReadULong();
			m_TotalCollected = reader.ReadULong();
			m_TotalWon = reader.ReadULong();
			m_ErrorCode = reader.ReadInt();
			m_OrigHue = reader.ReadInt();

			m_InUseBy = reader.ReadMobile();
			m_OnCredit = reader.ReadInt();
			m_Escrow = reader.ReadInt();

			m_SecurityCamMobile = reader.ReadMobile();
			m_SecurityChatter = (VerboseType)reader.ReadInt();

			m_Bet = reader.ReadInt();
			m_TestMode = reader.ReadBool();

			m_DealerDelay = reader.ReadBool();
			m_DoubleAfterSplit = reader.ReadBool();
			m_DealerHitsSoft17 = reader.ReadBool();
			m_DealerTakesPush = reader.ReadBool();
			m_Resplits = reader.ReadBool();
			m_SplitAces = (SplitAces)reader.ReadInt();
			m_BJSplitAces21 = reader.ReadBool();
			m_BJSplitAcesPaysEven = reader.ReadBool();
			m_DoubleDown = (DoubleDown)reader.ReadInt();
			m_PlayerCardsFaceUp = reader.ReadBool();
			m_DealerCardsFaceUp = reader.ReadBool();
			m_NumberOfDecks = reader.ReadShort();
			m_ContinuousShuffle = reader.ReadBool();
			m_MinBet = (BetValues)reader.ReadInt();
			m_MaxBet = (BetValues)reader.ReadInt();
			m_BlackJackPays = (BlackJackPays)reader.ReadInt();
			m_CardSounds = reader.ReadBool();
			carddeck = new CardDeck(m_NumberOfDecks,0);
			m_BJInfo.HandInfo = new HandStruct[5];
			for (int h = 0; h < 5; h++)
			{
				m_BJInfo.HandInfo[h].bet = 0;
				m_BJInfo.HandInfo[h].totalcards = 0;
				m_BJInfo.HandInfo[h].card = new short[12];
				for (int c = 0; c < 12; c++)
					m_BJInfo.HandInfo[h].card[c] = -1;
				m_BJInfo.HandInfo[h].bestscore = 0;
				m_BJInfo.HandInfo[h].altscore = 0;
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:53,代码来源:CEOBlackJack.cs

示例6: 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

示例7: DeserializeCams

		private static void DeserializeCams(GenericReader reader)
		{
			int version = reader.GetVersion();

			switch (version)
			{
				case 3: // Skip to case 1
					goto case 1;
                case 2:
			        {
                        reader.ReadBlockDictionary(
                            () =>
                            {
                                var cam = reader.ReadMobile<PlayerMobile>();
                                var viewed = reader.ReadMobile<PlayerMobile>();

								return new KeyValuePair<PlayerMobile, PlayerMobile>(cam, viewed);
                            },
                            CurrentlyViewing);			        
			        }
			        goto case 1;
				case 1:
					{
						reader.ReadBlockDictionary(
							() =>
							{
								var player = reader.ReadMobile<PlayerMobile>();
								int count = reader.ReadInt();

								return new KeyValuePair<PlayerMobile, int>(player, count);
							},
							PlayerMurderers);

						reader.ReadBlockDictionary(
							() =>
							{
								BaseCreature mob = reader.ReadMobile<BaseCreature>();
								int count = reader.ReadInt();

								return new KeyValuePair<BaseCreature, int>(mob, count);
							},
							MonsterMurderers);

						CurrentDeathCount = reader.ReadULong();
						CurrentPlayerMurders = reader.ReadULong();
						CurrentMonsterMurders = reader.ReadULong();
					}
					goto case 0;
				case 0:
					{
						if (version < 1)
						{
							CurrentDeathCount = Convert.ToUInt64(reader.ReadInt());
							CurrentPlayerMurders = Convert.ToUInt64(reader.ReadInt());
							CurrentMonsterMurders = Convert.ToUInt64(reader.ReadInt());
						}

						TopPlayerMurderer = reader.ReadMobile<PlayerMobile>();
						TopMonsterMurderer = reader.ReadMobile<BaseCreature>();

						if (version < 1)
						{
							reader.ReadBlockDictionary(
								() =>
								{
									var player = reader.ReadMobile<PlayerMobile>();
									DateTime date = reader.ReadDateTime();

									return new KeyValuePair<PlayerMobile, DateTime>(player, date);
								},
								DeathCams);

							reader.ReadBlockDictionary(
								() =>
								{
									var player = reader.ReadMobile<PlayerMobile>();
									DateTime date = reader.ReadDateTime();

									return new KeyValuePair<PlayerMobile, DateTime>(player, date);
								},
								DeathCamsEvents);
						}
					}
					break;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:86,代码来源:ActionCams_Init.cs

示例8: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 5:
				{
					m_Quality = (BookQuality) reader.ReadByte();		

					goto case 4;
				}
				case 4:
				{
					m_EngravedText = reader.ReadString();		

					goto case 3;
				}
				case 3:
				{
					m_Crafter = reader.ReadMobile();
					goto case 2;
				}
				case 2:
				{
					m_Slayer = (SlayerName)reader.ReadInt();
					m_Slayer2 = (SlayerName)reader.ReadInt();
					goto case 1;
				}
				case 1:
				{
					goto case 0;
				}
				case 0:
				{
					m_Content = reader.ReadULong();
					m_Count = reader.ReadInt();

					break;
				}
			}

			if ( Parent is Mobile )
				((Mobile)Parent).CheckStatTimers();
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:47,代码来源:Spellbook.cs


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