feat(pipeline): WIRC item random-property pool catalog (137th open format)

Novel replacement for the random-suffix enchant pool that
vanilla WoW carried in ItemRandomProperties.dbc +
ItemRandomSuffix.dbc (TBC+) + the per-item RandomProperty
rolls baked into the LootMgr. Each WIRC entry binds one
random-property pool to a name suffix ("of the Bear", "of the
Eagle"), a weighted enchant table (variable-length array of
{enchantId, weight}), and the equipment slots + class
restrictions where the suffix can roll.

At loot time, each green+ item rolls one pool based on its
slot, then picks one enchant from that pool weighted by
enchant.weight / totalWeight. The denormalized totalWeight
field is precomputed for the loot generator's hot-path roll.

Three presets covering the canonical vanilla suffix archetypes:
  --gen-irc-bear   STA-focused for plate slots (Helm/Chest/
                   Leg/Boot) with 4 weighted +Sta enchants
                   (3/5/7/10 — middle tier most common at
                   weight 50/100). Warrior+Paladin+DK class
                   mask
  --gen-irc-eagle  INT+STA caster pool for cloth slots with
                   5 weighted +Int+Sta enchants (3/5/7/10/12).
                   Mage+Priest+Warlock class mask
  --gen-irc-tiger  STR+AGI hybrid for leather slots with 5
                   weighted enchants. Rogue+Hunter+Druid class
                   mask

Validator catches: id+name required, allowedSlotsMask != 0
(else pool is unreachable — no slot would ever roll it),
non-empty enchant array, no zero-id enchants, no duplicate
enchantIds within same pool (should be merged with summed
weight). CRITICAL: totalWeight MUST equal sum of enchant
weights (else the loot generator's denormalized roll
mis-picks the distribution — players would see wrong rates of
each enchant tier). Warns on enchant weight=0 (never picked,
dead entry to remove or assign weight).

Format count 136 -> 137. CLI flag count 1427 -> 1434.
This commit is contained in:
Kelsi 2026-05-10 05:01:16 -07:00
parent af59866f3d
commit b6a88ff964
10 changed files with 725 additions and 0 deletions

View file

@ -181,6 +181,7 @@
#include "cli_world_locations_catalog.hpp"
#include "cli_soulbind_rules_catalog.hpp"
#include "cli_creature_behavior_catalog.hpp"
#include "cli_random_property_catalog.hpp"
#include "cli_catalog_pluck.hpp"
#include "cli_catalog_find.hpp"
#include "cli_catalog_by_name.hpp"
@ -407,6 +408,7 @@ constexpr DispatchFn kDispatchTable[] = {
handleWorldLocationsCatalog,
handleSoulbindRulesCatalog,
handleCreatureBehaviorCatalog,
handleRandomPropertyCatalog,
handleCatalogPluck,
handleCatalogFind,
handleCatalogByName,