Class Payload
This class represents a parsed SeString payload.
Inheritance
System.Object
Payload
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Dalamud.dll
Syntax
public abstract class Payload
Fields
|
Improve this Doc
View Source
DataResolver
The Lumina instance to use for any necessary data lookups.
Declaration
protected DataManager DataResolver
Field Value
|
Improve this Doc
View Source
END_BYTE
Declaration
protected const byte END_BYTE = 3
Field Value
| Type |
Description |
| System.Byte |
|
|
Improve this Doc
View Source
START_BYTE
Declaration
protected const byte START_BYTE = 2
Field Value
| Type |
Description |
| System.Byte |
|
Properties
|
Improve this Doc
View Source
Dirty
Whether this payload has been modified since the last Encode().
Declaration
public bool Dirty { get; protected set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Type
The type of this payload.
Declaration
public abstract PayloadType Type { get; }
Property Value
Methods
|
Improve this Doc
View Source
Decode(BinaryReader, DataManager)
Decodes a binary representation of a payload into its corresponding nice object payload.
Declaration
public static Payload Decode(BinaryReader reader, DataManager data)
Parameters
| Type |
Name |
Description |
| System.IO.BinaryReader |
reader |
A reader positioned at the start of the payload, and containing at least one entire payload.
|
| DataManager |
data |
|
Returns
| Type |
Description |
| Payload |
The constructed Payload-derived object that was decoded from the binary data.
|
|
Improve this Doc
View Source
DecodeImpl(BinaryReader, Int64)
Decodes a byte stream from the game into a payload object.
Declaration
protected abstract void DecodeImpl(BinaryReader reader, long endOfStream)
Parameters
| Type |
Name |
Description |
| System.IO.BinaryReader |
reader |
A BinaryReader containing at least all the data for this payload.
|
| System.Int64 |
endOfStream |
The location holding the end of the data for this payload.
|
|
Improve this Doc
View Source
Encode(Boolean)
Encode this payload object into a byte[] useable in-game for things like the chat log.
Declaration
public byte[] Encode(bool force = false)
Parameters
| Type |
Name |
Description |
| System.Boolean |
force |
If true, ignores any cached value and forcibly reencodes the payload from its internal representation.
|
Returns
| Type |
Description |
| System.Byte[] |
A byte[] suitable for use with in-game handlers such as the chat log.
|
|
Improve this Doc
View Source
EncodeImpl()
Encodes the internal state of this payload into a byte[] suitable for sending to in-game
handlers such as the chat log.
Declaration
protected abstract byte[] EncodeImpl()
Returns
| Type |
Description |
| System.Byte[] |
Encoded binary payload data suitable for use with in-game handlers.
|
|
Improve this Doc
View Source
GetInteger(BinaryReader)
Declaration
protected static uint GetInteger(BinaryReader input)
Parameters
| Type |
Name |
Description |
| System.IO.BinaryReader |
input |
|
Returns
| Type |
Description |
| System.UInt32 |
|
|
Improve this Doc
View Source
GetMarkerForIntegerBytes(Byte[])
Declaration
protected virtual byte GetMarkerForIntegerBytes(byte[] bytes)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
bytes |
|
Returns
| Type |
Description |
| System.Byte |
|
|
Improve this Doc
View Source
GetMarkerForPackedIntegerBytes(Byte[])
Declaration
protected virtual byte GetMarkerForPackedIntegerBytes(byte[] bytes)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
bytes |
|
Returns
| Type |
Description |
| System.Byte |
|
|
Improve this Doc
View Source
GetPackedIntegers(BinaryReader)
Declaration
protected (uint, uint) GetPackedIntegers(BinaryReader input)
Parameters
| Type |
Name |
Description |
| System.IO.BinaryReader |
input |
|
Returns
| Type |
Description |
| System.ValueTuple<System.UInt32, System.UInt32> |
|
|
Improve this Doc
View Source
MakeInteger(UInt32, Boolean, Boolean)
Declaration
protected virtual byte[] MakeInteger(uint value, bool withMarker = true, bool incrementSmallInts = true)
Parameters
| Type |
Name |
Description |
| System.UInt32 |
value |
|
| System.Boolean |
withMarker |
|
| System.Boolean |
incrementSmallInts |
|
Returns
| Type |
Description |
| System.Byte[] |
|
|
Improve this Doc
View Source
MakePackedInteger(UInt32, UInt32, Boolean)
Declaration
protected byte[] MakePackedInteger(uint val1, uint val2, bool withMarker = true)
Parameters
| Type |
Name |
Description |
| System.UInt32 |
val1 |
|
| System.UInt32 |
val2 |
|
| System.Boolean |
withMarker |
|
Returns
| Type |
Description |
| System.Byte[] |
|