mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add Additional XP Events EVENT_AA_EXP_GAIN, EVENT_EXP_GAIN (#2865)
* Add XP Events * Tweak * Formatting * Additional tweak * Adjustment * Update export naming * Formatting * Indenting * Finalizing formatting * Indenting adjustments * Use tab character setting * Remove double tabs * Update exp.cpp --------- Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
+11
-2
@@ -804,14 +804,23 @@ void Client::SetEXP(uint64 set_exp, uint64 set_aaxp, bool isrezzexp) {
|
||||
}
|
||||
}
|
||||
|
||||
if (parse->PlayerHasQuestSub(EVENT_EXP_GAIN) && m_pp.exp != set_exp) {
|
||||
parse->EventPlayer(EVENT_EXP_GAIN, this, std::to_string(set_exp - m_pp.exp), 0);
|
||||
}
|
||||
|
||||
if (parse->PlayerHasQuestSub(EVENT_AA_EXP_GAIN) && m_pp.expAA != set_aaxp) {
|
||||
parse->EventPlayer(EVENT_AA_EXP_GAIN, this, std::to_string(set_aaxp - m_pp.expAA), 0);
|
||||
}
|
||||
|
||||
//set the client's EXP and AAEXP
|
||||
m_pp.exp = set_exp;
|
||||
m_pp.expAA = set_aaxp;
|
||||
|
||||
if (GetLevel() < 51) {
|
||||
m_epp.perAA = 0; // turn off aa exp if they drop below 51
|
||||
} else
|
||||
SendAlternateAdvancementStats(); //otherwise, send them an AA update
|
||||
} else {
|
||||
SendAlternateAdvancementStats(); //otherwise, send them an AA update
|
||||
}
|
||||
|
||||
//send the expdata in any case so the xp bar isnt stuck after leveling
|
||||
uint32 tmpxp1 = GetEXPForLevel(GetLevel()+1);
|
||||
|
||||
Reference in New Issue
Block a user