Files
L2Bot2.0/L2BotCore/Domain/Services/EntityService.h
2023-01-21 13:15:11 +04:00

35 lines
683 B
C++

#pragma once
#include <cstdint>
#include <map>
#include <vector>
#include <math.h>
#include "../DTO/EntityState.h"
#include "../Entities/WorldObject.h"
#include "../Repositories/EntityRepositoryInterface.h"
namespace L2Bot::Domain::Services
{
class EntityService
{
public:
EntityService(Repositories::EntityRepositoryInterface& repository) : m_Repository(repository)
{
}
EntityService() = delete;
virtual ~EntityService() = default;
virtual const std::vector<DTO::EntityState*> GetEntities()
{
return m_Repository.GetEntities();
}
void Invalidate()
{
m_Repository.Reset();
}
private:
Repositories::EntityRepositoryInterface& m_Repository;
};
}