Add XP tracking with level-up, kill XP formula, and server-compatible SMSG_LOG_XPGAIN support

This commit is contained in:
Kelsi 2026-02-05 12:07:58 -08:00
parent ed5d10ec01
commit 78442f8aea
7 changed files with 249 additions and 0 deletions

View file

@ -742,6 +742,25 @@ public:
static bool parse(network::Packet& packet, SpellHealLogData& data);
};
// ============================================================
// XP Gain
// ============================================================
/** SMSG_LOG_XPGAIN data */
struct XpGainData {
uint64_t victimGuid = 0; // 0 for non-kill XP (quest, exploration)
uint32_t totalXp = 0;
uint8_t type = 0; // 0 = kill, 1 = non-kill
uint32_t groupBonus = 0;
bool isValid() const { return totalXp > 0; }
};
class XpGainParser {
public:
static bool parse(network::Packet& packet, XpGainData& data);
};
// ============================================================
// Phase 3: Spells, Action Bar, Auras
// ============================================================