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-03-23 12:56:45 +00:00
|
|
|
export 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
|
|
|
};
|
|
|
|
|
|
|
|
export void CreatureLib_LearnableAttacks_Destruct(LearnableAttacks* p) { delete p; }
|
|
|
|
|
2020-08-20 11:39:16 +00:00
|
|
|
export 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-03-23 12:56:45 +00:00
|
|
|
export 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-03-23 12:56:45 +00:00
|
|
|
export bool CreatureLib_LearnableAttacks_HasAttacksForLevel(LearnableAttacks* p, u8 level) {
|
2020-08-11 16:53:01 +00:00
|
|
|
return p->HasAttacksForLevel(level);
|
|
|
|
}
|
2022-03-23 12:56:45 +00:00
|
|
|
export 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
|
|
|
}
|
|
|
|
|
|
|
|
export 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
|
|
|
}
|
|
|
|
|
|
|
|
export 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
|
|
|
}
|