fix(ui): port live experience quality updates (#217)
Parse retail PrivateUpdatePropertyInt64 and route authoritative Total/Available Experience through both local-player projections so Attributes, the level meter, and Skills refresh together. Preserve the existing retail XP curve and right-align the Total XP value. Close the user-confirmed item-give gate for #216 and record the named-retail/ACE/holtburger conformance evidence. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
parent
30d294506c
commit
84b7d2d7cd
15 changed files with 391 additions and 29 deletions
|
|
@ -90,6 +90,31 @@ public sealed class PlayerDescriptionParserTests
|
|||
Assert.Empty(p.Value.Attributes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TryParse_LoginInt64Table_PopulatesTotalAndAvailableExperience()
|
||||
{
|
||||
// ACE GameEventPlayerDescription: flags + weenie type, then the gated
|
||||
// Int64 hash-table (u16 count/u16 buckets + key/i64 pairs), then vector header.
|
||||
byte[] body = new byte[44];
|
||||
int pos = 0;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 0x0080u); pos += 4;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 1u); pos += 4;
|
||||
BinaryPrimitives.WriteUInt16LittleEndian(body.AsSpan(pos), 2); pos += 2;
|
||||
BinaryPrimitives.WriteUInt16LittleEndian(body.AsSpan(pos), 64); pos += 2;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 1u); pos += 4;
|
||||
BinaryPrimitives.WriteInt64LittleEndian(body.AsSpan(pos), 1_234_567_890L); pos += 8;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 2u); pos += 4;
|
||||
BinaryPrimitives.WriteInt64LittleEndian(body.AsSpan(pos), 75_000L); pos += 8;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 0u); pos += 4;
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(body.AsSpan(pos), 0u);
|
||||
|
||||
var parsed = PlayerDescriptionParser.TryParse(body);
|
||||
|
||||
Assert.NotNull(parsed);
|
||||
Assert.Equal(1_234_567_890L, parsed.Value.Properties.GetInt64(1u));
|
||||
Assert.Equal(75_000L, parsed.Value.Properties.GetInt64(2u));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TryParse_AttributeBlock_PopulatesAllNineEntries()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue