fix(ui): port exact selected health policy

Replace the toolbar's PWD-bit approximation with retail ObjectIsAttackable composed with the exact player and pet short-circuits. Carry second-header PetOwner through CreateObject, session, and ClientObject state so self, pet, and Free-PK cases match retail while friendly NPCs and attackable non-creatures remain name-only.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-11 11:42:04 +02:00
parent 52a80dc531
commit 2644d1d527
18 changed files with 416 additions and 50 deletions

View file

@ -39,6 +39,17 @@ public sealed class WorldSessionRadarTests
Assert.Equal("Pyreal Scarabs", spawn.PluralName);
}
[Fact]
public void ToEntitySpawn_PreservesPetOwner()
{
var spawn = WorldSession.ToEntitySpawn(MinimalParsed() with
{
PetOwnerId = 0x50000002u,
});
Assert.Equal(0x50000002u, spawn.PetOwnerId);
}
private static CreateObject.Parsed MinimalParsed() => new(
Guid: 0x50000001u,
Position: null,