2020-05-20 14:05:52 +00:00
|
|
|
#include "../../src/Battling/Library/ExperienceLibrary.hpp"
|
|
|
|
#include "../Core.hpp"
|
|
|
|
using namespace PkmnLib::Battling;
|
|
|
|
|
2022-04-02 11:03:11 +00:00
|
|
|
export_func ExperienceLibrary* PkmnLib_ExperienceLibrary_Construct() { return new ExperienceLibrary(); }
|
2020-05-20 14:05:52 +00:00
|
|
|
|
2022-04-02 11:03:11 +00:00
|
|
|
export_func uint8_t PkmnLib_ExperienceLibrary_HandleExperienceGain(ExperienceLibrary* p,
|
2020-05-20 14:05:52 +00:00
|
|
|
CreatureLib::Battling::Creature* faintedMon,
|
|
|
|
CreatureLib::Battling::Creature* const* opponents,
|
|
|
|
size_t numberOfOpponents) {
|
2020-06-02 18:37:21 +00:00
|
|
|
Try(p->HandleExperienceGain(faintedMon, std::unordered_set<ArbUt::BorrowedPtr<CreatureLib::Battling::Creature>>(
|
|
|
|
opponents, opponents + numberOfOpponents));)
|
2020-05-20 14:05:52 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 11:03:11 +00:00
|
|
|
export_func void PkmnLib_ExperienceLibrary_Destruct(ExperienceLibrary* p) { delete p; }
|