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


C# Reader.ReadDouble方法代码示例

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


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

示例1: Parse

		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id

			ObjectId = reader.ReadInt32();
			NpcId = reader.ReadInt32();
			IsAttackable = reader.ReadInt32() != 0;
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32());
			Heading = reader.ReadInt32();
				reader.ReadInt32();
			MAtkSpd = reader.ReadInt32();
			PAtkSpd = reader.ReadInt32();
			RunSpd = reader.ReadInt32();
			WalkSpd = reader.ReadInt32();
			SwimRunSpd = reader.ReadInt32();
			SwimWalkSpd = reader.ReadInt32();
			FlRunSpd = reader.ReadInt32();
			FlWalkSpd = reader.ReadInt32();
			FlyRunSpd = reader.ReadInt32();
			FlyWalkSpd = reader.ReadInt32();
			MoveSpdMult = reader.ReadDouble();
			AtkSpdMult = reader.ReadDouble();
			CollisionRadius = reader.ReadDouble();
			CollisionHeight = reader.ReadDouble();

			RightHand = reader.ReadInt32();
			BothHand = reader.ReadInt32();
			LeftHand = reader.ReadInt32();

			IsShowName = reader.ReadByte() != 0;
			IsRunning = reader.ReadByte() != 0;
			IsInCombat = reader.ReadByte() != 0;
			IsAlikeDead = reader.ReadByte() != 0;
			IsSummoned = reader.ReadByte() != 0;
			Name = reader.ReadString(Encoding.Unicode);
			Title = reader.ReadString(Encoding.Unicode);
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:42,代码来源:NpcInfo.cs

示例2: Parse

		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			Position = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32()
			);
			Heading = reader.ReadInt32();
			ObjectId = reader.ReadInt32();
			Name = reader.ReadString(Encoding.Unicode);
			Race = reader.ReadInt32();
			Gender = (Lineage.Gender)reader.ReadInt32();
			Class = reader.ReadInt32();

			Underwear = reader.ReadInt32();
			Head = reader.ReadInt32();
			RightHand = reader.ReadInt32();
			LeftHand = reader.ReadInt32();
			Gloves = reader.ReadInt32();
			Chest = reader.ReadInt32();
			Legs = reader.ReadInt32();
			Feet = reader.ReadInt32();
			Back = reader.ReadInt32();
			BothHand = reader.ReadInt32();
			Hair = reader.ReadInt32();

			IsPvP = reader.ReadInt32() != 0;
			Karma = reader.ReadInt32();
			MAttackSpeed = reader.ReadInt32();
			PAttackSpeed = reader.ReadInt32();
			reader.ReadInt32(); // IsPvP again
			reader.ReadInt32(); // Karma again
			RunSpeed = reader.ReadInt32();
			WalkSpeed = reader.ReadInt32();
			SwimRunSpeed = reader.ReadInt32();
			SwimWalkSpeed = reader.ReadInt32();
			FlRunSpeed = reader.ReadInt32();
			FlWalkSpeed = reader.ReadInt32();
			FlyRunSpeed = reader.ReadInt32();
			FlyWalkSpeed = reader.ReadInt32();
			MoveSpeedMult = reader.ReadDouble();
			AttackSpeedMult = reader.ReadDouble();
			CollisionRadius = reader.ReadDouble();
			CollisionHeight = reader.ReadDouble();

			HairSytle = reader.ReadInt32();
			HairColor = reader.ReadInt32();
			FaceType = reader.ReadInt32();
			Title = reader.ReadString(Encoding.Unicode);
			ClanId = reader.ReadInt32();
			ClanCrestId = reader.ReadInt32();
			AllyId = reader.ReadInt32();
			AllyCrestId = reader.ReadInt32();
			
			SiegeFlags = reader.ReadInt32();
			IsStanding = reader.ReadByte() != 0;
			IsRunning = reader.ReadByte() != 0;
			IsInCombat = reader.ReadByte() != 0;
			IsAlikeDead = reader.ReadByte() != 0;
			IsInvisible = reader.ReadByte() != 0;
			MountType = (Lineage.MountType)reader.ReadByte();
			PrivateStore = (Lineage.PrivateStore)reader.ReadByte();

			Cubics = new Int16[reader.ReadInt16()];
			for (int i = 0; i < Cubics.Length; i++)
				Cubics[i] = reader.ReadInt16();

			IsFindParty = reader.ReadByte() != 0;
			AbnormalEffects = reader.ReadInt32();
			RecommendLeft = reader.ReadByte();
			RecommendAmount = reader.ReadInt16();
			reader.ReadInt32();
			MaxCp = reader.ReadInt32();
			Cp = reader.ReadInt32();
			EnchantAmount = reader.ReadByte();
			TeamCircle = reader.ReadByte();
			ClanLargeCrestId = reader.ReadInt32();
			IsHeroIcon = reader.ReadByte() != 0;
			IsHeroGlow = reader.ReadByte() != 0;
			IsFishing = reader.ReadByte() != 0;

			Fish = new Library.Point(
				reader.ReadInt32(),
				reader.ReadInt32(),
				reader.ReadInt32());

			NameColor = reader.ReadInt32();
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:91,代码来源:CharInfo.cs

