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

@ -124,7 +124,8 @@ public sealed class WorldSession : IDisposable
byte? RadarBlipColor = null,
byte? RadarBehavior = null,
byte? CombatUse = null,
string? PluralName = null);
string? PluralName = null,
uint? PetOwnerId = null);
/// <summary>
/// Projects the wire-level CreateObject result into the stable session
@ -177,7 +178,8 @@ public sealed class WorldSession : IDisposable
RadarBlipColor: parsed.RadarBlipColor,
RadarBehavior: parsed.RadarBehavior,
CombatUse: parsed.CombatUse,
PluralName: parsed.PluralName);
PluralName: parsed.PluralName,
PetOwnerId: parsed.PetOwnerId);
/// <summary>Fires when the session finishes parsing a CreateObject.</summary>
public event Action<EntitySpawn>? EntitySpawned;