2026-05-09 19:27:48 -07:00
|
|
|
#include "cli_format_table.hpp"
|
|
|
|
|
|
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace editor {
|
|
|
|
|
namespace cli {
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
constexpr FormatMagicEntry kFormats[] = {
|
|
|
|
|
{{'W','O','M',' '}, ".wom", "asset", nullptr, "M2 model"},
|
|
|
|
|
{{'W','O','B',' '}, ".wob", "asset", nullptr, "WMO building"},
|
|
|
|
|
{{'W','H','M',' '}, ".whm", "world", nullptr, "ADT heightmap"},
|
|
|
|
|
{{'W','O','T',' '}, ".wot", "world", nullptr, "ADT textures"},
|
|
|
|
|
{{'W','O','W',' '}, ".wow", "world", nullptr, "Per-zone world manifest"},
|
|
|
|
|
{{'W','I','T','M'}, ".wit", "items", "--info-witm", "Item catalog"},
|
|
|
|
|
{{'W','C','R','T'}, ".wcrt", "creatures", "--info-creatures", "Creature catalog"},
|
|
|
|
|
{{'W','S','P','N'}, ".wspn", "spawns", "--info-spawns", "Spawn catalog"},
|
|
|
|
|
{{'W','L','O','T'}, ".wlot", "loot", "--info-loot", "Loot tables"},
|
|
|
|
|
{{'W','G','O','T'}, ".wgot", "objects", "--info-objects", "GameObject catalog"},
|
|
|
|
|
{{'W','S','N','D'}, ".wsnd", "audio", "--info-sound", "Sound entries"},
|
|
|
|
|
{{'W','S','P','L'}, ".wspl", "spells", "--info-wspl", "Spell catalog"},
|
|
|
|
|
{{'W','Q','T','M'}, ".wqt", "quests", "--info-quests", "Quest catalog"},
|
|
|
|
|
{{'W','M','S','X'}, ".wms", "maps", "--info-wms", "Map / area catalog"},
|
|
|
|
|
{{'W','C','H','C'}, ".wchc", "chars", "--info-wchc", "Class + race catalog"},
|
|
|
|
|
{{'W','A','C','H'}, ".wach", "achieve", "--info-wach", "Achievement catalog"},
|
|
|
|
|
{{'W','T','R','N'}, ".wtrr", "trainers", "--info-wtrr", "Trainer catalog"},
|
|
|
|
|
{{'W','G','S','P'}, ".wgoss", "gossip", "--info-wgoss", "Gossip menu catalog"},
|
|
|
|
|
{{'W','T','A','X'}, ".wtax", "taxi", "--info-wtax", "Taxi node catalog"},
|
|
|
|
|
{{'W','T','A','L'}, ".wtal", "talents", "--info-wtal", "Talent catalog"},
|
|
|
|
|
{{'W','T','K','N'}, ".wtkn", "tokens", "--info-wtkn", "Token catalog"},
|
|
|
|
|
{{'W','T','R','G'}, ".wtrg", "triggers", "--info-wtrg", "Trigger catalog"},
|
|
|
|
|
{{'W','T','I','T'}, ".wttl", "titles", "--info-wttl", "Title catalog"},
|
|
|
|
|
{{'W','S','E','A'}, ".wevt", "events", "--info-wevt", "Event catalog"},
|
|
|
|
|
{{'W','M','O','U'}, ".wmnt", "mounts", "--info-wmnt", "Mount catalog"},
|
|
|
|
|
{{'W','B','G','D'}, ".wbgd", "battle", "--info-wbgd", "Battleground catalog"},
|
|
|
|
|
{{'W','M','A','L'}, ".wmal", "mail", "--info-wmal", "Mail catalog"},
|
|
|
|
|
{{'W','G','E','M'}, ".wgem", "gems", "--info-wgem", "Gem catalog"},
|
|
|
|
|
{{'W','G','L','D'}, ".wgld", "guilds", "--info-wgld", "Guild catalog"},
|
|
|
|
|
{{'W','P','C','D'}, ".wcnd", "cond", "--info-wcnd", "Condition catalog"},
|
|
|
|
|
{{'W','P','E','T'}, ".wpet", "pets", "--info-wpet", "Pet catalog"},
|
|
|
|
|
{{'W','A','U','C'}, ".wauc", "auction", "--info-wauc", "Auction catalog"},
|
|
|
|
|
{{'W','C','H','N'}, ".wchn", "channels", "--info-wchn", "Channel catalog"},
|
|
|
|
|
{{'W','C','M','S'}, ".wcms", "cinematic", "--info-wcms", "Cinematic catalog"},
|
|
|
|
|
{{'W','G','L','Y'}, ".wgly", "glyphs", "--info-wgly", "Glyph catalog"},
|
|
|
|
|
{{'W','V','H','C'}, ".wvhc", "vehicles", "--info-wvhc", "Vehicle catalog"},
|
|
|
|
|
{{'W','H','O','L'}, ".whol", "holiday", "--info-whol", "Holiday catalog"},
|
|
|
|
|
{{'W','L','I','Q'}, ".wliq", "liquids", "--info-wliq", "Liquid catalog"},
|
|
|
|
|
{{'W','A','N','I'}, ".wani", "anim", "--info-wani", "Animation catalog"},
|
|
|
|
|
{{'W','S','V','K'}, ".wsvk", "spellfx", "--info-wsvk", "Spell visual kit catalog"},
|
feat(pipeline): add WWUI (Wowee World-State UI) catalog
48th open format — replaces WorldStateUI.dbc plus the
AzerothCore-style world_state SQL data. Defines on-screen UI
elements that surface server-side world-state variables: BG
scoreboards (flag captures, base controls), Wintergrasp tank
counters, Eye of the Storm flag-carrier indicator, dungeon
boss progress, world-event collection trackers.
Each entry binds a server-side variableIndex to a UI panel
kind (counter / timer / flag-icon / progress-bar / two-sided
score / custom) gated by mapId+areaId, with optional
alwaysVisible and hideWhenZero flags and a chosen panel
position (top / bottom / top-left / top-right / center).
Cross-references with prior formats — mapId points at
WMS.mapId and areaId points at WMS.areaId.
CLI: --gen-wsui (3-entry BG scoreboard starter for WSG/AB/
EotS), --gen-wsui-wintergrasp (4-entry full Wintergrasp UI),
--gen-wsui-dungeon (3-entry boss/keys/treasure hunt UI),
--info-wwui, --validate-wwui with --json variants. Validator
catches id=0/duplicates, kind/position out of range,
variableIndex=0 warning, alwaysVisible+hideWhenZero conflict
warning, and (mapId, variableIndex) collision warning when
two entries would read the same server slot on the same map.
Also extends --list-formats and --info-magic with WWUI.
2026-05-09 19:32:15 -07:00
|
|
|
{{'W','W','U','I'}, ".wwui", "ui", "--info-wwui", "World-state UI catalog"},
|
feat(pipeline): add WPCN (Wowee Player Condition) catalog
49th open format — replaces PlayerCondition.dbc plus the
AzerothCore-style condition resolver. Defines reusable
boolean checks that other catalogs reference by conditionId
to gate gossip options, vendor items, quest availability,
achievement criteria, spell trainer offerings.
16 condition kinds (Always, Race, Class, Level, Zone, Map,
Reputation, AchievementWon, QuestComplete, QuestActive,
SpellKnown, ItemEquipped, Faction, InCombat, Mounted,
Resting), 8 comparison ops (==, !=, >, >=, <, <=, in-set,
not-in-set), and 4 chain ops (none, and, or, not) — chain
multiple conditions via chainNextId to express arbitrary
boolean trees.
Cross-references with prior formats — targetIdA is
polymorphic by conditionKind: resolves to WCHC raceId/classId,
WMS areaId/mapId, WFAC factionId, WACH achievementId, WQT
questId, WSPL spellId, or WIT itemId. chainNextId resolves
within the same WPCN catalog.
CLI: --gen-pcn (3 single-check starters), --gen-pcn-quest-gates
(4 cross-format quest gates with real WQT/WFAC/WACH/WMS IDs),
--gen-pcn-composite (3 leaves + 3 chained roots showing AND/
OR/NOT). Validator catches id=0/duplicates, kind/op out of
range, chain self-loop (infinite recursion), chainOp set
without chainNextId (dangling chain), chainNextId set without
chainOp (dead pointer warning), and unresolved chainNextId
references.
2026-05-09 19:36:56 -07:00
|
|
|
{{'W','P','C','N'}, ".wpcn", "logic", "--info-wpcn", "Player condition catalog"},
|
feat(pipeline): add WTSK (Wowee Trade Skill / Recipe) catalog
New open format — replaces SkillLineAbility.dbc plus the
recipe portions of SkillLine.dbc plus the AzerothCore
trade_skill SQL tables. Closes the crafting gap left by WSKL
(which carries skill lines but not the recipes that bind to
them).
14 professions (Blacksmithing, Tailoring, Engineering,
Alchemy, Enchanting, Leatherworking, Jewelcrafting,
Inscription, Mining, Skinning, Herbalism, Cooking, FirstAid,
Fishing). Each recipe has 4 skill-up bracket thresholds
(orange / yellow / green / gray) for skill-up probability,
a craft spell cross-ref (WSPL), produced item cross-ref
(WIT) with min/max quantity range, an optional tool item,
and up to 4 reagent slots (itemId + count).
Cross-references with prior formats — craftSpellId points at
WSPL.spellId, producedItemId / toolItemId / reagent[].itemId
all point at WIT.itemId, and skillId points at WSKL.skillId.
CLI: --gen-tsk (3-recipe entry-tier starter), --gen-tsk-
blacksmithing (5-recipe progression rough sharpening through
truesilver champion), --gen-tsk-alchemy (5-recipe progression
minor healing through flask of titans), --info-wtsk,
--validate-wtsk with --json variants. Validator catches
id=0/duplicates, profession out of range, missing craft spell
or produced item, monotonic-bracket check (must be orange <=
yellow <= green <= gray), reagent itemId-without-count
mismatch, and free-recipe warning (no reagents and no tool).
Format graph now exposes 49 distinct binary formats. CLI
flag count: 747 → 752.
2026-05-09 19:41:49 -07:00
|
|
|
{{'W','T','S','K'}, ".wtsk", "crafting", "--info-wtsk", "Trade skill recipe catalog"},
|
feat(pipeline): add WCEQ (Wowee Creature Equipment) — 50th open format
Replaces the AzerothCore-style creature_equip_template SQL
tables plus the visible-weapon / shield / ranged-slot data
that was traditionally embedded in creature templates. Closes
a long-standing gap in the creature subsystem: until now WCRT
defined a creature's stats, WSPN placed it in the world, and
WLOT defined what it drops — but nothing defined what items
it visibly equips.
Each entry binds a creatureId to up to three equipped items
(main hand / off hand / ranged) plus the visual kit that
fires when the main-hand weapon is brandished. equipFlags
bits encode hidden / dual-wield / shield-offhand /
thrown-ranged / 2H polearm to drive the renderer's
attachment-point selection.
Cross-references with prior formats — creatureId points at
WCRT.creatureId, mainHandItemId / offHandItemId / rangedItemId
all point at WIT.itemId, and mainHandVisualId points at
WSVK.visualKitId so brandished weapons can play their
signature glow / aura.
CLI: --gen-ceq (3 generic guard/hunter/rogue starters),
--gen-ceq-bosses (4 iconic loadouts incl. Frostmourne and
Illidan's warglaives, with WSVK visual cross-refs),
--gen-ceq-ranged (3 ranged-only rifle/bow/crossbow loadouts),
--info-wceq, --validate-wceq with --json variants. Validator
catches id=0/duplicates, missing creatureId, all-empty-slots
warning, kFlagDualWield without both hand items, kFlagShield
without offhand item, mutually-exclusive dual-wield + shield,
and 2H polearm with offhand item filled.
Format graph milestone: 50 distinct binary formats. CLI flag
count: 754 → 760.
2026-05-09 19:48:13 -07:00
|
|
|
{{'W','C','E','Q'}, ".wceq", "creatures", "--info-wceq", "Creature equipment loadout catalog"},
|
2026-05-09 19:27:48 -07:00
|
|
|
{{'W','F','A','C'}, ".wfac", "factions", nullptr, "Faction catalog"},
|
|
|
|
|
{{'W','L','C','K'}, ".wlck", "locks", nullptr, "Lock catalog"},
|
|
|
|
|
{{'W','S','K','L'}, ".wskl", "skills", nullptr, "Skill catalog"},
|
|
|
|
|
{{'W','O','L','A'}, ".wola", "light", nullptr, "Outdoor light catalog"},
|
|
|
|
|
{{'W','O','W','A'}, ".wowa", "weather", nullptr, "Weather schedule catalog"},
|
|
|
|
|
{{'W','M','P','X'}, ".wmpx", "worldmap", nullptr, "World map catalog"},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
constexpr size_t kFormatsCount =
|
|
|
|
|
sizeof(kFormats) / sizeof(kFormats[0]);
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
const FormatMagicEntry* findFormatByMagic(const char magic[4]) {
|
|
|
|
|
for (const auto& row : kFormats) {
|
|
|
|
|
if (std::memcmp(row.magic, magic, 4) == 0) return &row;
|
|
|
|
|
}
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const FormatMagicEntry* formatTableBegin() { return kFormats; }
|
|
|
|
|
const FormatMagicEntry* formatTableEnd() { return kFormats + kFormatsCount; }
|
|
|
|
|
size_t formatTableSize() { return kFormatsCount; }
|
|
|
|
|
|
|
|
|
|
} // namespace cli
|
|
|
|
|
} // namespace editor
|
|
|
|
|
} // namespace wowee
|