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


C# Reader.ReadInt16方法代码示例

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


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

示例1: Parse

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

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

			List = new List<Model.GameServer>(Count);
			for (int i = 0; i < Count; i++)
				List.Add(new Model.GameServer()
				{
					Id = reader.ReadByte(),
					Address = string.Format("{0}.{1}.{2}.{3}", // ToDo: replace to native
						reader.ReadByte().ToString(),
						reader.ReadByte().ToString(),
						reader.ReadByte().ToString(),
						reader.ReadByte().ToString()),
					Port = reader.ReadInt32(),
					Age = reader.ReadByte(),
					PvP = reader.ReadByte() != 0,
					Online = reader.ReadInt16(),
					Maximum = reader.ReadInt16(),
					State = reader.ReadByte() != 0,
					Poop = string.Format("{0}-{1}-{2}-{3}-{4}", // ToDo: What is?
						reader.ReadByte().ToString("X2"),
						reader.ReadByte().ToString("X2"),
						reader.ReadByte().ToString("X2"),
						reader.ReadByte().ToString("X2"),
						reader.ReadByte().ToString("X2"))
				});
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:32,代码来源:GameServerList.cs

示例2: Parse

		public override void Parse(byte[] buffer)
		{
			Reader reader = new Reader(new MemoryStream(buffer));
			
			reader.ReadByte(); // Id
			AttackerId = reader.ReadInt32();

			Hit hit = new Hit()
			{
				TargetId = reader.ReadInt32(),
				Damage = reader.ReadInt32(),
				Flags = reader.ReadByte()
			};

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

			int count = reader.ReadInt16();
			Hits = new Hit[count + 1];
			Hits[0] = hit;
			for (int i = 1; i < Hits.Length; i++)
				Hits[i] = new Hit()
				{
					TargetId = reader.ReadInt32(),
					Damage = reader.ReadInt32(),
					Flags = reader.ReadByte()
				};
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:31,代码来源:Attack.cs

示例3: Parse

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

			reader.ReadByte(); // Id
			ObjectId = reader.ReadInt32();
			TargetColor = reader.ReadInt16();
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:8,代码来源:MyTargetSelected.cs

示例4: Parse

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

			reader.ReadByte(); // Id
			Sky = Lineage.SignsSky.None;
			if(reader.BaseStream.Length > 1)
				switch (reader.ReadInt16())
				{
					case 257: Sky = Lineage.SignsSky.Dusk; break;
					case 258: Sky = Lineage.SignsSky.Dawn; break;
				}
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:13,代码来源:SignsSky.cs

示例5: Parse

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

			reader.ReadByte(); // Id
			OpenWindow = reader.ReadInt16() != 0;
			Items = new Item[reader.ReadInt16()];
			for(int i = 0; i < Items.Length; i++)
				Items[i] = new Item()
				{
					Type1 = reader.ReadInt16(),
					ObjectId = reader.ReadInt32(),
					ItemId = reader.ReadInt32(),
					Count = reader.ReadInt32(),
					Type2 = reader.ReadInt16(),
					Type3 = reader.ReadInt16(),
					IsEquipped = reader.ReadInt16() != 0,
					Slot = reader.ReadInt32(),
					Enchant = reader.ReadInt16(),
					Type4 = reader.ReadInt16()
				};
		}
开发者ID:EligiusSantori,项目名称:L2Apf.NET,代码行数:22,代码来源:ItemList.cs

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

示例7: Parse


//.........这里部分代码省略.........
			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();
			CollisionHeight = r.ReadDouble();

			HairStyle = r.ReadInt32();
			HairColor = r.ReadInt32();
			FaceType = r.ReadInt32();

			AccessLevel = r.ReadInt32();
			Title = r.ReadString(Encoding.Unicode);

			ClanId = r.ReadInt32();
			ClanCrestId = r.ReadInt32();
			AllyId = r.ReadInt32();
			AllyCrestId = r.ReadInt32();
			IsClanLeader = r.ReadInt32() != 0;
			MountType = (Lineage.MountType)r.ReadByte();
			PrivateStore = (Lineage.PrivateStore)r.ReadByte();
			HasDwarfCraft = r.ReadByte();
			Pk = r.ReadInt32();
			PvP = r.ReadInt32();

			int count = r.ReadInt16();
			Cubics = new List<Int32>(count);
			for (int i = 0; i < count; i++)
				Cubics.Add(r.ReadInt16());

			IsFindParty = r.ReadByte() != 0;
			AbnormalEffects = r.ReadInt32();
			r.ReadByte(); // ?
			r.ReadInt32(); // ClanPrivileges
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			r.ReadInt32(); // ?
			
			RecLeft = r.ReadInt16();
			RecAmount = r.ReadInt16();
			r.ReadInt32(); // ?
			InventoryLimit = r.ReadInt16();
			ClassId = r.ReadInt32();
			SpecialEffects = r.ReadInt32();
			MaxCp = r.ReadInt32();
			Cp = r.ReadInt32();
			Enchant = r.ReadByte();
			TeamCircle = r.ReadByte();
			LargeCrestId = r.ReadInt32();

			IsHeroIcon = r.ReadByte() != 0;
			IsHeroGlow = r.ReadByte() != 0;

			IsFishing = r.ReadByte() != 0;
			Fish = new Library.Point(
				r.ReadInt32(),
				r.ReadInt32(),
				r.ReadInt32());

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


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