本文整理汇总了C#中StreamHandler.UnalignedReadTinyInt方法的典型用法代码示例。如果您正苦于以下问题:C# StreamHandler.UnalignedReadTinyInt方法的具体用法?C# StreamHandler.UnalignedReadTinyInt怎么用?C# StreamHandler.UnalignedReadTinyInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamHandler
的用法示例。
在下文中一共展示了StreamHandler.UnalignedReadTinyInt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ElementRead
protected override void ElementRead(StreamHandler reader, int index)
{
if (index == -3)
this.UnkByte = reader.UnalignedReadTinyInt(2);
else
base.ElementRead(reader, index);
}
示例2: MovementInfo
public unsafe MovementInfo(StreamHandler Reader)
{
var guid = new WowGuid();
this.HaveAttackingTarget = Reader.UnalignedReadBit();
guid.Bytes[2] = Reader.UnalignedReadTinyInt(1);
this.HaveVehicleData = Reader.UnalignedReadBit();
guid.Bytes[1] = Reader.UnalignedReadTinyInt(1);
guid.Bytes[4] = Reader.UnalignedReadTinyInt(1);
guid.Bytes[3] = Reader.UnalignedReadTinyInt(1);
this.HaveTransportTime = Reader.UnalignedReadBit();
this.HaveGameObjectPosition = Reader.UnalignedReadBit();
bool field_1C8 = Reader.UnalignedReadBit();
bool field_1AC = Reader.UnalignedReadBit();
this.HaveGameObjectRotation = Reader.UnalignedReadBit();
this.Living = Reader.UnalignedReadBit();
this.HavePosition = Reader.UnalignedReadBit();
var arrCounter = Reader.UnalignedReadInt(24);
guid.Bytes[0] = Reader.UnalignedReadTinyInt(1);
bool havePFlags = false;
WowGuid p_guid;
uint splinePoints = 0;
bool havePFlags2 = false;
bool haveOrientation = false;
if (this.Living)
{
this.HaveTransportData = Reader.UnalignedReadBit();
if (this.HaveTransportData)
{
fixed (byte* bytes = this.TransportGuid.Bytes)
{
bytes[2] = Reader.UnalignedReadTinyInt(1);
bytes[7] = Reader.UnalignedReadTinyInt(1);
bytes[5] = Reader.UnalignedReadTinyInt(1);
this.HaveTransportTime3 = Reader.UnalignedReadBit();
bytes[3] = Reader.UnalignedReadTinyInt(1);
bytes[0] = Reader.UnalignedReadTinyInt(1);
bytes[4] = Reader.UnalignedReadTinyInt(1);
bytes[1] = Reader.UnalignedReadTinyInt(1);
this.HaveTransportTime2 = Reader.UnalignedReadBit();
bytes[6] = Reader.UnalignedReadTinyInt(1);
}
}
this.HaveSpline2 = Reader.UnalignedReadBit();
p_guid.Bytes[7] = Reader.UnalignedReadTinyInt(1);
p_guid.Bytes[6] = Reader.UnalignedReadTinyInt(1);
p_guid.Bytes[5] = Reader.UnalignedReadTinyInt(1);
p_guid.Bytes[2] = Reader.UnalignedReadTinyInt(1);
p_guid.Bytes[4] = Reader.UnalignedReadTinyInt(1);
havePFlags = !Reader.UnalignedReadBit();
p_guid.Bytes[1] = Reader.UnalignedReadTinyInt(1);
this.SelfTarget = Reader.UnalignedReadBit();
this.TimeStamp = !Reader.UnalignedReadBit() ? 1U : 0U;
havePFlags2 = !Reader.UnalignedReadBit();
if (this.HaveSpline2)
{
this.HaveSpline = Reader.UnalignedReadBit();
if (this.HaveSpline)
{
this.Spline.HaveDurationMultiplier = Reader.UnalignedReadBit();
this.Spline.Flags = (SplineFlags)Reader.UnalignedReadInt(25);
this.Spline.SplineMode = (SplineMode)Reader.UnalignedReadTinyInt(2);
this.Spline.HaveUnknown1 = Reader.UnalignedReadBit();
splinePoints = Reader.UnalignedReadInt(22);
var type = Reader.UnalignedReadTinyInt(2);
switch (type)
{
case 0:
this.Spline.SplineType = SplineType.FacingSpot;
break;
case 1:
this.Spline.SplineType = SplineType.Normal;
break;
case 2:
this.Spline.SplineType = SplineType.FacingTarget;
break;
case 3:
this.Spline.SplineType = SplineType.FacingAngle;
break;
}
if (this.Spline.SplineType == SplineType.FacingTarget)
{
fixed (byte* bytes = this.Spline.FacingTarget.Bytes)
{
bytes[7] = Reader.UnalignedReadTinyInt(1);
bytes[3] = Reader.UnalignedReadTinyInt(1);
bytes[4] = Reader.UnalignedReadTinyInt(1);
bytes[2] = Reader.UnalignedReadTinyInt(1);
bytes[1] = Reader.UnalignedReadTinyInt(1);
bytes[6] = Reader.UnalignedReadTinyInt(1);
bytes[0] = Reader.UnalignedReadTinyInt(1);
bytes[5] = Reader.UnalignedReadTinyInt(1);
}
}
}
}
//.........这里部分代码省略.........