CreatureLib/src/Battling/EventHooks/Events/ChangeStatEvent.hpp

27 lines
1.1 KiB
C++

#ifndef CHANGESTATEVENT_HPP
#define CHANGESTATEVENT_HPP
#include "EventData.hpp"
namespace CreatureLib::Battling {
class ChangeStatBoostEvent final : public EventData {
const ArbUt::BorrowedPtr<Creature> _creature;
const CreatureLib::Library::Statistic _statistic;
const i8 _oldValue;
const i8 _newValue;
public:
ChangeStatBoostEvent(const ArbUt::BorrowedPtr<Creature>& creature, CreatureLib::Library::Statistic statistic,
i8 oldValue, i8 newValue) noexcept
: _creature(creature), _statistic(statistic), _oldValue(oldValue), _newValue(newValue) {}
EventDataKind GetKind() const noexcept override { return EventDataKind ::ChangeStatBoost; }
const ArbUt::BorrowedPtr<Creature>& GetCreature() const noexcept { return _creature; }
CreatureLib::Library::Statistic GetStatistic() const noexcept { return _statistic; }
i8 GetOldValue() const noexcept { return _oldValue; }
i8 GetNewValue() const noexcept { return _newValue; }
};
}
#endif // CHANGESTATEVENT_HPP