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
|
|
@ -1,6 +1,7 @@
|
|||
using AcDream.Core.Items;
|
||||
using AcDream.Core.Net;
|
||||
using AcDream.Core.Net.Messages;
|
||||
using AcDream.Core.Player;
|
||||
|
||||
namespace AcDream.Core.Net.Tests;
|
||||
|
||||
|
|
@ -116,6 +117,37 @@ public sealed class ObjectTableWiringTests
|
|||
Assert.Equal(0x50000001u, d.PetOwnerId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ApplyPlayerInt64PropertyUpdate_SynchronizesBothPlayerProjections()
|
||||
{
|
||||
const uint playerGuid = 0x50000001u;
|
||||
var table = new ClientObjectTable();
|
||||
var playerObject = new ClientObject { ObjectId = playerGuid };
|
||||
playerObject.Properties.Int64s[2u] = 0L;
|
||||
table.AddOrUpdate(playerObject);
|
||||
|
||||
var localPlayer = new LocalPlayerState();
|
||||
var loginProperties = new PropertyBundle();
|
||||
loginProperties.Int64s[2u] = 0L;
|
||||
localPlayer.OnProperties(loginProperties);
|
||||
|
||||
int tableChanges = 0;
|
||||
int playerChanges = 0;
|
||||
table.ObjectUpdated += _ => tableChanges++;
|
||||
localPlayer.CharacterChanged += () => playerChanges++;
|
||||
|
||||
ObjectTableWiring.ApplyPlayerInt64PropertyUpdate(
|
||||
table,
|
||||
localPlayer,
|
||||
playerGuid,
|
||||
new WorldSession.PlayerInt64PropertyUpdate(2u, 75_000L));
|
||||
|
||||
Assert.Equal(75_000L, table.Get(playerGuid)!.Properties.GetInt64(2u));
|
||||
Assert.Equal(75_000L, localPlayer.Properties.GetInt64(2u));
|
||||
Assert.Equal(1, tableChanges);
|
||||
Assert.Equal(1, playerChanges);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The handler that ObjectTableWiring.Wire subscribes to session.EntityDeleted.
|
||||
// Testing it directly avoids needing a live WorldSession (UDP socket).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue