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:
19
src/Battling/EventHooks/Events/SwitchEvent.hpp
Normal file
19
src/Battling/EventHooks/Events/SwitchEvent.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef CREATURELIB_SWITCHEVENT_HPP
|
||||
#define CREATURELIB_SWITCHEVENT_HPP
|
||||
#include "EventData.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class SwitchEvent : public EventData {
|
||||
CreatureIndex _index;
|
||||
ArbUt::BorrowedPtr<Creature> _newCreature;
|
||||
|
||||
public:
|
||||
SwitchEvent(const CreatureIndex& index, const ArbUt::BorrowedPtr<Creature>& newCreature)
|
||||
: _index(index), _newCreature(newCreature) {}
|
||||
EventDataKind GetKind() const noexcept override { return EventDataKind ::Switch; }
|
||||
const CreatureIndex& GetIndex() const noexcept { return _index; }
|
||||
const ArbUt::BorrowedPtr<Creature>& GetNewCreature() const noexcept { return _newCreature; }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_SWITCHEVENT_HPP
|
||||
Reference in New Issue
Block a user