15 lines
793 B
C++
15 lines
793 B
C++
#include "../../src/Battling/Library/ExperienceLibrary.hpp"
|
|
#include "../Core.hpp"
|
|
using namespace CreatureLib::Battling;
|
|
|
|
export_func const ExperienceLibrary* CreatureLib_ExperienceLibrary_Construct() { return new ExperienceLibrary(); }
|
|
|
|
export_func void CreatureLib_ExperienceLibrary_Destruct(const ExperienceLibrary* p) { delete p; }
|
|
|
|
export_func u8 CreatureLib_ExperienceLibrary_HandleExperienceGain(const ExperienceLibrary* p, Creature* faintedMon,
|
|
Creature* opponents[], size_t opponentsCount) {
|
|
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);)
|
|
}
|