CreatureLib/CInterface/Library/Talent.cpp

18 lines
917 B
C++
Raw Permalink Normal View History

#include "../../src/Library/CreatureData/Talent.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Library;
2022-04-02 10:33:26 +00:00
export_func 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);
}
2022-04-02 10:33:26 +00:00
export_func void CreatureLib_Talent_Destruct(const Talent* p) { delete p; }
2022-04-02 10:33:26 +00:00
export_func const char* CreatureLib_Talent_GetName(const Talent* talent) { return talent->GetName().c_str(); }
2022-04-02 10:33:26 +00:00
export_func const char* CreatureLib_Talent_GetEffect(const Talent* talent) { return talent->GetEffect().c_str(); }