本文整理汇总了C#中MyUtils.ByteStream.ReadInt16方法的典型用法代码示例。如果您正苦于以下问题:C# ByteStream.ReadInt16方法的具体用法?C# ByteStream.ReadInt16怎么用?C# ByteStream.ReadInt16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyUtils.ByteStream
的用法示例。
在下文中一共展示了ByteStream.ReadInt16方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExploreSubItem
void ExploreSubItem(StreamWriter OutputStream, ref ByteStream Buffer)
{
Buffer.SkipBytes(8);
byte Area = Buffer.ReadByte();
UInt16 MainSlot = Buffer.ReadUInt16();
Int16 SubSlot = Buffer.ReadInt16();
Buffer.SkipBytes(54);
string Name = Buffer.ReadString(true);
if (SubSlot >= 0)
OutputStream.Write(" ");
string AreaName = "Unknown";
switch (Area)
{
case 0:
AreaName = "Personal Inventory";
break;
case 1:
AreaName = "Bank";
break;
case 2:
AreaName = "Shared Bank";
break;
case 6:
AreaName = "Personal Tribute";
break;
case 7:
AreaName = "Guild Tribute";
break;
case 8:
AreaName = "Merchant";
break;
}
OutputStream.WriteLine("Area: {0} {1} Main Slot {2,2} Sub Slot {3,3} Name {4}", Area, AreaName.PadRight(20), MainSlot, SubSlot, Name);
Buffer.ReadString(true); // Lore
Buffer.ReadString(true); // IDFile
//Buffer.SkipBytes(236); // Item Body Struct
UInt32 ID = Buffer.ReadUInt32();
byte Weight = Buffer.ReadByte();
byte NoRent = Buffer.ReadByte();
byte NoDrop = Buffer.ReadByte();
byte Attune = Buffer.ReadByte();
byte Size = Buffer.ReadByte();
OutputStream.WriteLine(" ID: {0} Weight: {1} NoRent: {2} NoDrop: {3} Attune {4} Size {5}", ID, Weight, NoRent, NoDrop, Attune, Size);
UInt32 Slots = Buffer.ReadUInt32();
UInt32 Price = Buffer.ReadUInt32();
UInt32 Icon = Buffer.ReadUInt32();
Buffer.SkipBytes(2);
UInt32 BenefitFlags = Buffer.ReadUInt32();
byte Tradeskills = Buffer.ReadByte();
OutputStream.WriteLine(" Slots: {0} Price: {1} Icon: {2} BenefitFlags {3} Tradeskills: {4}", Slots, Price, Icon, BenefitFlags, Tradeskills);
byte CR = Buffer.ReadByte();
byte DR = Buffer.ReadByte();
byte PR = Buffer.ReadByte();
byte MR = Buffer.ReadByte();
byte FR = Buffer.ReadByte();
byte SVC = Buffer.ReadByte();
OutputStream.WriteLine(" CR: {0} DR: {1} PR: {2} MR: {3} FR: {4} SVC: {5}", CR, DR, PR, MR, FR, SVC);
byte AStr = Buffer.ReadByte();
byte ASta = Buffer.ReadByte();
byte AAgi = Buffer.ReadByte();
byte ADex = Buffer.ReadByte();
byte ACha = Buffer.ReadByte();
byte AInt = Buffer.ReadByte();
byte AWis = Buffer.ReadByte();
OutputStream.WriteLine(" AStr: {0} ASta: {1} AAgi: {2} ADex: {3} ACha: {4} AInt: {5} AWis: {6}", AStr, ASta, AAgi, ADex, ACha, AInt, AWis);
Int32 HP = Buffer.ReadInt32();
Int32 Mana = Buffer.ReadInt32();
UInt32 Endurance = Buffer.ReadUInt32();
Int32 AC = Buffer.ReadInt32();
Int32 Regen = Buffer.ReadInt32();
Int32 ManaRegen = Buffer.ReadInt32();
Int32 EndRegen = Buffer.ReadInt32();
UInt32 Classes = Buffer.ReadUInt32();
UInt32 Races = Buffer.ReadUInt32();
UInt32 Deity = Buffer.ReadUInt32();
Int32 SkillModValue = Buffer.ReadInt32();
Buffer.SkipBytes(4);
UInt32 SkillModType = Buffer.ReadUInt32();
UInt32 BaneDamageRace = Buffer.ReadUInt32();
UInt32 BaneDamageBody = Buffer.ReadUInt32();
UInt32 BaneDamageRaceAmount = Buffer.ReadUInt32();
Int32 BaneDamageAmount = Buffer.ReadInt32();
byte Magic = Buffer.ReadByte();
Int32 CastTime = Buffer.ReadInt32();
//.........这里部分代码省略.........