Smart pointers for most library and battle classes.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-06-02 20:37:21 +02:00
parent 1d1dc877a0
commit 2d3a2fc63b
22 changed files with 91 additions and 89 deletions

View File

@@ -28,7 +28,7 @@ float PkmnLib::Battling::DamageLibrary::GetStatModifier(CreatureLib::Battling::E
// HOOK: allow overriding for which users stat we use.
CreatureLib::Library::Statistic offensiveStat;
CreatureLib::Library::Statistic defensiveStat;
auto learnedMove = static_cast<LearnedMove*>(attack->GetAttack());
auto learnedMove = attack->GetAttack().ForceAs<LearnedMove>();
auto moveData = learnedMove->GetMoveData();
if (moveData->GetCategory() == Library::MoveCategory::Physical) {
offensiveStat = Library::Statistic::PhysicalAttack;