diff --git a/CInterface/Battling/EventHooks.cpp b/CInterface/Battling/EventHooks.cpp new file mode 100644 index 0000000..c74e106 --- /dev/null +++ b/CInterface/Battling/EventHooks.cpp @@ -0,0 +1,8 @@ +#include "../../src/Battling/EventHooks/WeatherChangeEvent.hpp" +#include "../Core.hpp" +using namespace PkmnLib::Battling; + +export void PkmnLib_WeatherChangeEvent_Destruct(WeatherChangeEvent* p) { delete p; } +export const char* PkmnLib_WeatherChangeEvent_GetWeatherName(WeatherChangeEvent* p) { + return p->GetWeatherName().c_str(); +} \ No newline at end of file diff --git a/src/Battling/EventHooks/WeatherChangeEvent.hpp b/src/Battling/EventHooks/WeatherChangeEvent.hpp index bf79ad1..752828b 100644 --- a/src/Battling/EventHooks/WeatherChangeEvent.hpp +++ b/src/Battling/EventHooks/WeatherChangeEvent.hpp @@ -14,6 +14,8 @@ namespace PkmnLib::Battling { [[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override { return static_cast(PkmnEventDataKind::WeatherChange); } + + const Arbutils::CaseInsensitiveConstString GetWeatherName() const noexcept { return _weatherName; } }; }