2020-03-04 17:53:32 +00:00
|
|
|
#include "../../src/Battling/Library/ExperienceLibrary.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-04 17:53:32 +00:00
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func const ExperienceLibrary* CreatureLib_ExperienceLibrary_Construct() { return new ExperienceLibrary(); }
|
2020-03-04 17:53:32 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_ExperienceLibrary_Destruct(const ExperienceLibrary* p) { delete p; }
|
2020-03-04 17:53:32 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_ExperienceLibrary_HandleExperienceGain(const ExperienceLibrary* p, Creature* faintedMon,
|
|
|
|
Creature* opponents[], size_t opponentsCount) {
|
2020-06-02 14:20:47 +00:00
|
|
|
Try(auto set = std::unordered_set<ArbUt::BorrowedPtr<Creature>>(opponentsCount);
|
|
|
|
for (size_t i = 0; i < opponentsCount;
|
|
|
|
i++) { set.insert(opponents[i]); } p->HandleExperienceGain(faintedMon, set);)
|
2020-03-04 17:53:32 +00:00
|
|
|
}
|