22 lines
931 B
C++
22 lines
931 B
C++
#ifndef CREATURELIB_EXPERIENCEGAINEVENT_HPP
|
|
#define CREATURELIB_EXPERIENCEGAINEVENT_HPP
|
|
#include "EventData.hpp"
|
|
|
|
namespace CreatureLib::Battling {
|
|
class ExperienceGainEvent final : public EventData {
|
|
ArbUt::BorrowedPtr<Creature> _creature;
|
|
u32 _previousExperience;
|
|
u32 _newExperience;
|
|
|
|
public:
|
|
ExperienceGainEvent(const ArbUt::BorrowedPtr<Creature>& creature, u32 previousExp, u32 newExp)
|
|
: _creature(creature), _previousExperience(previousExp), _newExperience(newExp) {}
|
|
EventDataKind GetKind() const noexcept override { return EventDataKind ::ExperienceGain; }
|
|
const ArbUt::BorrowedPtr<Creature>& GetCreature() const noexcept { return _creature; }
|
|
u32 GetPreviousExperience() const noexcept { return _previousExperience; }
|
|
u32 GetNewExperience() const noexcept { return _newExperience; }
|
|
};
|
|
}
|
|
|
|
#endif // CREATURELIB_EXPERIENCEGAINEVENT_HPP
|