From 41b15dc693e688e0f2b6d6d78b976c17d4e8ef7d Mon Sep 17 00:00:00 2001
From: Deukhoofd <deukhoofd@gmail.com>
Date: Sun, 12 Jul 2020 15:53:27 +0200
Subject: [PATCH] Update to newer CreatureLib.

---
 CInterface/Library/NatureLibrary.cpp   | 2 +-
 src/Battling/Pokemon/CreatePokemon.cpp | 2 +-
 src/Library/Natures/NatureLibrary.hpp  | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/CInterface/Library/NatureLibrary.cpp b/CInterface/Library/NatureLibrary.cpp
index 15d1b78..2ca6bbc 100644
--- a/CInterface/Library/NatureLibrary.cpp
+++ b/CInterface/Library/NatureLibrary.cpp
@@ -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) {
diff --git a/src/Battling/Pokemon/CreatePokemon.cpp b/src/Battling/Pokemon/CreatePokemon.cpp
index bf7ddc1..173e6a3 100644
--- a/src/Battling/Pokemon/CreatePokemon.cpp
+++ b/src/Battling/Pokemon/CreatePokemon.cpp
@@ -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);
     }
diff --git a/src/Library/Natures/NatureLibrary.hpp b/src/Library/Natures/NatureLibrary.hpp
index 8bbf7d0..4719dcd 100644
--- a/src/Library/Natures/NatureLibrary.hpp
+++ b/src/Library/Natures/NatureLibrary.hpp
@@ -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) {