示例3: Parse

		public override void Parse(byte[] buffer)
		{
			Reader r = new Reader(new MemoryStream(buffer));

			r.ReadByte(); // Id

			Position = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

			Heading = r.ReadInt32();
			ObjectId = r.ReadInt32();

			Name = r.ReadString(Encoding.Unicode);
			Race = r.ReadInt32();
			Gender = r.ReadInt32() == 0 ?
				Lineage.Gender.Male :
				Lineage.Gender.Female;
			BaseClassId = r.ReadInt32();
			Level = r.ReadInt32();
			Xp = r.ReadInt32();

			STR = r.ReadInt32();
			DEX = r.ReadInt32();
			CON = r.ReadInt32();
			INT = r.ReadInt32();
			WIT = r.ReadInt32();
			MEN = r.ReadInt32();

			MaxHp = r.ReadInt32();
			Hp = r.ReadInt32();
			MaxMp = r.ReadInt32();
			Mp = r.ReadInt32();

			Sp = r.ReadInt32();
			Load = r.ReadInt32();
			MaxLoad = r.ReadInt32();

			r.ReadInt32(); // ? 0x28

			Underwear.ObjectId = r.ReadInt32();
			RightEaring.ObjectId = r.ReadInt32();
			LeftEaring.ObjectId = r.ReadInt32();
			Neck.ObjectId = r.ReadInt32();
			RightFinger.ObjectId = r.ReadInt32();
			LeftFinger.ObjectId = r.ReadInt32();
			Head.ObjectId = r.ReadInt32();
			RightHand.ObjectId = r.ReadInt32();
			LeftHand.ObjectId = r.ReadInt32();
			Gloves.ObjectId = r.ReadInt32();
			Chest.ObjectId = r.ReadInt32();
			Legs.ObjectId = r.ReadInt32();
			Feet.ObjectId = r.ReadInt32();
			Back.ObjectId = r.ReadInt32();
			BothHand.ObjectId = r.ReadInt32();
			Hair.ObjectId = r.ReadInt32();

			Underwear.ItemId = r.ReadInt32();
			RightEaring.ItemId = r.ReadInt32();
			LeftEaring.ItemId = r.ReadInt32();
			Neck.ItemId = r.ReadInt32();
			RightFinger.ItemId = r.ReadInt32();
			LeftFinger.ItemId = r.ReadInt32();
			Head.ItemId = r.ReadInt32();
			RightHand.ItemId = r.ReadInt32();
			LeftHand.ItemId = r.ReadInt32();
			Gloves.ItemId = r.ReadInt32();
			Chest.ItemId = r.ReadInt32();
			Legs.ItemId = r.ReadInt32();
			Feet.ItemId = r.ReadInt32();
			Back.ItemId = r.ReadInt32();
			BothHand.ItemId = r.ReadInt32();
			Hair.ItemId = r.ReadInt32();

			PAtk = r.ReadInt32();
			PAtkSpd = r.ReadInt32(); // ToDo ???
			PDef = r.ReadInt32();
			Evasion = r.ReadInt32();
			Accuracy = r.ReadInt32();
			Focus = r.ReadInt32();
			MAtk = r.ReadInt32();
			MAtkSpd = r.ReadInt32();
			PAtkSpd = r.ReadInt32(); // ToDo ???
			MDef = r.ReadInt32();
			InPvP = r.ReadInt32() != 0;
			Karma = r.ReadInt32();

			RunSpd = r.ReadInt32();
			WalkSpd = r.ReadInt32();
			SwimRunSpd = r.ReadInt32();
			SwimWalkSpd = r.ReadInt32();
			FlRunSpd = r.ReadInt32();
			FlWalkSpd = r.ReadInt32();
			FlyRunSpd = r.ReadInt32();
			FlyWalkSpd = r.ReadInt32();

			MoveSpdMult = r.ReadDouble();
			AtkSpdMult = r.ReadDouble();
			CollisionRadius = r.ReadDouble();
//.........这里部分代码省略.........
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:101,代码来源:UserInfo.cs

示例4: Parse

		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));

			reader.ReadByte(); // Id
			int Count = reader.ReadInt32();

			List = new List<Model.Player>(Count);
			for(int i = 0; i < Count; i++)
			{
				var c = new Model.Player();
				c.Number = i;
				c.Name = reader.ReadString(Encoding.Unicode);
				c.ObjectId = reader.ReadInt32();
				c.Login = reader.ReadString(Encoding.Unicode);
				c.SessionId = reader.ReadInt32();
				c.ClanId = reader.ReadInt32();
					reader.ReadInt32();
				c.Gender = reader.ReadInt32() == 0 ?
					Lineage.Gender.Male :
					Lineage.Gender.Female;
				c.Race = reader.ReadInt32();
				c.BaseClassId = reader.ReadInt32();
				c.IsActive = reader.ReadInt32() != 0;
				c.Position = new Library.Point(
					reader.ReadInt32(),
					reader.ReadInt32(),
					reader.ReadInt32());
				c.Hp = reader.ReadDouble();
				c.Mp = reader.ReadDouble();
				c.Sp = reader.ReadInt32();
				c.Xp = reader.ReadInt32();
				c.Level = reader.ReadInt32();
				c.Karma = reader.ReadInt32();

				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();
				reader.ReadInt32();

				c.Equipment = new Model.Equipment()
				{
					Underwear = reader.ReadInt32(),
					RightEaring = reader.ReadInt32(),
					LeftEaring = reader.ReadInt32(),
					Neck = reader.ReadInt32(),
					RightFinger = reader.ReadInt32(),
					LeftFinger = reader.ReadInt32(),
					Head = reader.ReadInt32(),
					RightHand = reader.ReadInt32(),
					LeftHand = reader.ReadInt32(),
					Gloves = reader.ReadInt32(),
					Chest = reader.ReadInt32(),
					Legs = reader.ReadInt32(),
					Feet = reader.ReadInt32(),
					Back = reader.ReadInt32(),
					BothHand = reader.ReadInt32(),
					Hair = reader.ReadInt32(),
				};

				((Model.Character)c).Equipment = new Model.Equipment()
				{
					Underwear = reader.ReadInt32(),
					RightEaring = reader.ReadInt32(),
					LeftEaring = reader.ReadInt32(),
					Neck = reader.ReadInt32(),
					RightFinger = reader.ReadInt32(),
					LeftFinger = reader.ReadInt32(),
					Head = reader.ReadInt32(),
					RightHand = reader.ReadInt32(),
					LeftHand = reader.ReadInt32(),
					Gloves = reader.ReadInt32(),
					Chest = reader.ReadInt32(),
					Legs = reader.ReadInt32(),
					Feet = reader.ReadInt32(),
					Back = reader.ReadInt32(),
					BothHand = reader.ReadInt32(),
					Hair = reader.ReadInt32(),
				};

				c.HairStyle = reader.ReadInt32();
				c.HairColor = reader.ReadInt32();
				c.FaceType = reader.ReadInt32();

				c.MaxHp = (int)reader.ReadDouble();
				c.MaxMp = (int)reader.ReadDouble();

				c.ToRemove = reader.ReadInt32();
				c.ClassId = reader.ReadInt32();
				c.IsLastUsed = reader.ReadInt32() != 0;
				c.Enchant = reader.ReadByte();

				List.Add(c);
			}
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:100,代码来源:CharSelectInfo.cs

