diff --git a/changelog.txt b/changelog.txt index ce31ffabb..3df12a4d2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -53,6 +53,9 @@ Akkadius: Massive overhaul of the update system and EQEmu Server management util installing a PEQ database with the name the server operator gives the prompts in the script +== 09/10/2016 == +noudess: Task system experience based on a % of a level did not take into +account the hell levels rule. Now it does. == 09/04/2016 (Changes over past few months) == Akkadius: Fixed an issue where clients would crash with health marquee's @@ -73,6 +76,7 @@ mackal: Instant spells now have instrument mods mackal: Rate limit character saves mackal: Made it so items no longer do TGB (Live-like) Rule implemented to disable mackal: Set pet buffs limit to 30 +>>>>>>> upstream/master == 09/03/2016 == Uleat: Changed 'Bind Wound' behavior to match the best references that I could find for post-2004 era. diff --git a/zone/exp.cpp b/zone/exp.cpp index 93c689b7c..63989a4e9 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -705,10 +705,33 @@ uint32 Client::GetEXPForLevel(uint16 check_level) return finalxp; } -void Client::AddLevelBasedExp(uint8 exp_percentage, uint8 max_level) { - if (exp_percentage > 100) { exp_percentage = 100; } - if (!max_level || GetLevel() < max_level) { max_level = GetLevel(); } - uint32 newexp = GetEXP() + ((GetEXPForLevel(max_level + 1) - GetEXPForLevel(max_level)) * exp_percentage / 100); +void Client::AddLevelBasedExp(uint8 exp_percentage, uint8 max_level) +{ + uint32 award; + uint32 xp_for_level; + + if (exp_percentage > 100) + { + exp_percentage = 100; + } + + if (!max_level || GetLevel() < max_level) + { + max_level = GetLevel(); + } + + xp_for_level = GetEXPForLevel(max_level + 1) - GetEXPForLevel(max_level); + award = xp_for_level * exp_percentage / 100; + + if(RuleB(Zone, LevelBasedEXPMods)) + { + if(zone->level_exp_mod[GetLevel()].ExpMod) + { + award *= zone->level_exp_mod[GetLevel()].ExpMod; + } + } + + uint32 newexp = GetEXP() + award; SetEXP(newexp, GetAAXP()); }