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); }
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); } }
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)); }
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)); }
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())); } } }
public override void Read(hsStream s, hsResMgr mgr) { base.Read(s, mgr); fCommand = (Cmd)s.ReadInt(); fString = s.ReadStdString(); }
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); }
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); } }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); fNodeIDs = new uint[s.ReadInt()]; for (int i = 0; i < fNodeIDs.Length; i++) fNodeIDs[i] = s.ReadUInt(); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); // I'm not eap, so just embed the vault node into the stream // Forget crazy buffer hacks. if (s.ReadBool()) { fNode = new pnVaultNode(); fNode.Read(s); } }
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); } }
protected override void IRead(hsStream s, hsResMgr mgr) { fState = s.ReadInt(); }
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)); }
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); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); fPlayerID = s.ReadUInt(); fPlayerName = pnHelpers.ReadString(s, 40); fShape = pnHelpers.ReadString(s, 64); }
public static proEventData Read(hsStream s, hsResMgr mgr) { proEventData e = ICreateEventDataType((EventType)s.ReadInt()); if (e != null) e.IRead(s, mgr); return e; }
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(); }
/// <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); }
protected override void IRead(hsStream s, hsResMgr mgr) { fStage = s.ReadInt(); fEvent = s.ReadInt(); fAvatar = mgr.ReadKey(s); }
protected override void IRead(hsStream s, hsResMgr mgr) { fName = s.ReadSafeString(); fDataType = (DataType)s.ReadInt(); fNumber = s.ReadFloat(); fKey = mgr.ReadKey(s); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); fNodeRefs = new pnVaultNodeRef[s.ReadInt()]; for (int i = 0; i < fNodeRefs.Length; i++) { fNodeRefs[i] = new pnVaultNodeRef(); fNodeRefs[i].Read(s); } }
protected override void IRead(hsStream s, hsResMgr mgr) { fControlKey = s.ReadInt(); fDown = s.ReadBool(); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fPingTimeMs = s.ReadUInt(); fPayload = s.ReadBytes(s.ReadInt()); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); fAcctGuid = pnHelpers.ReadUuid(s); fFlags = s.ReadUInt(); fBillingType = s.ReadUInt(); fDroidKey = new uint[4]; for (int i = 0; i < fDroidKey.Length; i++) fDroidKey[i] = s.ReadUInt(); }
public override void Read(hsStream s) { fTransID = s.ReadUInt(); fResult = (ENetError)s.ReadInt(); }
public override void Read(hsStream s) { fReason = (ENetError)s.ReadInt(); }
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); break; } } }
public override void Read(hsStream s) { fAddress = new IPAddress((long)s.ReadInt()); fToken = pnHelpers.ReadUuid(s); }
internal static int VariableLengthRead(hsStream s, int size) { if (size < 0x100) return (int)s.ReadByte(); else if (size < 0x10000) return (int)s.ReadShort(); else return s.ReadInt(); }
protected override void IRead(hsStream s, hsResMgr mgr) { fOfferer = mgr.ReadKey(s); fTargetAge = s.ReadInt(); fOfferee = s.ReadInt(); }