Kelsidavis-WoWee/include/pipeline
Kelsi d2ca3ea22b feat(pipeline): add WTRN (Wowee Trainer / Vendor catalog) format
Novel open replacement for AzerothCore-style npc_trainer +
npc_vendor SQL tables PLUS the Blizzard TrainerSpells.dbc
family. The 22nd open format added to the editor.

Unifies trainer spell lists and vendor item inventories
into one per-NPC entry. A creature flagged Trainer or
Vendor in WCRT references a WTRN entry that lists what they
teach / sell. The same NPC can be both — kindMask is a
bitmask covering the Trainer (0x01) and Vendor (0x02) kinds.

This format closes a major cross-format gap: WCRT.npcFlags
already had Vendor / Trainer bits, but until now there was
no format defining what a vendor sells or what a trainer
teaches. Now an NPC marked Vendor in WCRT has a real
inventory, and an NPC marked Trainer has a real spell list.

Cross-references — every WTRN field has a real format target:
  WTRN.entry.npcId           -> WCRT.entry.creatureId
  WTRN.spell.spellId         -> WSPL.entry.spellId
  WTRN.spell.requiredSkillId -> WSKL.entry.skillId
  WTRN.item.itemId           -> WIT.entry.itemId

Format:
  • magic "WTRN", version 1, little-endian
  • per NPC: npcId / kindMask / greeting + spells[] + items[]
  • per spell offer: spellId / moneyCostCopper /
    requiredSkillId / requiredSkillRank / requiredLevel
  • per item offer: itemId / stockCount (0xFFFFFFFF =
    unlimited) / restockSec / extendedCost / moneyCostCopper
    (0 = inherit from WIT.buyPrice)

API: WoweeTrainerLoader::save / load / exists / findByNpc;
presets makeStarter (innkeeper 4001 as both trainer +
vendor: teaches First Aid + sells starter items),
makeMageTrainer (NPC 4003 teaches the WSPL mage spells
at scaling cost), makeWeaponVendor (NPC 4002 sells WIT
weapons with mixed unlimited/finite stock + restock timers).

CLI added (5 flags, 551 documented total now):
  --gen-trainers / --gen-trainers-mage / --gen-trainers-weapons
  --info-wtrn / --validate-wtrn

Validator catches: npcId=0 + duplicates, kindMask=0 (NPC
offers nothing), Trainer flag without spells, Vendor flag
without items, spells/items present without the matching
kind bit (silently ignored at runtime), spellId=0 / itemId=0
in offers, finite stock with restockSec=0 (single-fill —
usually intentional but worth surfacing).

The 3 presets deliberately use npcIds matching WCRT village
merchants (4001/4002/4003) so the demo content stack is
self-consistent: WCRT 4001 has the Vendor + Trainer flag,
and WTRN 4001 actually defines what they sell and teach.
2026-05-09 16:12:58 -07:00
..
adt_loader.hpp feat(adt): preserve MODF nameSet + scale fields across load/save round-trip 2026-05-06 03:37:13 -07:00
asset_manager.hpp feat(runtime): pick up WHM/WOT/WOC sidecars from asset tree 2026-05-06 10:48:40 -07:00
asset_manifest.hpp feat(editor): add standalone world editor (rough/WIP) 2026-05-05 03:47:03 -07:00
blp_loader.hpp Add attribution and source citations for open source release 2026-02-02 22:09:33 -08:00
custom_zone_discovery.hpp feat: custom zone discovery system for client auto-detection 2026-05-05 10:01:05 -07:00
dbc_layout.hpp fix: auto-detect CharSections.dbc layout and add Blood Elf/Draenei NPC voices 2026-03-23 11:00:49 -07:00
dbc_loader.hpp feat: complete client integration for all 6 open formats 2026-05-05 12:41:19 -07:00
loose_file_reader.hpp Replace MPQ runtime with loose file asset system 2026-02-12 20:32:14 -08:00
m2_loader.hpp feat: implement M2 ribbon emitter rendering for spell trail effects 2026-03-13 01:17:30 -07:00
terrain_mesh.hpp Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00
wdt_loader.hpp Add instance support: WDT parser, WMO-only map loading, area triggers, BG queue accept 2026-02-26 17:56:11 -08:00
wmo_loader.hpp wmo: apply MOHD ambient color to interior group lighting 2026-03-09 21:27:01 -07:00
wowee_achievements.hpp feat(pipeline): add WACH (Wowee Achievement Catalog) format 2026-05-09 16:04:30 -07:00
wowee_building.hpp feat(wob): tryLoadByGamePath helper, used by editor + terrain_manager 2026-05-06 04:10:12 -07:00
wowee_collision.hpp feat(woc): add WMO collision meshes to exported zone collision 2026-05-06 02:33:22 -07:00
wowee_creatures.hpp feat(pipeline): add WCRT (Wowee Creature Template) format 2026-05-09 15:18:44 -07:00
wowee_factions.hpp feat(pipeline): add WFAC (Wowee Faction Catalog) format 2026-05-09 15:37:59 -07:00
wowee_items.hpp feat(pipeline): add WIT (Wowee Item Template) format 2026-05-09 15:04:48 -07:00
wowee_light.hpp feat(pipeline): add WOL preset variants for cave/dungeon/night 2026-05-09 14:01:26 -07:00
wowee_locks.hpp feat(pipeline): add WLCK (Wowee Lock Template) format 2026-05-09 15:44:26 -07:00
wowee_loot.hpp feat(pipeline): add WLOT (Wowee Loot Table) format 2026-05-09 15:11:08 -07:00
wowee_model.hpp feat(extract): emit WOM and WOB side-files (M2/WMO → open formats) 2026-05-06 10:32:17 -07:00
wowee_objects.hpp feat(pipeline): add WGOT (Wowee Game Object Template) format 2026-05-09 15:31:49 -07:00
wowee_quests.hpp feat(pipeline): add WQT (Wowee Quest Template) format 2026-05-09 15:25:02 -07:00
wowee_skills.hpp feat(pipeline): add WSKL (Wowee Skill Catalog) format 2026-05-09 15:50:25 -07:00
wowee_sound.hpp feat(pipeline): add WSND (Wowee Sound Catalog) format 2026-05-09 14:47:16 -07:00
wowee_spawns.hpp feat(pipeline): add WSPN (Wowee Spawn Point catalog) format 2026-05-09 14:57:53 -07:00
wowee_spells.hpp feat(pipeline): add WSPL (Wowee Spell Catalog) format 2026-05-09 15:58:09 -07:00
wowee_terrain_loader.hpp feat: integrate Wowee Open Terrain loader into client terrain pipeline 2026-05-05 09:56:24 -07:00
wowee_trainers.hpp feat(pipeline): add WTRN (Wowee Trainer / Vendor catalog) format 2026-05-09 16:12:58 -07:00
wowee_weather.hpp feat(pipeline): add Wowee Open Weather (.wow) zone schedule 2026-05-09 14:10:13 -07:00
wowee_world_map.hpp feat(pipeline): add WOMX (Wowee World Map index) format 2026-05-09 14:38:05 -07:00