Kelsidavis-WoWee/tools/editor/cli_triggers_catalog.hpp

12 lines
202 B
C++
Raw Normal View History

feat(pipeline): add WTRG (Wowee Area Trigger) format Novel open replacement for Blizzard's AreaTrigger.dbc + AreaTriggerTeleport.dbc + the AzerothCore-style areatrigger_template / areatrigger_teleport SQL tables. The 29th open format added to the editor. Defines proximity-based event zones — when a player enters a defined region (box or sphere), the runtime fires the trigger's action: teleport to another map, award exploration XP for a quest, run a server script, gate an instance entrance behind a key item, mark a PvP boundary, or simply display a "Discovered: {area name}" banner. Cross-references with previously-added formats — every trigger field has a real format target: WTRG.entry.mapId / areaId -> WMS.map.mapId / WMS.area.areaId WTRG.actionTarget (Teleport) -> WMS.mapId WTRG.actionTarget (QuestExploration) -> WQT.questId WTRG.requiredQuestId -> WQT.entry.questId WTRG.requiredItemId -> WIT.entry.itemId (key) Format: • magic "WTRG", version 1, little-endian • per trigger: triggerId / mapId / areaId / name / center vec3 / shape / kind / boxDims vec3 / radius / actionTarget / dest vec3 / destOrientation / requiredQuestId / requiredItemId / minLevel Enums: • Shape (2): Box / Sphere • Kind (7): Teleport / QuestExploration / Script / InstanceEntrance / AreaName / CombatStartZone / Waypoint API: WoweeTriggerLoader::save / load / exists / findById. Three preset emitters showcase common trigger shapes: • makeStarter — area-name + quest-exploration with cross-ref to WQT 100 ("Investigate the Camp") • makeDungeon — outdoor area-name + portal-style InstanceEntrance with Deadmines key gate (WIT itemId 5200, matches WLCK.makeDungeon's Boss Vault Seal) + interior exit teleport back outdoors • makeFlightPath — 2 sphere waypoints near flight masters so the runtime can auto-open the flight UI on proximity (matches WTAX starter node positions) CLI added (5 flags, 601 documented total now): --gen-triggers / --gen-triggers-dungeon / --gen-triggers-flightpath --info-wtrg / --validate-wtrg Validator catches: triggerId=0 + duplicates, unknown shape / kind, non-finite center, sphere with radius<=0, box with all-zero half-extents, teleport / instance with dest=(0,0,0) (silently does nothing — usually a typo), QuestExploration without an actionTarget questId.
2026-05-09 17:01:43 -07:00
#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleTriggersCatalog(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee