mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
Add XP tracking with level-up, kill XP formula, and server-compatible SMSG_LOG_XPGAIN support
This commit is contained in:
parent
ed5d10ec01
commit
78442f8aea
7 changed files with 249 additions and 0 deletions
|
|
@ -1052,6 +1052,23 @@ bool SpellHealLogParser::parse(network::Packet& packet, SpellHealLogData& data)
|
|||
return true;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// XP Gain
|
||||
// ============================================================
|
||||
|
||||
bool XpGainParser::parse(network::Packet& packet, XpGainData& data) {
|
||||
data.victimGuid = packet.readUInt64();
|
||||
data.totalXp = packet.readUInt32();
|
||||
data.type = packet.readUInt8();
|
||||
if (data.type == 0) {
|
||||
// Kill XP: has group bonus float (unused) + group bonus uint32
|
||||
packet.readFloat();
|
||||
data.groupBonus = packet.readUInt32();
|
||||
}
|
||||
LOG_INFO("XP gain: ", data.totalXp, " xp (type=", static_cast<int>(data.type), ")");
|
||||
return data.totalXp > 0;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 3: Spells, Action Bar, Auras
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue