All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
23 lines
908 B
C++
23 lines
908 B
C++
#ifndef CREATURELIB_STATUSCHANGEEVENT_HPP
|
|
#define CREATURELIB_STATUSCHANGEEVENT_HPP
|
|
|
|
namespace CreatureLib::Battling {
|
|
class StatusChangeEvent final : public CreatureLib::Battling::EventData {
|
|
ArbUt::BorrowedPtr<Creature> _creature;
|
|
ArbUt::StringView _statusName;
|
|
|
|
public:
|
|
explicit StatusChangeEvent(const ArbUt::BorrowedPtr<Creature>& creature, const ArbUt::StringView& name)
|
|
: _creature(creature), _statusName(name) {}
|
|
|
|
[[nodiscard]] CreatureLib::Battling::EventDataKind GetKind() const noexcept override {
|
|
return static_cast<CreatureLib::Battling::EventDataKind>(EventDataKind::StatusChange);
|
|
}
|
|
|
|
const ArbUt::BorrowedPtr<Creature>& GetCreature() const noexcept { return _creature; }
|
|
const ArbUt::StringView& GetStatusName() const noexcept { return _statusName; }
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_STATUSCHANGEEVENT_HPP
|