Trigger event when stat boost changes.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
26
src/Battling/EventHooks/Events/ChangeStatEvent.hpp
Normal file
26
src/Battling/EventHooks/Events/ChangeStatEvent.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#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 int8_t _oldValue;
|
||||
const int8_t _newValue;
|
||||
|
||||
public:
|
||||
ChangeStatBoostEvent(const ArbUt::BorrowedPtr<Creature>& creature, CreatureLib::Library::Statistic statistic,
|
||||
int8_t oldValue, int8_t 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; }
|
||||
int8_t GetOldValue() const noexcept { return _oldValue; }
|
||||
int8_t GetNewValue() const noexcept { return _newValue; }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CHANGESTATEVENT_HPP
|
||||
Reference in New Issue
Block a user