Reworks nature library to be simpler.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
#include "Pokemon.hpp"
|
||||
const PkmnLib::Library::Nature& PkmnLib::Battling::Pokemon::GetNature() const{
|
||||
if (_natureCache == nullptr){
|
||||
auto p = const_cast<Pokemon*>(this);
|
||||
p->_natureCache = this->GetLibrary()->GetNatureLibrary()->GetNaturePtr(_nature);
|
||||
}
|
||||
return *_natureCache;
|
||||
return this->GetLibrary()->GetNatureLibrary()->GetNatureByName(_nature);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user