mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
Novel open replacement for Blizzard's GameEvents.dbc + the
AzerothCore-style game_event / game_event_creature /
game_event_gameobject SQL tables. The 31st open format
added to the editor.
Calendar-based content: holidays (Hallow's End, Winter's
Veil), recurring promotional events (Children's Week,
Lunar Festival, Brewfest), one-time anniversaries, and
XP-bonus weekends. Each event has a start date, duration,
optional recurrence (yearly / monthly / weekly), faction
restriction, optional XP bonus, and a reward currency
cross-reference into WTKN.
Cross-references with previously-added formats:
WSEA.entry.tokenIdReward -> WTKN.entry.tokenId
(the seasonal currency the
event hands out — Tricky
Treats during Hallow's End,
Brewfest Tokens during
Brewfest, etc.)
The yearly preset's tokenIdReward values (200/201/202/203)
deliberately match WTKN.makeSeasonal's seasonal token ids
so the demo content stack already wires together: WSEA
yearly events grant WTKN tokens that vendors can charge in
via WTRN.item.extendedCost.
Format:
• magic "WSEA", version 1, little-endian
• per event: eventId / name / description / iconPath /
announceMessage / startDate (Unix epoch seconds) /
duration_seconds / recurrenceDays (0=one-shot, 365=yearly) /
holidayKind / factionGroup / bonusXpPercent / tokenIdReward
Enums:
• HolidayKind (7): Combat / Collection / Racial /
Anniversary / Fishing / Cosmetic /
WorldEvent
• FactionGroup (3): Both / Alliance / Horde
API: WoweeEventLoader::save / load / exists / findById.
Three preset emitters showcase typical event shapes:
• makeStarter — 3 events covering Combat /
Fishing / Anniversary kinds
• makeYearly — 4 yearly holidays with full WTKN
cross-refs (Hallow's End / Brewfest /
Lunar Festival / Winter's Veil)
• makeBonusWeekends — 3 monthly Fri-Sun bonus tiers
(50% / 100% / 200% RAF-style)
CLI added (5 flags, 614 documented total now):
--gen-events / --gen-events-yearly / --gen-events-weekends
--info-wsea / --validate-wsea
Validator catches: eventId=0 + duplicates, empty name,
unknown holidayKind / factionGroup, duration_seconds=0
(event never runs), duration > recurrence period (events
would overlap themselves on next iteration), bonusXpPercent
> 200 (very high — verify intentional).
116 lines
4 KiB
C++
116 lines
4 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace pipeline {
|
|
|
|
// Wowee Open Seasonal Event catalog (.wsea) — novel
|
|
// replacement for Blizzard's GameEvents.dbc + the
|
|
// AzerothCore-style game_event / game_event_creature /
|
|
// game_event_gameobject SQL tables. The 31st open format
|
|
// added to the editor.
|
|
//
|
|
// Calendar-based content: holidays (Hallow's End, Winter's
|
|
// Veil), recurring promotional events (Children's Week,
|
|
// Lunar Festival, Brewfest), one-time anniversaries, and
|
|
// XP-bonus weekends. Each event has a start date, duration,
|
|
// optional recurrence, faction restriction, optional XP
|
|
// bonus, and a reward currency cross-reference into WTKN.
|
|
//
|
|
// Cross-references with previously-added formats:
|
|
// WSEA.entry.tokenIdReward → WTKN.entry.tokenId
|
|
// (the seasonal currency the
|
|
// event hands out — Tricky
|
|
// Treats during Hallow's End,
|
|
// Brewfest Tokens during
|
|
// Brewfest, etc.)
|
|
//
|
|
// Binary layout (little-endian):
|
|
// magic[4] = "WSEA"
|
|
// version (uint32) = current 1
|
|
// nameLen + name (catalog label)
|
|
// entryCount (uint32)
|
|
// entries (each):
|
|
// eventId (uint32)
|
|
// nameLen + name
|
|
// descLen + description
|
|
// iconLen + iconPath
|
|
// announceLen + announceMessage
|
|
// startDate (uint64) -- Unix timestamp seconds
|
|
// duration_seconds (uint32)
|
|
// recurrenceDays (uint16)
|
|
// holidayKind (uint8) / factionGroup (uint8)
|
|
// bonusXpPercent (uint8) / pad[3]
|
|
// tokenIdReward (uint32)
|
|
struct WoweeEvent {
|
|
enum HolidayKind : uint8_t {
|
|
Combat = 0,
|
|
Collection = 1,
|
|
Racial = 2,
|
|
Anniversary = 3,
|
|
Fishing = 4,
|
|
Cosmetic = 5,
|
|
WorldEvent = 6, // server-wide invasion / boss event
|
|
};
|
|
|
|
enum FactionGroup : uint8_t {
|
|
FactionBoth = 0,
|
|
FactionAlliance = 1,
|
|
FactionHorde = 2,
|
|
};
|
|
|
|
struct Entry {
|
|
uint32_t eventId = 0;
|
|
std::string name;
|
|
std::string description;
|
|
std::string iconPath;
|
|
std::string announceMessage;
|
|
uint64_t startDate = 0; // Unix epoch seconds
|
|
uint32_t duration_seconds = 0;
|
|
uint16_t recurrenceDays = 0; // 0 = one-shot
|
|
uint8_t holidayKind = Combat;
|
|
uint8_t factionGroup = FactionBoth;
|
|
uint8_t bonusXpPercent = 0; // 0 = no bonus
|
|
uint32_t tokenIdReward = 0; // WTKN cross-ref, 0 = none
|
|
};
|
|
|
|
std::string name;
|
|
std::vector<Entry> entries;
|
|
|
|
bool isValid() const { return !entries.empty(); }
|
|
|
|
const Entry* findById(uint32_t eventId) const;
|
|
|
|
static const char* holidayKindName(uint8_t k);
|
|
static const char* factionGroupName(uint8_t f);
|
|
};
|
|
|
|
class WoweeEventLoader {
|
|
public:
|
|
static bool save(const WoweeEvent& cat,
|
|
const std::string& basePath);
|
|
static WoweeEvent load(const std::string& basePath);
|
|
static bool exists(const std::string& basePath);
|
|
|
|
// Preset emitters used by --gen-events* variants.
|
|
//
|
|
// makeStarter — 3 events covering Combat / Collection /
|
|
// Anniversary holidayKind categories.
|
|
// makeYearly — 4 yearly recurring holidays with WTKN
|
|
// reward cross-refs (Hallow's End ->
|
|
// Tricky Treats, Brewfest -> Brewfest
|
|
// Tokens, Lunar Festival -> Coin of
|
|
// Ancestry, Winter's Veil -> Stranger's
|
|
// Gift).
|
|
// makeBonusWeekends — 3 short XP-bonus weekend events
|
|
// (50% / 100% / 200% bonus tiers).
|
|
static WoweeEvent makeStarter(const std::string& catalogName);
|
|
static WoweeEvent makeYearly(const std::string& catalogName);
|
|
static WoweeEvent makeBonusWeekends(const std::string& catalogName);
|
|
};
|
|
|
|
} // namespace pipeline
|
|
} // namespace wowee
|