2020-03-02 14:23:08 +00:00
|
|
|
#include "../../src/Library/CreatureData/LearnableAttacks.hpp"
|
2020-07-31 08:51:03 +00:00
|
|
|
#include "../Core.hpp"
|
2020-03-02 14:23:08 +00:00
|
|
|
using namespace CreatureLib::Library;
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func u8 CreatureLib_LearnableAttacks_Construct(LearnableAttacks*& out, size_t levelAttackCapacity) {
|
2020-03-25 18:07:36 +00:00
|
|
|
Try(out = new LearnableAttacks(levelAttackCapacity);)
|
2020-03-02 14:23:08 +00:00
|
|
|
};
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_LearnableAttacks_Destruct(LearnableAttacks* p) { delete p; }
|
2020-03-02 14:23:08 +00:00
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func void CreatureLib_LearnableAttacks_AddLevelAttack(LearnableAttacks* p, level_int_t level,
|
|
|
|
const AttackData* attack) {
|
2020-04-19 17:15:50 +00:00
|
|
|
p->AddLevelAttack(level, attack);
|
2020-03-02 14:23:08 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func const AttackData* const* CreatureLib_LearnableAttacks_GetAttacksForLevel(LearnableAttacks* p, u8 level) {
|
2020-08-11 17:09:58 +00:00
|
|
|
return reinterpret_cast<const AttackData* const*>(p->GetAttacksForLevel(level).RawData());
|
2020-03-02 14:23:08 +00:00
|
|
|
}
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func bool CreatureLib_LearnableAttacks_HasAttacksForLevel(LearnableAttacks* p, u8 level) {
|
2020-08-11 16:53:01 +00:00
|
|
|
return p->HasAttacksForLevel(level);
|
|
|
|
}
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func size_t CreatureLib_LearnableAttacks_GetAttacksForLevelCount(LearnableAttacks* p, u8 level) {
|
2020-03-22 18:21:40 +00:00
|
|
|
return p->GetAttacksForLevel(level).Count();
|
2020-08-11 15:25:04 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func size_t CreatureLib_LearnableAttacks_GetDistinctLevelAttacksCount(LearnableAttacks* p) {
|
2020-08-11 16:53:01 +00:00
|
|
|
return p->GetDistinctLevelAttacks().Count();
|
2020-08-11 15:25:04 +00:00
|
|
|
}
|
|
|
|
|
2022-04-02 10:33:26 +00:00
|
|
|
export_func const AttackData* const* CreatureLib_LearnableAttacks_GetDistinctLevelAttacks(LearnableAttacks* p) {
|
2020-08-11 17:09:58 +00:00
|
|
|
return reinterpret_cast<const AttackData* const*>(p->GetDistinctLevelAttacks().RawData());
|
2020-03-02 14:23:08 +00:00
|
|
|
}
|