feat: change dtos to entities

This commit is contained in:
k0t9i
2023-01-21 13:15:11 +04:00
parent 3c20df7683
commit 7637260d19
58 changed files with 704 additions and 1310 deletions

View File

@@ -2,7 +2,9 @@
#include "../GameStructs/L2GameDataWrapper.h"
#include "../GameStructs/FName.h"
#include "../GameStructs/GameStructs.h"
#include "../../../Common/Common.h"
#include "Domain/Entities/Drop.h"
namespace Interlude
{
@@ -18,13 +20,13 @@ namespace Interlude
DropFactory() = delete;
virtual ~DropFactory() = default;
const DTO::Drop Create(const Item* item) const
Entities::EntityInterface* Create(const Item* item) const
{
const auto itemData = m_L2GameData.GetItemData(item->itemId);
const auto nameEntry = itemData ? m_FName.GetEntry(itemData->nameIndex) : nullptr;
const auto iconEntry = itemData ? m_FName.GetEntry(itemData->iconNameIndex) : nullptr;
return DTO::Drop{
return new Entities::Drop{
item->objectId,
ValueObjects::Transform(
ValueObjects::Vector3(item->pawn->Location.x, item->pawn->Location.y, item->pawn->Location.z),