mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 12:21:34 +00:00
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:
commit
b15ada974f
@ -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
|
installing a PEQ database with the name the server operator gives the prompts in the
|
||||||
script
|
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) ==
|
== 09/04/2016 (Changes over past few months) ==
|
||||||
Akkadius: Fixed an issue where clients would crash with health marquee's
|
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: Rate limit character saves
|
||||||
mackal: Made it so items no longer do TGB (Live-like) Rule implemented to disable
|
mackal: Made it so items no longer do TGB (Live-like) Rule implemented to disable
|
||||||
mackal: Set pet buffs limit to 30
|
mackal: Set pet buffs limit to 30
|
||||||
|
>>>>>>> upstream/master
|
||||||
|
|
||||||
== 09/03/2016 ==
|
== 09/03/2016 ==
|
||||||
Uleat: Changed 'Bind Wound' behavior to match the best references that I could find for post-2004 era.
|
Uleat: Changed 'Bind Wound' behavior to match the best references that I could find for post-2004 era.
|
||||||
|
|||||||
31
zone/exp.cpp
31
zone/exp.cpp
@ -705,10 +705,33 @@ uint32 Client::GetEXPForLevel(uint16 check_level)
|
|||||||
return finalxp;
|
return finalxp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::AddLevelBasedExp(uint8 exp_percentage, uint8 max_level) {
|
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 award;
|
||||||
uint32 newexp = GetEXP() + ((GetEXPForLevel(max_level + 1) - GetEXPForLevel(max_level)) * exp_percentage / 100);
|
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());
|
SetEXP(newexp, GetAAXP());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user