示例5: Parse

		public override void Parse(byte[] buffer)
		{
			Reader r = new Reader(new MemoryStream(buffer));

			r.ReadByte(); // Id

			Name = r.ReadString(Encoding.Unicode);
			ObjectId = r.ReadInt32();
			Title = r.ReadString(Encoding.Unicode);
			SessionId = r.ReadInt32();
			ClanId = r.ReadInt32();

			r.ReadInt32(); // ?

			Gender = r.ReadInt32() == 0 ?
				Lineage.Gender.Male :
				Lineage.Gender.Female;
			Race = r.ReadInt32();
			BaseClassId = r.ReadInt32();
			IsActive = r.ReadInt32() != 0;

			Position = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

			Hp = r.ReadDouble();
			Mp = r.ReadDouble();

			Sp = r.ReadInt32();
			Xp = r.ReadInt32();
			Level = r.ReadInt32();
			Karma = r.ReadInt32();

			r.ReadInt32(); // ?

			INT = r.ReadInt32();
			STR = r.ReadInt32();
			CON = r.ReadInt32();
			MEN = r.ReadInt32();
			DEX = r.ReadInt32();
			WIT = r.ReadInt32();

			r.ReadInt32(); // ?
			r.ReadInt32(); // ?

			Underwear.ObjectId = r.ReadInt32();
			RightEaring.ObjectId = r.ReadInt32();
			LeftEaring.ObjectId = r.ReadInt32();
			Neck.ObjectId = r.ReadInt32();
			RightFinger.ObjectId = r.ReadInt32();
			LeftFinger.ObjectId = r.ReadInt32();
			Head.ObjectId = r.ReadInt32();
			RightHand.ObjectId = r.ReadInt32();
			LeftHand.ObjectId = r.ReadInt32();
			Gloves.ObjectId = r.ReadInt32();
			Chest.ObjectId = r.ReadInt32();
			Legs.ObjectId = r.ReadInt32();
			Feet.ObjectId = r.ReadInt32();
			Back.ObjectId = r.ReadInt32();
			BothHand.ObjectId = r.ReadInt32();
			Hair.ObjectId = r.ReadInt32();

			Underwear.ItemId = r.ReadInt32();
			RightEaring.ItemId = r.ReadInt32();
			LeftEaring.ItemId = r.ReadInt32();
			Neck.ItemId = r.ReadInt32();
			RightFinger.ItemId = r.ReadInt32();
			LeftFinger.ItemId = r.ReadInt32();
			Head.ItemId = r.ReadInt32();
			RightHand.ItemId = r.ReadInt32();
			LeftHand.ItemId = r.ReadInt32();
			Gloves.ItemId = r.ReadInt32();
			Chest.ItemId = r.ReadInt32();
			Legs.ItemId = r.ReadInt32();
			Feet.ItemId = r.ReadInt32();
			Back.ItemId = r.ReadInt32();
			BothHand.ItemId = r.ReadInt32();
			Hair.ItemId = r.ReadInt32();

			// ToDo: other data
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:82,代码来源:CharSelected.cs


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