CreatureLib/CInterface/Library/Talent.cpp

18 lines
892 B
C++

#include "../../src/Library/CreatureData/Talent.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Library;
export Talent* CreatureLib_Talent_Construct(const char* name, const char* effect, EffectParameter* effectParameters[],
size_t effectParameterCount) {
ArbUt::List<EffectParameter*> effectParameterList(effectParameterCount);
for (size_t i = 0; i < effectParameterCount; i++) {
effectParameterList.Append(effectParameters[i]);
}
return new Talent(ArbUt::StringView(name), ArbUt::StringView(effect), effectParameterList);
}
export void CreatureLib_Talent_Destruct(const Talent* p) { delete p; }
export const char* CreatureLib_Talent_GetName(const Talent* talent) { return talent->GetName().c_str(); }
export const char* CreatureLib_Talent_GetEffect(const Talent* talent) { return talent->GetEffect().c_str(); }