refactor: move events and service locator into core project
This commit is contained in:
43
L2BotCore/Domain/Events/CreatureDiedEvent.h
Normal file
43
L2BotCore/Domain/Events/CreatureDiedEvent.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include "Event.h"
|
||||
|
||||
namespace L2Bot::Domain::Events
|
||||
{
|
||||
class CreatureDiedEvent : public Event
|
||||
{
|
||||
public:
|
||||
static constexpr const char* name = "creatureDied";
|
||||
|
||||
const std::string GetName() const
|
||||
{
|
||||
return std::string(name);
|
||||
}
|
||||
|
||||
const uint32_t GetCreatureId() const
|
||||
{
|
||||
return m_CreatureId;
|
||||
}
|
||||
|
||||
const std::vector<int32_t>& GetCreatureInfo() const
|
||||
{
|
||||
return m_CreatureInfo;
|
||||
}
|
||||
|
||||
CreatureDiedEvent(uint32_t creatureId, const std::vector<int32_t>& creatureInfo) :
|
||||
m_CreatureId(creatureId),
|
||||
m_CreatureInfo(creatureInfo)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CreatureDiedEvent() = delete;
|
||||
virtual ~CreatureDiedEvent() = default;
|
||||
|
||||
private:
|
||||
const uint32_t m_CreatureId;
|
||||
const std::vector<int32_t> m_CreatureInfo;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user