mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Fix mana regen issue with old skill progression
This commit is contained in:
parent
75e60b7f8e
commit
0f1ca0856c
@ -66,6 +66,7 @@ RULE_INT(Character, AutosaveIntervalS, 300) //0=disabled
|
|||||||
RULE_INT(Character, HPRegenMultiplier, 100)
|
RULE_INT(Character, HPRegenMultiplier, 100)
|
||||||
RULE_INT(Character, ManaRegenMultiplier, 100)
|
RULE_INT(Character, ManaRegenMultiplier, 100)
|
||||||
RULE_INT(Character, EnduranceRegenMultiplier, 100)
|
RULE_INT(Character, EnduranceRegenMultiplier, 100)
|
||||||
|
RULE_BOOL(Character, OldMinMana, false) // this is used for servers that want to follow older skill cap formulas so they can still have some regen w/o mediate
|
||||||
RULE_INT(Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow
|
RULE_INT(Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow
|
||||||
RULE_BOOL(Character, HealOnLevel, false)
|
RULE_BOOL(Character, HealOnLevel, false)
|
||||||
RULE_BOOL(Character, FeignKillsPet, false)
|
RULE_BOOL(Character, FeignKillsPet, false)
|
||||||
|
|||||||
@ -1240,6 +1240,10 @@ int32 Client::CalcManaRegen(bool bCombat)
|
|||||||
{
|
{
|
||||||
int regen = 0;
|
int regen = 0;
|
||||||
auto level = GetLevel();
|
auto level = GetLevel();
|
||||||
|
// so the new formulas break down with older skill caps where you don't have the skill until 4 or 8
|
||||||
|
// so for servers that want to use the old skill progression they can set this rule so they
|
||||||
|
// will get at least 1 for standing and 2 for sitting.
|
||||||
|
bool old = RuleB(Character, OldMinMana);
|
||||||
if (!IsStarved()) {
|
if (!IsStarved()) {
|
||||||
// client does some base regen for shrouds here
|
// client does some base regen for shrouds here
|
||||||
if (IsSitting() || CanMedOnHorse()) {
|
if (IsSitting() || CanMedOnHorse()) {
|
||||||
@ -1255,6 +1259,10 @@ int32 Client::CalcManaRegen(bool bCombat)
|
|||||||
regen += skill / 15;
|
regen += skill / 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (old)
|
||||||
|
regen = std::max(regen, 2);
|
||||||
|
} else if (old) {
|
||||||
|
regen = std::max(regen, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user