feat(items): port retail shared cooldown overlays
Preserve public shared-cooldown metadata, resolve the authoritative cooldown enchantment with retail expiry semantics, and project the exact ten DAT-authored radial steps through the shared retained item-slot architecture. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
19e8863f4e
commit
6b1ae4fb76
27 changed files with 875 additions and 20 deletions
|
|
@ -210,6 +210,11 @@ public static class CreateObject
|
|||
// PublicWeenieDesc._spellID, gated by PWD_Packed_SpellID. The packed
|
||||
// wire field is u16 and widens into retail's u32 runtime member.
|
||||
uint? SpellId = null,
|
||||
// PublicWeenieDesc second-header cooldown metadata. The group id is
|
||||
// compared against the player's cooldown enchantment list; the
|
||||
// duration scales the shared UIItem radial countdown.
|
||||
uint? CooldownId = null,
|
||||
double? CooldownDuration = null,
|
||||
// Complete immutable PhysicsDesc projection. Kept alongside the
|
||||
// legacy convenience fields while live-entity ownership migrates to
|
||||
// LiveEntityRuntime in Step 2.
|
||||
|
|
@ -871,6 +876,8 @@ public static class CreateObject
|
|||
uint uiEffects = 0;
|
||||
uint weenieFlags2 = 0;
|
||||
uint? petOwnerId = null;
|
||||
uint? cooldownId = null;
|
||||
double? cooldownDuration = null;
|
||||
try
|
||||
{
|
||||
// BF_INCLUDES_SECOND_HEADER = 0x04000000 per acclient.h:6458
|
||||
|
|
@ -1075,11 +1082,12 @@ public static class CreateObject
|
|||
if ((weenieFlags2 & 0x00000002u) != 0) // CooldownId u32
|
||||
{
|
||||
if (body.Length - pos < 4) throw new FormatException("trunc CooldownId");
|
||||
pos += 4;
|
||||
cooldownId = ReadU32(body, ref pos);
|
||||
}
|
||||
if ((weenieFlags2 & 0x00000004u) != 0) // CooldownDuration f64
|
||||
{
|
||||
if (body.Length - pos < 8) throw new FormatException("trunc CooldownDuration");
|
||||
cooldownDuration = BinaryPrimitives.ReadDoubleLittleEndian(body.Slice(pos));
|
||||
pos += 8;
|
||||
}
|
||||
if ((weenieFlags2 & 0x00000008u) != 0) // PetOwner u32
|
||||
|
|
@ -1119,6 +1127,8 @@ public static class CreateObject
|
|||
PetOwnerId: petOwnerId,
|
||||
AmmoType: ammoType,
|
||||
SpellId: spellId,
|
||||
CooldownId: cooldownId,
|
||||
CooldownDuration: cooldownDuration,
|
||||
Physics: physics);
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
|
|
@ -184,5 +184,7 @@ public static class ObjectTableWiring
|
|||
PluralName: s.PluralName,
|
||||
PetOwnerId: s.PetOwnerId,
|
||||
AmmoType: s.AmmoType,
|
||||
SpellId: s.SpellId);
|
||||
SpellId: s.SpellId,
|
||||
CooldownId: s.CooldownId,
|
||||
CooldownDuration: s.CooldownDuration);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,8 @@ public sealed class WorldSession : IDisposable
|
|||
uint? PetOwnerId = null,
|
||||
ushort? AmmoType = null,
|
||||
uint? SpellId = null,
|
||||
uint? CooldownId = null,
|
||||
double? CooldownDuration = null,
|
||||
PhysicsSpawnData? Physics = null);
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -215,6 +217,8 @@ public sealed class WorldSession : IDisposable
|
|||
PetOwnerId: parsed.PetOwnerId,
|
||||
AmmoType: parsed.AmmoType,
|
||||
SpellId: parsed.SpellId,
|
||||
CooldownId: parsed.CooldownId,
|
||||
CooldownDuration: parsed.CooldownDuration,
|
||||
Physics: parsed.Physics);
|
||||
|
||||
/// <summary>Fires when the session finishes parsing a CreateObject.</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue