Remove status handling, as its already in CreatureLib
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-07-09 15:37:44 +02:00
parent 2e2dfbaf1d
commit b5ea856443
6 changed files with 2 additions and 65 deletions

View File

@@ -2,6 +2,6 @@
#define PKMNLIB_PKMNEVENTKIND_HPP
#include <CreatureLib/Battling/EventHooks/EventDataKind.hpp>
ENUM_WITH_START_VALUE(PkmnEventDataKind, uint8_t, 128, WeatherChange, StatusChange)
ENUM_WITH_START_VALUE(PkmnEventDataKind, uint8_t, 128, WeatherChange)
#endif // PKMNLIB_PKMNEVENTKIND_HPP

View File

@@ -1,26 +0,0 @@
#ifndef PKMNLIB_STATUSCHANGEEVENT_HPP
#define PKMNLIB_STATUSCHANGEEVENT_HPP
#include <CreatureLib/Battling/EventHooks/Events/EventData.hpp>
#include "../Pokemon/Pokemon.hpp"
#include "PkmnEventKind.hpp"
namespace PkmnLib::Battling {
class StatusChangeEvent final : public CreatureLib::Battling::EventData {
ArbUt::BorrowedPtr<Pokemon> _pokemon;
ArbUt::StringView _statusName;
public:
explicit StatusChangeEvent(const ArbUt::BorrowedPtr<Pokemon>& pkmn, const ArbUt::StringView& name)
: _pokemon(pkmn), _statusName(name) {}
[[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override {
return static_cast<CreatureLib::Battling::EventDataKind>(PkmnEventDataKind::StatusChange);
}
const ArbUt::BorrowedPtr<Pokemon>& GetPokemon() const noexcept { return _pokemon; }
const ArbUt::StringView& GetStatusName() const noexcept { return _statusName; }
};
}
#endif // PKMNLIB_STATUSCHANGEEVENT_HPP