Inlined get stats from Creature. These are frequently called one line methods.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-25 16:15:27 +02:00
parent 0e874346bb
commit 864a9d933d
2 changed files with 8 additions and 16 deletions

View File

@@ -60,18 +60,6 @@ bool Battling::Creature::ChangeStatBoost(Library::Statistic stat, int8_t diffAmo
return changed;
}
uint32_t Battling::Creature::GetFlatStat(Library::Statistic stat) const noexcept { return _flatStats.GetStat(stat); }
uint32_t Battling::Creature::GetBoostedStat(Library::Statistic stat) const noexcept {
return _boostedStats.GetStat(stat);
}
uint32_t Battling::Creature::GetBaseStat(Library::Statistic stat) const noexcept {
return _variant->GetStatistic(stat);
}
int8_t Battling::Creature::GetStatBoost(Library::Statistic stat) const noexcept { return _statBoost.GetStat(stat); }
void Battling::Creature::RecalculateFlatStats() {
auto statCalc = this->_library->GetStatCalculator();
this->_flatStats = statCalc->CalculateFlatStats(this);