Skip to content

Commit

Permalink
[Core] faceId >= 260
Browse files Browse the repository at this point in the history
  • Loading branch information
pk5ls20 committed Oct 21, 2024
1 parent 151a537 commit d7a2af7
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions Lagrange.Core/Message/Entity/FaceEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ IEnumerable<Elem> IMessageEntity.PackElement()
{
if (IsLargeFace)
{
var qFace = new QBigFaceExtra
var qBigFace = new QBigFaceExtra
{
AniStickerPackId = "1",
AniStickerId = "8",
Expand All @@ -36,8 +36,7 @@ IEnumerable<Elem> IMessageEntity.PackElement()
Field9 = 1
};
using var stream = new MemoryStream();
Serializer.Serialize(stream, qFace);

Serializer.Serialize(stream, qBigFace);
return new Elem[]
{
new()
Expand All @@ -51,11 +50,30 @@ IEnumerable<Elem> IMessageEntity.PackElement()
}
};
}
// TODO:
// else if (FaceId >= 260)
// {
//
// }

if (FaceId >= 260)
{
var qSmallFace = new QSmallFaceExtra
{
FaceId = FaceId,
Text = "",
CompatText = ""
};
using var stream = new MemoryStream();
Serializer.Serialize(stream, qSmallFace);
return new Elem[]
{
new()
{
CommonElem = new CommonElem
{
ServiceType = 33,
PbElem = stream.ToArray(),
BusinessType = 1
}
}
};
}

return new Elem[] { new() { Face = new Face { Index = FaceId } } };
}
Expand Down

0 comments on commit d7a2af7

Please sign in to comment.