mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
Novel open replacement for Blizzard's Mount.dbc +
MountCapability.dbc + MountType.dbc + the mount-related
subsets of Spell.dbc / Item.dbc. The 32nd open format added
to the editor.
Defines all summonable steeds: ground mounts, flying mounts,
swimming mounts, racial mounts (Tauren Plainsrunner for
druids), and class mounts (Warlock dreadsteed, Paladin
charger). Each mount has a summon spell, optional teach
item, riding skill prerequisite, speed bonus, and faction
/ race availability mask.
Cross-references with previously-added formats:
WMOU.entry.summonSpellId -> WSPL.entry.spellId
WMOU.entry.itemIdToLearn -> WIT.entry.itemId
WMOU.entry.requiredSkillId -> WSKL.entry.skillId
(Riding skill ID 762)
WCHC.race.mountSpellId ~= WMOU.entry.summonSpellId
(loose match by spellId)
Format:
• magic "WMOU", version 1, little-endian
• per mount: mountId / name / description / icon /
displayId / summonSpellId / itemIdToLearn /
requiredSkillId+Rank / speedPercent / mountKind /
factionId / categoryId / raceMask
Enums:
• Kind (5): Ground / Flying / Swimming / Hybrid /
Aquatic
• Faction (3): Both / Alliance / Horde
• Category (8): Common / Epic / Racial / Event /
Achievement / Pvp / Quest / ClassMount
API: WoweeMountLoader::save / load / exists / findById.
Three preset emitters showcase typical mount catalogs:
• makeStarter — 3 mounts (ground horse + epic flying
gryphon + aquatic riding turtle)
• makeRacial — 6 racial mounts (4 Alliance: Pinto / Ram /
Frostsaber / Mechanostrider; 2 Horde:
Dire Wolf / Skeletal Horse) with raceMask
gating per WCHC race bit positions
• makeFlying — 4 flying mounts spanning Common (60%) ->
Epic (100%) -> Achievement (280%) -> Pvp
(310%) speed tiers
CLI added (5 flags, 621 documented total now):
--gen-mounts / --gen-mounts-racial / --gen-mounts-flying
--info-wmou / --validate-wmou
Validator catches: mountId=0 + duplicates, empty name,
summonSpellId=0 (mount cannot be cast), unknown enum values,
speedPercent=0 (no speed bonus), flying mount with
requiredSkillRank<150 (player can't fly), Racial category
without raceMask (any race could use — usually a typo).
125 lines
4 KiB
C++
125 lines
4 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace pipeline {
|
|
|
|
// Wowee Open Mount catalog (.wmou) — novel replacement for
|
|
// Blizzard's Mount.dbc + MountCapability.dbc + MountType.dbc
|
|
// + the mount-related subsets of Spell.dbc / Item.dbc. The
|
|
// 32nd open format added to the editor.
|
|
//
|
|
// Defines all summonable steeds: ground mounts, flying
|
|
// mounts, swimming mounts, racial mounts (Tauren Plainsrunner
|
|
// for druids), and class mounts (Warlock dreadsteed,
|
|
// Paladin charger). Each mount has a summon spell, optional
|
|
// teach item, riding skill prerequisite, speed bonus, and
|
|
// faction / race availability mask.
|
|
//
|
|
// Cross-references with previously-added formats:
|
|
// WMOU.entry.summonSpellId → WSPL.entry.spellId
|
|
// WMOU.entry.itemIdToLearn → WIT.entry.itemId
|
|
// WMOU.entry.requiredSkillId → WSKL.entry.skillId (riding)
|
|
// WCHC.race.mountSpellId ≈ WMOU.entry.summonSpellId
|
|
// (racial mount per race)
|
|
//
|
|
// Binary layout (little-endian):
|
|
// magic[4] = "WMOU"
|
|
// version (uint32) = current 1
|
|
// nameLen + name (catalog label)
|
|
// entryCount (uint32)
|
|
// entries (each):
|
|
// mountId (uint32)
|
|
// nameLen + name
|
|
// descLen + description
|
|
// iconLen + iconPath
|
|
// displayId (uint32)
|
|
// summonSpellId (uint32)
|
|
// itemIdToLearn (uint32)
|
|
// requiredSkillId (uint32)
|
|
// requiredSkillRank (uint16)
|
|
// speedPercent (uint16)
|
|
// mountKind (uint8) / factionId (uint8) / categoryId (uint8) / pad[1]
|
|
// raceMask (uint32)
|
|
struct WoweeMount {
|
|
enum Kind : uint8_t {
|
|
Ground = 0,
|
|
Flying = 1,
|
|
Swimming = 2,
|
|
Hybrid = 3, // ground + flying (basic flying mount)
|
|
Aquatic = 4, // ground + swim (sea horse)
|
|
};
|
|
|
|
enum Faction : uint8_t {
|
|
Both = 0,
|
|
Alliance = 1,
|
|
Horde = 2,
|
|
};
|
|
|
|
enum Category : uint8_t {
|
|
Common = 0,
|
|
Epic = 1,
|
|
Racial = 2,
|
|
Event = 3,
|
|
Achievement = 4,
|
|
Pvp = 5,
|
|
Quest = 6,
|
|
ClassMount = 7, // warlock dreadsteed / paladin charger
|
|
};
|
|
|
|
struct Entry {
|
|
uint32_t mountId = 0;
|
|
std::string name;
|
|
std::string description;
|
|
std::string iconPath;
|
|
uint32_t displayId = 0;
|
|
uint32_t summonSpellId = 0;
|
|
uint32_t itemIdToLearn = 0;
|
|
uint32_t requiredSkillId = 0;
|
|
uint16_t requiredSkillRank = 0;
|
|
uint16_t speedPercent = 60; // 60 = +60% (apprentice ground)
|
|
uint8_t mountKind = Ground;
|
|
uint8_t factionId = Both;
|
|
uint8_t categoryId = Common;
|
|
uint32_t raceMask = 0; // 0 = available to all races
|
|
};
|
|
|
|
std::string name;
|
|
std::vector<Entry> entries;
|
|
|
|
bool isValid() const { return !entries.empty(); }
|
|
|
|
const Entry* findById(uint32_t mountId) const;
|
|
|
|
static const char* kindName(uint8_t k);
|
|
static const char* factionName(uint8_t f);
|
|
static const char* categoryName(uint8_t c);
|
|
};
|
|
|
|
class WoweeMountLoader {
|
|
public:
|
|
static bool save(const WoweeMount& cat,
|
|
const std::string& basePath);
|
|
static WoweeMount load(const std::string& basePath);
|
|
static bool exists(const std::string& basePath);
|
|
|
|
// Preset emitters used by --gen-mounts* variants.
|
|
//
|
|
// makeStarter — 3 mounts: 1 ground / 1 flying / 1
|
|
// swimming with appropriate speed +
|
|
// riding skill requirements.
|
|
// makeRacial — 6 racial mounts (one per Alliance + 2
|
|
// Horde races) all with raceMask gating.
|
|
// makeFlying — 4 flying mounts spanning common / epic /
|
|
// achievement / pvp tiers (60% / 100% /
|
|
// 280% / 310% speed).
|
|
static WoweeMount makeStarter(const std::string& catalogName);
|
|
static WoweeMount makeRacial(const std::string& catalogName);
|
|
static WoweeMount makeFlying(const std::string& catalogName);
|
|
};
|
|
|
|
} // namespace pipeline
|
|
} // namespace wowee
|