Add trainer dialog system with spell list UI and buy support

This commit is contained in:
Kelsi 2026-02-08 14:33:39 -08:00
parent b65840a484
commit 64a19657a7
7 changed files with 340 additions and 1 deletions

View file

@ -1716,6 +1716,42 @@ public:
static bool parse(network::Packet& packet, ListInventoryData& data);
};
// ============================================================
// Trainer
// ============================================================
struct TrainerSpell {
uint32_t spellId = 0;
uint8_t state = 0; // 0=known(green), 1=available, 2=unavailable(red)
uint32_t spellCost = 0; // copper
uint32_t profDialog = 0;
uint32_t profButton = 0;
uint8_t reqLevel = 0;
uint32_t reqSkill = 0;
uint32_t reqSkillValue = 0;
uint32_t chainNode1 = 0;
uint32_t chainNode2 = 0;
uint32_t chainNode3 = 0;
};
struct TrainerListData {
uint64_t trainerGuid = 0;
uint32_t trainerType = 0; // 0=class, 1=mounts, 2=tradeskills, 3=pets
std::vector<TrainerSpell> spells;
std::string greeting;
bool isValid() const { return true; }
};
class TrainerListParser {
public:
static bool parse(network::Packet& packet, TrainerListData& data);
};
class TrainerBuySpellPacket {
public:
static network::Packet build(uint64_t trainerGuid, uint32_t spellId);
};
// ============================================================
// Taxi / Flight Paths
// ============================================================