refactor: remove unnecessary classes

This commit is contained in:
k0t9i
2023-10-16 00:03:43 +04:00
parent a7a9b626f4
commit 787f4969ed
57 changed files with 1651 additions and 1600 deletions

View File

@@ -22,7 +22,6 @@
#include "GameStructs/GameEngineWrapper.h"
#include "GameStructs/L2GameDataWrapper.h"
#include "GameStructs/FName.h"
#include "../../Services/EntityFinder.h"
#include "Helpers/EnchantHelper.h"
namespace Interlude
@@ -41,22 +40,18 @@ namespace Interlude
HeroRepository& GetHeroRepository() const override
{
static auto factory = HeroFactory();
static EntityFinder finder;
static auto result = HeroRepository(
GetNetworkHandler(),
factory,
finder
factory
);
return result;
}
DropRepository& GetDropRepository() const override
{
static auto factory = DropFactory(GetL2GameData(), GetFName());
static EntityFinder finder;
static auto result = DropRepository(
GetNetworkHandler(),
factory,
finder,
m_Radius
);
return result;
@@ -64,11 +59,9 @@ namespace Interlude
NPCRepository& GetNPCRepository() const override
{
static auto factory = NPCFactory();
static EntityFinder finder;
static auto result = NPCRepository(
GetNetworkHandler(),
factory,
finder,
m_Radius
);
return result;
@@ -76,11 +69,9 @@ namespace Interlude
PlayerRepository& GetPlayerRepository() const override
{
static auto factory = PlayerFactory();
static EntityFinder finder;
static auto result = PlayerRepository(
GetNetworkHandler(),
factory,
finder,
m_Radius
);
return result;
@@ -88,11 +79,9 @@ namespace Interlude
SkillRepository& GetSkillRepository() const override
{
static auto factory = SkillFactory(GetL2GameData(), GetFName());
static EntityFinder finder;
static auto result = SkillRepository(
GetNetworkHandler(),
factory,
finder
factory
);
return result;
}
@@ -100,22 +89,16 @@ namespace Interlude
{
static EnchantHelper enchantHelper;
static auto factory = ItemFactory(GetL2GameData(), GetFName(), enchantHelper);
static EntityFinder finder;
static auto result = ItemRepository(
GetNetworkHandler(),
factory,
finder
factory
);
return result;
}
AbnormalEffectRepository& GetAbnormalEffectRepository() const override
{
static auto factory = AbnormalEffectFactory(GetL2GameData(), GetFName());
static EntityFinder finder;
static auto result = AbnormalEffectRepository(
factory,
finder
);
static auto result = AbnormalEffectRepository(factory);
return result;
}
ChatMessageRepository& GetChatMessageRepository() const override