WeatherChangeEvent. C Interface.

This commit is contained in:
Deukhoofd 2020-04-26 20:12:31 +02:00
parent 718c146ebe
commit 686f898259
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 10 additions and 0 deletions

View File

@ -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();
}

View File

@ -14,6 +14,8 @@ namespace PkmnLib::Battling {
[[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override { [[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override {
return static_cast<CreatureLib::Battling::EventDataKind>(PkmnEventDataKind::WeatherChange); return static_cast<CreatureLib::Battling::EventDataKind>(PkmnEventDataKind::WeatherChange);
} }
const Arbutils::CaseInsensitiveConstString GetWeatherName() const noexcept { return _weatherName; }
}; };
} }