本文整理汇总了C#中Plasma.hsStream.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# hsStream.ReadInt方法的具体用法?C# hsStream.ReadInt怎么用?C# hsStream.ReadInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plasma.hsStream
的用法示例。
在下文中一共展示了hsStream.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fInvisLevel = s.ReadInt();
fLeavingAge = s.ReadBool();
fLinkKey = mgr.ReadKey(s);
fEffects = s.ReadInt();
fLinkAnimKey = mgr.ReadKey(s);
}
示例2: Read
public override void Read(hsStream s)
{
fTransID = s.ReadUInt();
fResult = (ENetError)s.ReadInt();
fAcctGuid = pnHelpers.ReadUuid(s);
fPermissions = s.ReadInt();
fAvatars = new pnVaultAvatarInfo[s.ReadInt()];
for (int i = 0; i < fAvatars.Length; i++) {
fAvatars[i] = new pnVaultAvatarInfo();
fAvatars[i].Read(s);
}
}
示例3: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fObjectPool.Capacity = s.ReadInt();
for (int i = 0; i < fObjectPool.Capacity; i++)
fObjectPool.Add(mgr.ReadKey(s));
fGenericPool.Capacity = s.ReadInt();
for (int i = 0; i < fGenericPool.Capacity; i++)
fGenericPool.Add(mgr.ReadKey(s));
}
示例4: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fType = (NotificationType)s.ReadInt();
fState = s.ReadFloat();
if (s.Version < plVersion.EndOfAges)
fID = s.ReadInt();
else
fID = (int)s.ReadByte();
fEvents.Capacity = s.ReadInt();
for (int i = 0; i < fEvents.Capacity; i++)
fEvents.Add(proEventData.Read(s, mgr));
}
示例5: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fSynchFlags = (Flags)s.ReadInt();
if (s.Version.IsPlasma21)
fSynchFlags &= (Flags)~0x8;
if (s.Version.IsPlasma21 && (((int)fSynchFlags & 0x06) != 0) ||
(s.Version.IsPlasma20 && ExcludeStates)) {
short count = s.ReadShort();
for (short i = 0; i < count; i++)
fExcludeStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
}
//Plasma 2.1+ ends here...
if (s.Version.IsPlasma21) {
fSynchFlags = 0; // Synch Flags are pretty useless in Plasma21
return;
} else if (s.Version.IsPlasma20) {
if (VolatileStates) {
short count = s.ReadShort();
for (short i = 0; i < count; i++)
fVolatileStates.Add((States)Enum.Parse(typeof(States), s.ReadStdString()));
}
}
}
示例6: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fCommand = (Cmd)s.ReadInt();
fString = s.ReadStdString();
}
示例7: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
fDrawInterface = mgr.ReadKey(s);
fSimulationInterface = mgr.ReadKey(s);
fCoordInterface = mgr.ReadKey(s);
fAudioInterface = mgr.ReadKey(s);
fInterfaces.Capacity = s.ReadInt();
for (int i = 0; i < fInterfaces.Capacity; i++)
fInterfaces.Add(mgr.ReadKey(s));
fModifiers.Capacity = s.ReadInt();
for (int i = 0; i < fModifiers.Capacity; i++)
fModifiers.Add(mgr.ReadKey(s));
fSceneNode = mgr.ReadKey(s);
}
示例8: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
int count = s.ReadInt();
for (int i = 0; i < count; i++) {
plNetGroupInfo g = new plNetGroupInfo();
g.Read(s);
fGroups.Add(g);
}
}
示例9: Read
public override void Read(hsStream s)
{
fTransID = s.ReadUInt();
fResult = (ENetError)s.ReadInt();
if (s.ReadInt() != 0) { // Vault Node buffer size
fNode = new pnVaultNode();
fNode.Read(s);
}
}
示例10: IRead
protected override void IRead(hsStream s, hsResMgr mgr)
{
fState = s.ReadInt();
}
示例11: Read
public override void Read(hsStream s, hsResMgr mgr)
{
fFlags = (BitVectorFlags)s.ReadInt();
if (HasVersion) {
fVerMajor = s.ReadByte();
fVerMinor = s.ReadByte();
}
if (HasTimeSent)
fTimeSent = plUnifiedTime.Read(s);
if (HasContext)
fContext = s.ReadUInt();
if (HasTransID)
fTransID = s.ReadUInt();
if (HasPlayerID)
fPlayerID = s.ReadUInt();
if (HasAccount)
fAcctUUID = new Guid(s.ReadBytes(16));
}
示例12: Read
public override void Read(hsStream s, hsResMgr mgr)
{
base.Read(s, mgr);
// Cache it.
fVersion = mgr.Version;
// Cyan stores these values, but we're just going to
// save the stream and have fun with it...
fBuffer = new byte[s.ReadInt()];
Compression type = (Compression)s.ReadByte();
uint len = s.ReadUInt();
if (type == Compression.kZlib) {
short streamType = s.ReadShort();
byte[] buf = s.ReadBytes((int)len - 2);
// Create a zlib-compatible inflator
// Note: incoming has no zlib header/footer
// System.IO.Compression sucks.
Inflater zlib = new Inflater(true);
zlib.Inflate(buf);
Buffer.BlockCopy(BitConverter.GetBytes(streamType), 0, fBuffer, 0, 2);
Buffer.BlockCopy(buf, 0, fBuffer, 2, buf.Length);
} else
fBuffer = s.ReadBytes((int)len);
}
示例13: Read
public override void Read(hsStream s, hsResMgr mgr)
{
fSender = mgr.ReadKey(s);
fReceivers.Capacity = s.ReadInt();
for (int i = 0; i < fReceivers.Capacity; i++)
fReceivers.Add(mgr.ReadKey(s));
if (s.Version.IsPlasma20)
fTimeStamp = s.ReadDouble();
fBCastFlags = (plBCastFlags)s.ReadInt();
}
示例14: ReadString
/// <summary>
/// Reads in a UTF-16 string with an int32 size
/// </summary>
/// <param name="s">Stream to read from</param>
/// <returns>Resulting string</returns>
public static string ReadString(hsStream s)
{
byte[] data = s.ReadBytes(s.ReadInt());
return Encoding.Unicode.GetString(data).Replace("\0", null);
}
示例15: Read
public void Read(hsStream s)
{
pnVaultNodeFields f = (pnVaultNodeFields)s.ReadULong();
for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
switch (f & (pnVaultNodeFields)bit) {
case pnVaultNodeFields.Blob_1:
fBlob[0] = s.ReadBytes(s.ReadInt());
break;
case pnVaultNodeFields.Blob_2:
fBlob[1] = s.ReadBytes(s.ReadInt());
break;
case pnVaultNodeFields.CreateAgeName:
fCreateAgeName = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.CreateAgeUuid:
fCreateAgeGuid = pnHelpers.ReadUuid(s);
break;
case pnVaultNodeFields.CreateTime:
fCreateTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
break;
case pnVaultNodeFields.CreatorIdx:
fCreatorID = s.ReadUInt();
break;
case pnVaultNodeFields.CreatorUuid:
fCreatorGuid = pnHelpers.ReadUuid(s);
break;
case pnVaultNodeFields.Int32_1:
fInt32[0] = s.ReadInt();
break;
case pnVaultNodeFields.Int32_2:
fInt32[1] = s.ReadInt();
break;
case pnVaultNodeFields.Int32_3:
fInt32[2] = s.ReadInt();
break;
case pnVaultNodeFields.Int32_4:
fInt32[3] = s.ReadInt();
break;
case pnVaultNodeFields.IString64_1:
fIString64[0] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.IString64_2:
fIString64[1] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.ModifyTime:
fModifyTime = plUnifiedTime.Epoch.AddSeconds((double)s.ReadInt());
break;
case pnVaultNodeFields.NodeIdx:
fNodeID = s.ReadUInt();
break;
case pnVaultNodeFields.NodeType:
fNodeType = (ENodeType)s.ReadUInt();
break;
case pnVaultNodeFields.String64_1:
fString64[0] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.String64_2:
fString64[1] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.String64_3:
fString64[2] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.String64_4:
fString64[3] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.String64_5:
fString64[4] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.String64_6:
fString64[5] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.Text_1:
fText[0] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.Text_2:
fText[1] = pnHelpers.ReadString(s);
break;
case pnVaultNodeFields.UInt32_1:
fUInt32[0] = s.ReadUInt();
break;
case pnVaultNodeFields.UInt32_2:
fUInt32[1] = s.ReadUInt();
break;
case pnVaultNodeFields.UInt32_3:
fUInt32[2] = s.ReadUInt();
break;
case pnVaultNodeFields.UInt32_4:
fUInt32[3] = s.ReadUInt();
break;
case pnVaultNodeFields.Uuid_1:
fGuid[0] = pnHelpers.ReadUuid(s);
break;
case pnVaultNodeFields.Uuid_2:
fGuid[1] = pnHelpers.ReadUuid(s);
break;
case pnVaultNodeFields.Uuid_3:
fGuid[2] = pnHelpers.ReadUuid(s);
break;
case pnVaultNodeFields.Uuid_4:
fGuid[3] = pnHelpers.ReadUuid(s);
//.........这里部分代码省略.........