mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 11:33:52 +00:00
Open replacement for the hardcoded hunter pet stable slot
progression. Defines each stable slot's display order in the
stable UI, the character level at which the slot becomes
available, the gold cost to unlock, and whether it's a premium
/ donator-only slot.
In WoW 3.3.5a hunters get 5 stable slots total: the active pet
plus 4 stabled (slots 1-4 unlocking at hunter levels 10/20/30/40
with escalating gold costs 0/10s/50s/2g/10g). Cataclysm raised
the cap to 5 stabled slots, and server-custom expansions go
higher with donator-only "premium" slots that bypass the level
gate. This catalog parameterizes the entire progression instead
of editing engine source.
Consumed directly by the StableMaster service in WBKD entries.
unlockedSlotCount(characterLevel) is the engine helper used by
the stable master frame to decide how many slot tabs to render.
Three preset emitters: --gen-stc (5 canonical slots matching
WoW 3.3.5a), --gen-stc-cata (6 Cata-style slots with slot 5
unlocking at lvl 60 for 25g), --gen-stc-premium (4 server-custom
donator slots with no level/gold gate).
The info renderer pretty-prints copperCost as "free" / "10s 0c" /
"2g 0s 0c" — matches how server admins think about pricing.
Validation enforces id+name presence, no duplicate ids; warns
on:
- minLevelToUnlock > 80 (unreachable at WotLK cap)
- Premium slot with non-zero copperCost (donor slots are
typically free; the gate is donor status, not gold)
- duplicate displayOrder (stable UI position collision —
only the first slot would render)
Wired through the cross-format table; WSTC appears in all 18
cross-format utilities. Format count 92 -> 93; CLI flag count
1069 -> 1074.
94 lines
3.2 KiB
C++
94 lines
3.2 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace pipeline {
|
|
|
|
// Wowee Open Hunter Stable Slot catalog (.wstc) — novel
|
|
// replacement for the hardcoded hunter pet stable slot
|
|
// progression. Defines each stable slot's display order
|
|
// in the stable UI, the character level at which the
|
|
// slot becomes available, the gold cost to unlock, and
|
|
// whether it's a premium / donator-only slot.
|
|
//
|
|
// In WoW 3.3.5a hunters get 5 stable slots total: the
|
|
// active pet plus 4 stabled (slots 1-4 unlocking at
|
|
// hunter levels 10/20/30/40 with escalating gold costs).
|
|
// Cataclysm raised the cap to 5 stabled slots, and
|
|
// server-custom expansions go higher. This catalog lets
|
|
// admins parameterize the entire progression instead of
|
|
// editing engine source.
|
|
//
|
|
// Cross-references with previously-added formats:
|
|
// None — this catalog is consumed directly by the
|
|
// stable master service in WBKD entries with
|
|
// serviceKind=StableMaster.
|
|
//
|
|
// Binary layout (little-endian):
|
|
// magic[4] = "WSTC"
|
|
// version (uint32) = current 1
|
|
// nameLen + name (catalog label)
|
|
// entryCount (uint32)
|
|
// entries (each):
|
|
// slotId (uint32)
|
|
// nameLen + name
|
|
// descLen + description
|
|
// displayOrder (uint8) / minLevelToUnlock (uint8)
|
|
// isPremium (uint8) / pad (uint8)
|
|
// copperCost (uint32)
|
|
// iconColorRGBA (uint32)
|
|
struct WoweeStableSlot {
|
|
struct Entry {
|
|
uint32_t slotId = 0;
|
|
std::string name;
|
|
std::string description;
|
|
uint8_t displayOrder = 0;
|
|
uint8_t minLevelToUnlock = 1;
|
|
uint8_t isPremium = 0; // 0/1 bool
|
|
uint8_t pad0 = 0;
|
|
uint32_t copperCost = 0; // 1g = 10000c
|
|
uint32_t iconColorRGBA = 0xFFFFFFFFu;
|
|
};
|
|
|
|
std::string name;
|
|
std::vector<Entry> entries;
|
|
|
|
bool isValid() const { return !entries.empty(); }
|
|
|
|
const Entry* findById(uint32_t slotId) const;
|
|
|
|
// Returns the count of slots a hunter at the given
|
|
// character level has unlocked. Used by the stable
|
|
// master frame to decide how many slot tabs to render.
|
|
int unlockedSlotCount(uint8_t characterLevel) const;
|
|
};
|
|
|
|
class WoweeStableSlotLoader {
|
|
public:
|
|
static bool save(const WoweeStableSlot& cat,
|
|
const std::string& basePath);
|
|
static WoweeStableSlot load(const std::string& basePath);
|
|
static bool exists(const std::string& basePath);
|
|
|
|
// Preset emitters used by --gen-stc* variants.
|
|
//
|
|
// makeStandard — 5 canonical slots matching WoW
|
|
// 3.3.5a (Active + 4 stabled,
|
|
// unlocking at lvl 10/20/30/40 with
|
|
// 10s/50s/2g/10g costs).
|
|
// makeCata — 6 Cata-style slots (Active + 5
|
|
// stabled with later unlock at
|
|
// lvl 50, 25g cost for slot 5).
|
|
// makePremium — 4 server-custom premium slots
|
|
// (donator-only, marked premium=1,
|
|
// no level gate, no gold cost).
|
|
static WoweeStableSlot makeStandard(const std::string& catalogName);
|
|
static WoweeStableSlot makeCata(const std::string& catalogName);
|
|
static WoweeStableSlot makePremium(const std::string& catalogName);
|
|
};
|
|
|
|
} // namespace pipeline
|
|
} // namespace wowee
|