Merge pull request #555 from noudess/master

Task experience based on % of level did not take into effect hell level rule
This commit is contained in:
Akkadius 2016-09-18 20:38:08 -05:00 committed by GitHub
commit b15ada974f
2 changed files with 31 additions and 4 deletions

View File

@ -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.

View File

@ -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());
}