[Feature] Add Data Bucket support for scaling of Heroic Stats. (#3058)

* [Feature] Add Data Bucket support for scaling of Heroic Stats.

* update

* fixes, still reworking logic

* fixes, still reworking logic

* logic done

* logic done

* fixes

* Cleanup

* Cleanup

* Cleanup naming, verify behaviors

* formatting

* formatting

* fix issue with endurance and mana.

* update rule desc

* cleanup

* DataBucket Struct

* Cleanup data_bucket.cpp and add constants

* cleanup

* changes

* formatting

* fix from merge

* escape keyword `key`

* Add `key` to generator, run repository-generator.pl

* fix for change to key

* cleanup

* formatting

* formatting

* typo
This commit is contained in:
Aeadoin
2023-03-23 21:42:13 -04:00
committed by GitHub
parent abc27ab423
commit 59ad91a140
28 changed files with 433 additions and 243 deletions
+7 -31
View File
@@ -234,7 +234,7 @@ int32 Client::LevelRegen()
int64 Client::CalcHPRegen(bool bCombat)
{
int64 item_regen = itembonuses.HPRegen; // worn spells and +regen, already capped
item_regen += GetHeroicSTA() * RuleR(Character, HeroicStaminaMultiplier) / 20;
item_regen += itembonuses.heroic_hp_regen;
item_regen += aabonuses.HPRegen;
@@ -491,7 +491,7 @@ int64 Client::CalcBaseHP()
auto base_data = database.GetBaseData(GetLevel(), GetClass());
if (base_data) {
base_hp += base_data->base_hp + (base_data->hp_factor * stats);
base_hp += GetHeroicSTA() * RuleR(Character, HeroicStaminaMultiplier) * 10;
base_hp += itembonuses.heroic_max_hp;
}
}
else {
@@ -624,8 +624,7 @@ int64 Client::CalcBaseMana()
auto base_data = database.GetBaseData(GetLevel(), GetClass());
if (base_data) {
max_m = base_data->base_mana +
(ConvertedWisInt * base_data->mana_factor) +
(GetHeroicINT() * RuleR(Character, HeroicIntelligenceMultiplier) * 10);
(ConvertedWisInt * base_data->mana_factor) + itembonuses.heroic_max_mana;
}
}
else {
@@ -658,8 +657,7 @@ int64 Client::CalcBaseMana()
auto base_data = database.GetBaseData(GetLevel(), GetClass());
if (base_data) {
max_m = base_data->base_mana +
(ConvertedWisInt * base_data->mana_factor) +
((GetHeroicWIS() * RuleR(Character, HeroicWisdomMultiplier)) * 10);
(ConvertedWisInt * base_data->mana_factor) + itembonuses.heroic_max_mana;
}
}
else {
@@ -752,18 +750,7 @@ int64 Client::CalcManaRegen(bool bCombat)
// add in + 1 bonus for SE_CompleteHeal, but we don't do anything for it yet?
int item_bonus = itembonuses.ManaRegen; // this is capped already
int heroic_bonus = 0;
switch (GetCasterClass()) {
case 'W':
heroic_bonus = GetHeroicWIS() * RuleR(Character, HeroicWisdomMultiplier);
break;
default:
heroic_bonus = GetHeroicINT() * RuleR(Character, HeroicIntelligenceMultiplier);
break;
}
item_bonus += heroic_bonus / 25;
item_bonus += itembonuses.heroic_mana_regen;
regen += item_bonus;
if (level <= 70 && regen > 65)
@@ -1690,11 +1677,6 @@ int64 Client::CalcBaseEndurance()
{
int64 base_end = 0;
if (ClientVersion() >= EQ::versions::ClientVersion::SoF && RuleB(Character, SoDClientUseSoDHPManaEnd)) {
double heroic_str = GetHeroicSTR() * RuleR(Character, HeroicStrengthMultiplier);
double heroic_sta = GetHeroicSTA() * RuleR(Character, HeroicStaminaMultiplier);
double heroic_dex = GetHeroicDEX() * RuleR(Character, HeroicDexterityMultiplier);
double heroic_agi = GetHeroicAGI() * RuleR(Character, HeroicAgilityMultiplier);
double heroic_stats = (heroic_str + heroic_sta + heroic_dex + heroic_agi) / 4;
double stats = (GetSTR() + GetSTA() + GetDEX() + GetAGI()) / 4.0f;
if (stats > 201.0f) {
@@ -1705,7 +1687,7 @@ int64 Client::CalcBaseEndurance()
}
auto base_data = database.GetBaseData(GetLevel(), GetClass());
if (base_data) {
base_end = base_data->base_end + (heroic_stats * 10.0f) + (base_data->endurance_factor * static_cast<int>(stats));
base_end = base_data->base_end + itembonuses.heroic_max_end + (base_data->endurance_factor * static_cast<int>(stats));
}
}
else {
@@ -1794,13 +1776,7 @@ int64 Client::CalcEnduranceRegen(bool bCombat)
if (encumbered)
base += level / -15;
double heroic_str = GetHeroicSTR() * RuleR(Character, HeroicStrengthMultiplier);
double heroic_sta = GetHeroicSTA() * RuleR(Character, HeroicStaminaMultiplier);
double heroic_dex = GetHeroicDEX() * RuleR(Character, HeroicDexterityMultiplier);
double heroic_agi = GetHeroicAGI() * RuleR(Character, HeroicAgilityMultiplier);
int32 item_bonus = heroic_str + heroic_sta + heroic_dex + heroic_agi;
item_bonus = item_bonus / 4 / 50;
item_bonus += itembonuses.EnduranceRegen; // this is capped already
auto item_bonus = itembonuses.EnduranceRegen + itembonuses.heroic_end_regen; // this is capped already
base += item_bonus;
base = base * AreaEndRegen + 0.5f;