From 56d2dbbc27281b048b7f8cd871a0a2b02e08423a Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 16 Sep 2026 22:25:44 -0500 Subject: [PATCH] fix(player): file WEAPON_SLOT_CHANGED under PaperDollInfo Blizzard's generated API docs put all three of this file's events in the PaperDollInfo system (PaperDollInfoDocumentation.lua), so the descriptor said the wrong system and would have invented a stray "Item" grouping in the /classicapi browser. Filing it correctly also lines up PLAYER_EQUIPMENT_CHANGED and UPDATE_INVENTORY_DURABILITY for whenever they get descriptors of their own. Same source confirms the payload: the entry carries no Payload field, so no arguments is right. It is also flagged UniqueEvent where the two per-slot events are SynchronousEvent -- recorded in the header comment, since that makes the per-frame coalescing the event's own shape rather than a local preference. --- src/player/Equipment.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/player/Equipment.cpp b/src/player/Equipment.cpp index bcf61964..0eaf0f43 100644 --- a/src/player/Equipment.cpp +++ b/src/player/Equipment.cpp @@ -59,7 +59,10 @@ // most one fire per frame via a dirty flag drained on WorldTick, because // one action can change two weapon slots (a two-hander replacing a // one-hander plus an off-hand) and the per-slot observer would otherwise -// fire twice for it. With no payload there's nothing to lose by merging. +// fire twice for it. With no payload there's nothing to lose by merging — +// and Blizzard's generated docs flag this event `UniqueEvent`, where the +// two per-slot events above are `SynchronousEvent`, so coalescing is the +// event's own shape rather than a local preference. // Slot 18 is exempted for the classes whose slot 18 is a RELIC slot // (Libram / Idol / Totem) — see IsWeaponSlot. @@ -85,9 +88,13 @@ const Event::Custom::AutoReserve _r{kEvtEquipmentChanged}; constexpr const char *kEvtDurability = "UPDATE_INVENTORY_DURABILITY"; const Event::Custom::AutoReserve _r2{kEvtDurability}; +// System per Blizzard's own generated docs, where all three of this +// file's events live (PaperDollInfoDocumentation.lua) — so documenting +// PLAYER_EQUIPMENT_CHANGED / UPDATE_INVENTORY_DURABILITY later puts them +// in the same place. constexpr const char *kEvtWeaponSlotChanged = "WEAPON_SLOT_CHANGED"; const Game::Doc::Event kWeaponSlotChangedDoc{ - "Item", + "PaperDollInfo", "Fires when the item in a weapon slot changes: main hand, off hand, or " "ranged.", {}};