feat: add PF links

This commit is contained in:
Anna
2022-01-16 01:29:44 -05:00
parent 56159148b7
commit 1013c0af8c
4 changed files with 51 additions and 1 deletions
+12 -1
View File
@@ -65,9 +65,20 @@ internal static class ChunkUtil {
break;
case PayloadType.Unknown:
var rawPayload = (RawPayload) payload;
if (rawPayload.Data[1] == 0x13) {
if (rawPayload.Data.Length > 1 && rawPayload.Data[1] == 0x13) {
foreground.Pop();
glow.Pop();
} else if (rawPayload.Data.Length > 7 && rawPayload.Data[1] == 0x27 && rawPayload.Data[3] == 0x0A) {
// pf payload
unsafe {
fixed (byte* data = rawPayload.Data) {
var id = *(uint*) (data + 4) >> 8;
id = ((id & 0xFF) << 16)
| (id & 0xFF00)
| (id & 0xFF0000) >> 16;
link = new PartyFinderPayload(id);
}
}
} else if (Equals(rawPayload, RawPayload.LinkTerminator)) {
link = null;
} else if (Equals(rawPayload, PeriodicRecruitmentLink)) {
+21
View File
@@ -0,0 +1,21 @@
using Dalamud.Game.Text.SeStringHandling;
namespace ChatTwo.Util;
internal class PartyFinderPayload : Payload {
public override PayloadType Type => (PayloadType) 0x50;
internal uint Id { get; }
internal PartyFinderPayload(uint id) {
this.Id = id;
}
protected override byte[] EncodeImpl() {
throw new NotImplementedException();
}
protected override void DecodeImpl(BinaryReader reader, long endOfStream) {
throw new NotImplementedException();
}
}