Use level_int_t for levels.
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:
@@ -3,7 +3,7 @@
|
||||
#include "../PkmnScriptHook.hpp"
|
||||
#include "../Pokemon/Pokemon.hpp"
|
||||
|
||||
static inline uint32_t CalculateDynamicExperience(uint8_t level, float v1,
|
||||
static inline uint32_t CalculateDynamicExperience(level_int_t level, float v1,
|
||||
ArbUt::BorrowedPtr<CreatureLib::Battling::Creature> op,
|
||||
ArbUt::BorrowedPtr<CreatureLib::Battling::Creature> faintedMon) {
|
||||
float a = 2 * level + 10;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define PKMNLIB_EXPERIENCELIBRARY_HPP
|
||||
|
||||
#include <CreatureLib/Battling/Library/ExperienceLibrary.hpp>
|
||||
#include <CreatureLib/Defines.hpp>
|
||||
|
||||
namespace PkmnLib::Battling {
|
||||
class ExperienceLibrary : public CreatureLib::Battling::ExperienceLibrary {
|
||||
public:
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace PkmnLib::Battling {
|
||||
ArbUt::BorrowedPtr<const BattleLibrary> _library;
|
||||
ArbUt::StringView _species = ""_cnc;
|
||||
ArbUt::StringView _forme = "default"_cnc;
|
||||
uint8_t _level;
|
||||
level_int_t _level;
|
||||
std::string _nickname = "";
|
||||
|
||||
ArbUt::StringView _ability = ""_cnc;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace PkmnLib::Battling {
|
||||
public:
|
||||
Pokemon(ArbUt::BorrowedPtr<const BattleLibrary> library,
|
||||
const ArbUt::BorrowedPtr<const Library::PokemonSpecies>& species,
|
||||
const ArbUt::BorrowedPtr<const Library::PokemonForme>& forme, uint8_t level, uint32_t experience,
|
||||
const ArbUt::BorrowedPtr<const Library::PokemonForme>& forme, level_int_t level, uint32_t experience,
|
||||
uint32_t uid, CreatureLib::Library::Gender gender, uint8_t coloring,
|
||||
ArbUt::BorrowedPtr<const Library::Item> heldItem, const std::string& nickname,
|
||||
const CreatureLib::Library::TalentIndex& talent,
|
||||
|
||||
@@ -23,7 +23,7 @@ static uint8_t CalculateLevel(const CreatureLib::Library::GrowthRateLibrary* obj
|
||||
return obj->CalculateLevel(str, experience);
|
||||
}
|
||||
static uint32_t CalculateExperience(const CreatureLib::Library::GrowthRateLibrary* obj, const ArbUt::StringView& str,
|
||||
uint8_t level) {
|
||||
level_int_t level) {
|
||||
return obj->CalculateExperience(str, level);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user