Update CreatureLib, handle getting formes cleaner.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-13 18:00:23 +01:00
parent dd45fea342
commit 7aa29e4543
4 changed files with 17 additions and 3 deletions

View File

@@ -24,6 +24,12 @@ namespace PkmnLib::Library {
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant("default"));
}
inline bool HasForme(const std::string& key) const { return HasVariant(key); }
inline bool TryGetForme(const std::string& key, const PokemonForme*& forme) const {
return TryGetVariant(key, (const CreatureLib::Library::SpeciesVariant*&)forme);
}
inline const PokemonForme* GetForme(const std::string& key) const {
return reinterpret_cast<const PokemonForme*>(CreatureSpecies::GetVariant(key));
}