Kelsidavis-WoWee/tools/editor/cli_item_flags_catalog.hpp

13 lines
231 B
C++
Raw Normal View History

feat(editor): add WIFS (Item Flag Set) open catalog format Open replacement for the bit-flag meanings used in Item.dbc / item_template.Flags. Documents every individual bit of the 32-bit item flags field with a human-readable name, description, kind classification, and is-positive hint. WoW's Item.dbc Flags field packs ~25 bits of metadata like Heroic, Lootable, NoLoot, Conjured, BindOnPickup, BindOnEquip — each controlling a specific gameplay behavior. The hardcoded client knows what each bit means via a switch statement; this catalog exposes that table to data-driven editors so: - server admins can document custom flag bits - tooltip generators can decode "why is this item soulbound?" via flag-name lookup (decode(0x40240000) returns ["Heroic", "BindOnPickup", "Unique"]) - validators can warn about contradictory flag combinations Seven flagKind values classify the bit families (Quality / Drop / Trade / Magic / Account / Server / Misc), and an isPositive hint tells UIs whether the flag enhances the item (green) or restricts it (red). Cross-references back to WIT (decodes WIT.flags into the matching named flag list) and WIQR (validators can pair Heroic flag with WIQR Epic+ quality requirement). Three preset emitters: --gen-ifs (8 canonical Item.dbc bits matching the standard 3.3.5a constants), --gen-ifs-binding (5 binding-related flags BindOnPickup / BindOnEquip / etc — all restrictive so isPositive=0), --gen-ifs-server (5 server-custom bits in the upper range demonstrating how to overlay extra metadata without colliding with Blizzard's bits). Validation enforces id+name+bitMask presence, flagKind 0..6, no duplicate ids, no duplicate bitMasks (collision means engine would only honor first matching name when decoding); warns on multi-bit masks (unusual — usually want individual bits). decode(flagsValue) is the engine helper that expands a raw flags integer into its named flag list — used directly by the tooltip generator and item info renderers. Wired through the cross-format table; WIFS appears automatically in all 16 cross-format utilities. Format count 85 -> 86; CLI flag count 1018 -> 1023.
2026-05-09 23:10:35 -07:00
#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleItemFlagsCatalog(int& i, int argc, char** argv,
int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee