fix #234: port retail appraisal floaty and inscriptions

This commit is contained in:
Erik 2026-07-23 12:12:57 +02:00
parent 643cdfe66e
commit f1a7912160
23 changed files with 1310 additions and 106 deletions

View file

@ -93,6 +93,39 @@ public sealed class GameEventWiringTests
Assert.False(items.Get(guid)!.Properties.Ints.ContainsKey(25u));
}
[Fact]
public void WireAll_LiteralAceCreatureFlag_ForwardsAndUpdatesHealth()
{
const uint guid = 0x50000001u;
var dispatcher = new GameEventDispatcher();
var combat = new CombatState();
AppraiseInfoParser.Parsed? received = null;
GameEventWiring.WireAll(
dispatcher,
new ClientObjectTable(),
combat,
new Spellbook(),
new ChatLog(),
onAppraisal: appraisal => received = appraisal);
byte[] payload = new byte[24];
BinaryPrimitives.WriteUInt32LittleEndian(payload, guid);
BinaryPrimitives.WriteUInt32LittleEndian(
payload.AsSpan(4),
0x0100u); // ACE IdentifyResponseFlags.CreatureProfile
BinaryPrimitives.WriteUInt32LittleEndian(payload.AsSpan(8), 1u);
BinaryPrimitives.WriteUInt32LittleEndian(payload.AsSpan(12), 0u);
BinaryPrimitives.WriteUInt32LittleEndian(payload.AsSpan(16), 75u);
BinaryPrimitives.WriteUInt32LittleEndian(payload.AsSpan(20), 100u);
dispatcher.Dispatch(GameEventEnvelope.TryParse(
WrapEnvelope(GameEventType.IdentifyObjectResponse, payload))!.Value);
Assert.NotNull(received);
Assert.NotNull(received.Value.CreatureProfile);
Assert.Equal(0.75f, combat.GetHealthPercent(guid), 3);
}
[Fact]
public void WireAll_ChannelBroadcast_RoutesToChatLog()