feat: add attackers handling

This commit is contained in:
k0t9i
2023-11-11 15:44:03 +04:00
parent 129381e13c
commit e42ff2b5e7
10 changed files with 177 additions and 11 deletions

View File

@@ -0,0 +1,43 @@
#pragma once
#include <cstdint>
#include <vector>
#include "Event.h"
namespace L2Bot::Domain::Events
{
class AttackedEvent : public Event
{
public:
static constexpr const char* name = "attacked";
const std::string GetName() const
{
return std::string(name);
}
const uint32_t GetAttackerId() const
{
return m_AttackerId;
}
const uint32_t GetTargetId() const
{
return m_TargetId;
}
AttackedEvent(const uint32_t attackerId, const uint32_t targetId) :
m_AttackerId(attackerId),
m_TargetId(targetId)
{
}
AttackedEvent() = delete;
virtual ~AttackedEvent() = default;
private:
const uint32_t m_AttackerId;
const uint32_t m_TargetId;
};
}