本文整理汇总了C#中Plasma.hsStream.WriteInt方法的典型用法代码示例。如果您正苦于以下问题:C# hsStream.WriteInt方法的具体用法?C# hsStream.WriteInt怎么用?C# hsStream.WriteInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plasma.hsStream
的用法示例。
在下文中一共展示了hsStream.WriteInt方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public override void Write(hsStream s, hsResMgr mgr)
{
base.Write(s, mgr);
s.WriteInt(fInvisLevel);
s.WriteBool(fLeavingAge);
mgr.WriteKey(s, fLinkKey);
s.WriteInt(fEffects);
mgr.WriteKey(s, fLinkAnimKey);
}
示例2: Write
public override void Write(hsStream s)
{
s.WriteUInt(fTransID);
s.WriteInt((int)fResult);
pnHelpers.WriteUuid(s, fAcctGuid);
s.WriteInt(fPermissions);
if (fAvatars == null)
s.WriteInt(0);
else {
s.WriteInt(fAvatars.Length);
foreach (pnVaultAvatarInfo a in fAvatars)
a.Write(s);
}
}
示例3: Write
public override void Write(hsStream s, hsResMgr mgr)
{
base.Write(s, mgr);
s.WriteInt((int)fCommand);
s.WriteStdString(fString);
}
示例4: Write
public void Write(hsStream s)
{
pnVaultNodeFields f = Fields;
s.WriteULong((ulong)f);
for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
switch (f & (pnVaultNodeFields)bit) {
case pnVaultNodeFields.Blob_1:
s.WriteInt(fBlob[0].Length);
s.WriteBytes(fBlob[0]);
break;
case pnVaultNodeFields.Blob_2:
s.WriteInt(fBlob[1].Length);
s.WriteBytes(fBlob[1]);
break;
case pnVaultNodeFields.CreateAgeName:
pnHelpers.WriteString(s, fCreateAgeName);
break;
case pnVaultNodeFields.CreateAgeUuid:
pnHelpers.WriteUuid(s, fCreateAgeGuid.Value);
break;
case pnVaultNodeFields.CreateTime:
TimeSpan cts = fCreateTime.Value - plUnifiedTime.Epoch;
s.WriteUInt((uint)cts.Seconds);
break;
case pnVaultNodeFields.CreatorIdx:
s.WriteUInt(fCreatorID.Value);
break;
case pnVaultNodeFields.CreatorUuid:
pnHelpers.WriteUuid(s, fCreatorGuid.Value);
break;
case pnVaultNodeFields.Int32_1:
s.WriteInt(fInt32[0].Value);
break;
case pnVaultNodeFields.Int32_2:
s.WriteInt(fInt32[1].Value);
break;
case pnVaultNodeFields.Int32_3:
s.WriteInt(fInt32[2].Value);
break;
case pnVaultNodeFields.Int32_4:
s.WriteInt(fInt32[3].Value);
break;
case pnVaultNodeFields.IString64_1:
pnHelpers.WriteString(s, fIString64[0]);
break;
case pnVaultNodeFields.IString64_2:
pnHelpers.WriteString(s, fIString64[1]);
break;
case pnVaultNodeFields.ModifyTime:
TimeSpan mts = fModifyTime.Value - plUnifiedTime.Epoch;
s.WriteUInt((uint)mts.Seconds);
break;
case pnVaultNodeFields.NodeIdx:
s.WriteUInt(fNodeID.Value);
break;
case pnVaultNodeFields.NodeType:
s.WriteUInt((uint)fNodeType);
break;
case pnVaultNodeFields.String64_1:
pnHelpers.WriteString(s, fString64[0]);
break;
case pnVaultNodeFields.String64_2:
pnHelpers.WriteString(s, fString64[1]);
break;
case pnVaultNodeFields.String64_3:
pnHelpers.WriteString(s, fString64[2]);
break;
case pnVaultNodeFields.String64_4:
pnHelpers.WriteString(s, fString64[3]);
break;
case pnVaultNodeFields.String64_5:
pnHelpers.WriteString(s, fString64[4]);
break;
case pnVaultNodeFields.String64_6:
pnHelpers.WriteString(s, fString64[5]);
break;
case pnVaultNodeFields.Text_1:
pnHelpers.WriteString(s, fText[0]);
break;
case pnVaultNodeFields.Text_2:
pnHelpers.WriteString(s, fText[1]);
break;
case pnVaultNodeFields.UInt32_1:
s.WriteUInt(fUInt32[0].Value);
break;
case pnVaultNodeFields.UInt32_2:
s.WriteUInt(fUInt32[1].Value);
break;
case pnVaultNodeFields.UInt32_3:
s.WriteUInt(fUInt32[2].Value);
break;
case pnVaultNodeFields.UInt32_4:
s.WriteUInt(fUInt32[3].Value);
break;
case pnVaultNodeFields.Uuid_1:
pnHelpers.WriteUuid(s, fGuid[0].Value);
break;
case pnVaultNodeFields.Uuid_2:
pnHelpers.WriteUuid(s, fGuid[1].Value);
break;
//.........这里部分代码省略.........
示例5: Write
public override void Write(hsStream s)
{
s.WriteUInt(fTransID);
s.WriteInt((int)fResult);
if (fNodeIDs == null)
s.WriteInt(0);
else {
s.WriteInt(fNodeIDs.Length);
foreach (uint nodeID in fNodeIDs)
s.WriteUInt(nodeID);
}
}
示例6: IWrite
protected override void IWrite(hsStream s, hsResMgr mgr)
{
mgr.WriteKey(s, fOfferer);
s.WriteInt(fTargetAge);
s.WriteInt(fOfferee);
}
示例7: Write
public void Write(hsStream s, hsResMgr mgr)
{
if (this is proActivateEventData)
s.WriteInt((int)EventType.Activate);
else if (this is proBookEventData)
s.WriteInt((int)EventType.Book);
else if (this is proCallbackEventData)
s.WriteInt((int)EventType.Callback);
else if (this is proClickDragEventData)
s.WriteInt((int)EventType.ClickDrag);
else if (this is proClimbingBlockerHitEventData)
s.WriteInt((int)EventType.ClimbingBlockerHit);
else if (this is proCollisionEventData)
s.WriteInt((int)EventType.Collision);
else if (this is proContainedEventData)
s.WriteInt((int)EventType.Contained);
else if (this is proControlKeyEventData)
s.WriteInt((int)EventType.ControlKey);
else if (this is proCoopEventData)
s.WriteInt((int)EventType.Coop);
else if (this is proFacingEventData)
s.WriteInt((int)EventType.Facing);
else if (this is proMultiStageEventData)
s.WriteInt((int)EventType.MultiStage);
else if (this is proOfferLinkingBookEventData)
s.WriteInt((int)EventType.OfferLinkingBook);
else if (this is proPickedEventData)
s.WriteInt((int)EventType.Picked);
else if (this is proResponderStateEventData)
s.WriteInt((int)EventType.ResponderState);
else if (this is proSpawnedEventData)
s.WriteInt((int)EventType.Spawned);
else if (this is proVariableEventData)
s.WriteInt((int)EventType.Variable);
else
s.WriteInt((int)EventType.None);
IWrite(s, mgr);
}
示例8: Write
public override void Write(hsStream s)
{
s.WriteUInt(fTransID);
if (fPattern == null)
s.WriteInt(0);
else {
byte[] buf = fPattern.ToArray();
s.WriteInt(buf.Length);
s.WriteBytes(buf);
}
}
示例9: WriteString
/// <summary>
/// Writes a UTF-16 string with an int32 size
/// </summary>
/// <param name="s">Stream to write to</param>
/// <param name="data">String to write to the stream</param>
public static void WriteString(hsStream s, string data)
{
byte[] str = Encoding.Unicode.GetBytes(data);
s.WriteInt(str.Length + 2);
s.WriteBytes(str);
s.WriteUShort((ushort)0);
}
示例10: Write
public override void Write(hsStream s, hsResMgr mgr)
{
mgr.WriteKey(s, fSender);
s.WriteInt(fReceivers.Count);
for (int i = 0; i < fReceivers.Count; i++)
mgr.WriteKey(s, fReceivers[i]);
if (s.Version.IsPlasma20)
s.WriteDouble(fTimeStamp);
s.WriteInt((int)fBCastFlags);
}
示例11: Write
public override void Write(hsStream s, hsResMgr mgr)
{
base.Write(s, mgr);
// We're not going to compress the stream...
// Hope this is okay!
s.WriteInt(fBuffer.Length);
s.WriteByte((byte)Compression.kNone);
s.WriteInt(fBuffer.Length);
s.WriteBytes(fBuffer);
}
示例12: VariableLengthWrite
internal static void VariableLengthWrite(hsStream s, int size, int value)
{
if (size < 0x100)
s.WriteByte((byte)value);
else if (size < 0x10000)
s.WriteShort((short)value);
else
s.WriteInt(value);
}
示例13: Write
public override void Write(hsStream s, hsResMgr mgr)
{
s.WriteInt((int)fFlags);
if (HasVersion) {
s.WriteByte(fVerMajor);
s.WriteByte(fVerMinor);
}
if (HasTimeSent)
plUnifiedTime.Write(s, fTimeSent);
if (HasContext)
s.WriteUInt(fContext);
if (HasTransID)
s.WriteUInt(fTransID);
if (HasPlayerID)
s.WriteUInt(fPlayerID);
if (HasAccount)
s.WriteBytes(fAcctUUID.ToByteArray());
}
示例14: Write
public override void Write(hsStream s)
{
s.WriteUInt(fTransID);
s.WriteUInt(fNodeID);
pnHelpers.WriteUuid(s, fRevision);
if (fNode == null)
s.WriteInt(0);
else {
byte[] buf = fNode.ToArray();
s.WriteInt(buf.Length);
s.WriteBytes(buf);
}
}