This commit is contained in:
@@ -11,8 +11,8 @@ namespace PkmnLib::Library {
|
||||
MoveData(const ArbUt::StringView& name, u8 type, PkmnLib::Library::MoveCategory category, u8 power, u8 accuracy,
|
||||
u8 baseUsage, CreatureLib::Library::AttackTarget target, i8 priority,
|
||||
const CreatureLib::Library::SecondaryEffect* nullable effect, std::unordered_set<u32> flags)
|
||||
: AttackData(name, type, static_cast<CreatureLib::Library::AttackCategory>(category), power, accuracy, baseUsage,
|
||||
target, priority, effect, std::move(flags)) {};
|
||||
: AttackData(name, type, static_cast<CreatureLib::Library::AttackCategory>(category), power, accuracy,
|
||||
baseUsage, target, priority, effect, std::move(flags)){};
|
||||
|
||||
inline PkmnLib::Library::MoveCategory GetCategory() const {
|
||||
return static_cast<PkmnLib::Library::MoveCategory>(AttackData::GetCategory());
|
||||
|
||||
@@ -25,9 +25,7 @@ namespace PkmnLib::Library {
|
||||
return _items.Get(name);
|
||||
}
|
||||
|
||||
inline ArbUt::BorrowedPtr<const Nature> GetNatureByHash(u32 hash) const {
|
||||
return _items.GetFromHash(hash);
|
||||
}
|
||||
inline ArbUt::BorrowedPtr<const Nature> GetNatureByHash(u32 hash) const { return _items.GetFromHash(hash); }
|
||||
|
||||
inline const ArbUt::StringView& GetRandomNatureName(ArbUt::Random rand = ArbUt::Random()) const {
|
||||
auto i = rand.Get(_items.Count());
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace PkmnLib::Library {
|
||||
return tryGet->get();
|
||||
}
|
||||
for (const auto& s : _values) {
|
||||
const auto* pkmn = dynamic_cast<const PokemonSpecies* nullable>(s.second.get());
|
||||
const auto* pkmn = dynamic_cast<const PokemonSpecies * nullable>(s.second.get());
|
||||
if (pkmn == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -33,9 +33,7 @@ namespace PkmnLib::Library {
|
||||
return CreatureLib::Library::SpeciesLibrary::GetByHash(hashedKey).As<const PokemonSpecies>();
|
||||
}
|
||||
|
||||
ArbUt::BorrowedPtr<const PokemonSpecies> operator[](const ArbUt::StringView& name) const {
|
||||
return Get(name);
|
||||
}
|
||||
ArbUt::BorrowedPtr<const PokemonSpecies> operator[](const ArbUt::StringView& name) const { return Get(name); }
|
||||
|
||||
std::optional<ArbUt::BorrowedPtr<const PokemonSpecies>>
|
||||
FindPreEvolution(const ArbUt::BorrowedPtr<const PokemonSpecies>& species) const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user