Cleaned up Events, added events on species and variant 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:
21
src/Battling/EventHooks/Events/HealEvent.hpp
Normal file
21
src/Battling/EventHooks/Events/HealEvent.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef CREATURELIB_HEALEVENT_HPP
|
||||
#define CREATURELIB_HEALEVENT_HPP
|
||||
#include "EventData.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class HealEvent : public EventData {
|
||||
ArbUt::BorrowedPtr<Creature> _creature;
|
||||
uint32_t _originalHealth;
|
||||
uint32_t _newHealth;
|
||||
|
||||
public:
|
||||
HealEvent(ArbUt::BorrowedPtr<Creature> c, uint32_t oHealth, uint32_t newHealth) noexcept
|
||||
: _creature(c), _originalHealth(oHealth), _newHealth(newHealth) {}
|
||||
EventDataKind GetKind() const noexcept override { return EventDataKind ::Heal; }
|
||||
const ArbUt::BorrowedPtr<Creature>& GetCreature() const noexcept { return _creature; }
|
||||
uint32_t GetOriginalHealth() const noexcept { return _originalHealth; }
|
||||
uint32_t GetNewHealth() const noexcept { return _newHealth; }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_HEALEVENT_HPP
|
||||
Reference in New Issue
Block a user