Trigger event hook on weather change/
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
9
src/Battling/EventHooks/PkmnEventKind.hpp
Normal file
9
src/Battling/EventHooks/PkmnEventKind.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef PKMNLIB_PKMNEVENTKIND_HPP
|
||||
#define PKMNLIB_PKMNEVENTKIND_HPP
|
||||
#include <Arbutils/Enum.hpp>
|
||||
#include <CreatureLib/Battling/EventHooks/EventDataKind.hpp>
|
||||
|
||||
ENUM_WITH_START_VALUE(PkmnEventDataKind, uint8_t, ((uint8_t)CreatureLib::Battling::EventDataKindHelper::Highest()) + 1,
|
||||
WeatherChange)
|
||||
|
||||
#endif // PKMNLIB_PKMNEVENTKIND_HPP
|
||||
20
src/Battling/EventHooks/WeatherChangeEvent.hpp
Normal file
20
src/Battling/EventHooks/WeatherChangeEvent.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef PKMNLIB_WEATHERCHANGEEVENT_HPP
|
||||
#define PKMNLIB_WEATHERCHANGEEVENT_HPP
|
||||
#include <Arbutils/ConstString.hpp>
|
||||
#include <CreatureLib/Battling/EventHooks/EventData.hpp>
|
||||
#include "PkmnEventKind.hpp"
|
||||
|
||||
namespace PkmnLib::Battling {
|
||||
class WeatherChangeEvent : public CreatureLib::Battling::EventData {
|
||||
Arbutils::CaseInsensitiveConstString _weatherName;
|
||||
|
||||
public:
|
||||
explicit WeatherChangeEvent(const Arbutils::CaseInsensitiveConstString& name) : _weatherName(name) {}
|
||||
|
||||
[[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override {
|
||||
return static_cast<CreatureLib::Battling::EventDataKind>(PkmnEventDataKind::WeatherChange);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // PKMNLIB_WEATHERCHANGEEVENT_HPP
|
||||
Reference in New Issue
Block a user