mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* Added rules for managing AA scaling.
This commit is contained in:
parent
c2b5820153
commit
7d7b9d0238
@ -156,6 +156,10 @@ RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound beh
|
||||
RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server
|
||||
RULE_BOOL(Character, UseModernAAExperienceScale, false) // Uses the newer approach to AA scaling based on total earned AA
|
||||
RULE_REAL(Character, ModernAAScalingStartPercent, 1000) // 1000% or 10x AA XP at the start of the scaling range
|
||||
RULE_INT(Character, ModernAAScalingAAMinimum, 0) // The minimum number of earned AA before AA XP scaling begins.
|
||||
RULE_INT(Character, ModernAAScalingAALimit, 4000) // The number of earned AA when AA XP scaling ends.
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Mercs)
|
||||
|
||||
14
zone/exp.cpp
14
zone/exp.cpp
@ -39,10 +39,9 @@ extern QueryServ* QServ;
|
||||
|
||||
static uint32 ScaleAAXPBasedOnCurrentAATotal(int earnedAA, uint32 add_aaxp, float aatotalmod)
|
||||
{
|
||||
// TODO: Read from Rules
|
||||
float baseModifier = 1000;
|
||||
int aaMinimum = 0;
|
||||
int aaLimit = 4000;
|
||||
float baseModifier = RuleR(Character, ModernAAScalingStartPercent);
|
||||
int aaMinimum = RuleI(Character, ModernAAScalingAAMinimum);
|
||||
int aaLimit = RuleI(Character, ModernAAScalingAALimit);
|
||||
|
||||
// Calculate the current total before checking if we will add additional xp.
|
||||
uint32 totalWithoutExpMod = (uint32)add_aaxp * aatotalmod;
|
||||
@ -77,7 +76,10 @@ static uint32 ScaleAAXPBasedOnCurrentAATotal(int earnedAA, uint32 add_aaxp, floa
|
||||
return totalWithoutExpMod;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::None, "Total before the modifier %d :: NewTotal %d :: ScaleRange: %d, SpentAA: %d, RemainingAA: %d, normalizedScale: %0.3f", totalWithoutExpMod, totalWithExpMod, scaleRange, earnedAA, remainingAA, normalizedScale);
|
||||
Log(Logs::Detail,
|
||||
Logs::None,
|
||||
"Total before the modifier %d :: NewTotal %d :: ScaleRange: %d, SpentAA: %d, RemainingAA: %d, normalizedScale: %0.3f",
|
||||
totalWithoutExpMod, totalWithExpMod, scaleRange, earnedAA, remainingAA, normalizedScale);
|
||||
|
||||
return totalWithExpMod;
|
||||
}
|
||||
@ -404,7 +406,7 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
|
||||
uint32 aaexp = 0;
|
||||
|
||||
// if using modernAA and this character has AA XP enabled.
|
||||
if (true && add_aaxp > 0)
|
||||
if (RuleB(Character, UseModernAAExperienceScale) && add_aaxp > 0)
|
||||
{
|
||||
aaexp = ScaleAAXPBasedOnCurrentAATotal(GetAAPoints(), add_aaxp, aatotalmod);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user