Update to newer CreatureLib.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-12 15:53:27 +02:00
parent d50926afba
commit 41b15dc693
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
3 changed files with 2 additions and 6 deletions

View File

@ -15,7 +15,7 @@ export uint8_t PkmnLib_NatureLibrary_GetNatureByName(NatureLibrary* p, const cha
}
export const char* PkmnLib_NatureLibrary_GetRandomNatureName(NatureLibrary* p, ArbUt::Random* rand) {
return p->GetRandomNatureName(rand).c_str();
return p->GetRandomNatureName(*rand).c_str();
}
export uint8_t PkmnLib_NatureLibrary_GetNatureName(NatureLibrary* p, const Nature* nature, const char*& out) {

View File

@ -53,7 +53,7 @@ PkmnLib::Battling::Pokemon* PkmnLib::Battling::CreatePokemon::Build() {
AssertNotNull(forme);
CreatureLib::Library::TalentIndex ability;
if (this->_ability.Empty()) {
ability = forme->GetRandomTalent(&rand);
ability = forme->GetRandomTalent(rand);
} else {
ability = forme->GetTalentIndex(this->_ability);
}

View File

@ -33,10 +33,6 @@ namespace PkmnLib::Library {
auto i = rand.Get(_items.size());
return std::next(std::begin(_items), i)->first;
}
inline const ArbUt::StringView& GetRandomNatureName(ArbUt::Random* rand) const {
auto i = rand->Get(_items.size());
return std::next(std::begin(_items), i)->first;
}
inline ArbUt::StringView GetNatureName(ArbUt::BorrowedPtr<const Nature> nature) {
for (const auto& v : _items) {