All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
24 lines
998 B
C++
24 lines
998 B
C++
#ifndef CREATURELIB_DAMAGEEVENT_HPP
|
|
#define CREATURELIB_DAMAGEEVENT_HPP
|
|
#include "EventData.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class DamageEvent final : public EventData {
|
|
ArbUt::BorrowedPtr<Creature> _creature;
|
|
DamageSource _damageSource;
|
|
uint32_t _originalHealth;
|
|
uint32_t _newHealth;
|
|
|
|
public:
|
|
DamageEvent(Creature* c, DamageSource s, uint32_t oHealth, uint32_t newHealth) noexcept
|
|
: _creature(c), _damageSource(s), _originalHealth(oHealth), _newHealth(newHealth) {}
|
|
EventDataKind GetKind() const noexcept override { return EventDataKind ::Damage; }
|
|
const ArbUt::BorrowedPtr<Creature>& GetCreature() const noexcept { return _creature; }
|
|
DamageSource GetDamageSource() const noexcept { return _damageSource; }
|
|
uint32_t GetOriginalHealth() const noexcept { return _originalHealth; }
|
|
uint32_t GetNewHealth() const noexcept { return _newHealth; }
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_DAMAGEEVENT_HPP
|