mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 11:03:51 +00:00
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.
This commit is contained in:
parent
f43b444056
commit
0ceb70f3e7
10 changed files with 655 additions and 0 deletions
|
|
@ -1953,6 +1953,16 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Export binary .wscs to a human-editable JSON sidecar (defaults to <base>.wscs.json)\n");
|
||||
std::printf(" --import-wscs-json <json-path> [out-base]\n");
|
||||
std::printf(" Import a .wscs.json sidecar back into binary .wscs (accepts costKind int OR costKindName string)\n");
|
||||
std::printf(" --gen-ifs <wifs-base> [name]\n");
|
||||
std::printf(" Emit .wifs 8 canonical Item.dbc flag bits (NoLoot / Conjured / Lootable / Wrapped / Heroic / Deprecated / NoUserDestroy / NoEquipCooldown)\n");
|
||||
std::printf(" --gen-ifs-binding <wifs-base> [name]\n");
|
||||
std::printf(" Emit .wifs 5 binding-related flags (BindOnPickup / BindOnEquip / BindOnUse / BindToAccount / Soulbound) — all isPositive=0 (restrict trading)\n");
|
||||
std::printf(" --gen-ifs-server <wifs-base> [name]\n");
|
||||
std::printf(" Emit .wifs 5 server-custom flag bits in upper range (Donator / EventReward / Anniversary / Honored / Heroic25man)\n");
|
||||
std::printf(" --info-wifs <wifs-base> [--json]\n");
|
||||
std::printf(" Print WIFS entries (id / bitMask hex / kind / +/- positivity / name) — handy for decoding raw item.flags integers\n");
|
||||
std::printf(" --validate-wifs <wifs-base> [--json]\n");
|
||||
std::printf(" Static checks: id+name+bitMask required, flagKind 0..6, no duplicate ids, no duplicate bitMasks (collision); warns on multi-bit masks (unusual, usually want a single bit)\n");
|
||||
std::printf(" --gen-weather-temperate <wow-base> [zoneName]\n");
|
||||
std::printf(" Emit .wow weather schedule: clear-dominant + occasional rain + fog (forest / grassland)\n");
|
||||
std::printf(" --gen-weather-arctic <wow-base> [zoneName]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue