refactor: rename enums
This commit is contained in:
@ -3,8 +3,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "BaseItem.h"
|
#include "BaseItem.h"
|
||||||
#include "../Enums/ArmorType.h"
|
#include "../Enums/ArmorTypeEnum.h"
|
||||||
#include "../Enums/CrystalType.h"
|
#include "../Enums/CrystalTypeEnum.h"
|
||||||
|
|
||||||
namespace L2Bot::Domain::Entities
|
namespace L2Bot::Domain::Entities
|
||||||
{
|
{
|
||||||
@ -97,8 +97,8 @@ namespace L2Bot::Domain::Entities
|
|||||||
const uint16_t weight,
|
const uint16_t weight,
|
||||||
const bool isEquipped,
|
const bool isEquipped,
|
||||||
const uint16_t enchantLevel,
|
const uint16_t enchantLevel,
|
||||||
const Enums::ArmorType armorType,
|
const Enums::ArmorTypeEnum armorType,
|
||||||
const Enums::CrystalType crystalType,
|
const Enums::CrystalTypeEnum crystalType,
|
||||||
const uint32_t pDefense,
|
const uint32_t pDefense,
|
||||||
const uint32_t mDefense,
|
const uint32_t mDefense,
|
||||||
const std::string& setEffect,
|
const std::string& setEffect,
|
||||||
@ -114,7 +114,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
iconName,
|
iconName,
|
||||||
description,
|
description,
|
||||||
weight,
|
weight,
|
||||||
Enums::ItemType::armor
|
Enums::ItemTypeEnum::armor
|
||||||
),
|
),
|
||||||
m_IsEquipped(isEquipped),
|
m_IsEquipped(isEquipped),
|
||||||
m_EnchantLevel(enchantLevel),
|
m_EnchantLevel(enchantLevel),
|
||||||
@ -159,8 +159,8 @@ namespace L2Bot::Domain::Entities
|
|||||||
private:
|
private:
|
||||||
bool m_IsEquipped = 0;
|
bool m_IsEquipped = 0;
|
||||||
uint16_t m_EnchantLevel = 0;
|
uint16_t m_EnchantLevel = 0;
|
||||||
Enums::ArmorType m_ArmorType = Enums::ArmorType::none;
|
Enums::ArmorTypeEnum m_ArmorType = Enums::ArmorTypeEnum::none;
|
||||||
Enums::CrystalType m_CrystalType = Enums::CrystalType::none;
|
Enums::CrystalTypeEnum m_CrystalType = Enums::CrystalTypeEnum::none;
|
||||||
uint32_t m_PDefense = 0;
|
uint32_t m_PDefense = 0;
|
||||||
uint32_t m_MDefense = 0;
|
uint32_t m_MDefense = 0;
|
||||||
std::string m_SetEffect = "";
|
std::string m_SetEffect = "";
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "EntityInterface.h"
|
#include "EntityInterface.h"
|
||||||
#include "../Enums/ItemType.h"
|
#include "../Enums/ItemTypeEnum.h"
|
||||||
|
|
||||||
namespace L2Bot::Domain::Entities
|
namespace L2Bot::Domain::Entities
|
||||||
{
|
{
|
||||||
@ -89,7 +89,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
const std::string& iconName,
|
const std::string& iconName,
|
||||||
const std::string& description,
|
const std::string& description,
|
||||||
const uint16_t weight,
|
const uint16_t weight,
|
||||||
const Enums::ItemType type
|
const Enums::ItemTypeEnum type
|
||||||
) :
|
) :
|
||||||
m_ObjectId(objectId),
|
m_ObjectId(objectId),
|
||||||
m_ItemId(itemId),
|
m_ItemId(itemId),
|
||||||
@ -134,7 +134,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
std::string m_IconName = "";
|
std::string m_IconName = "";
|
||||||
std::string m_Description = "";
|
std::string m_Description = "";
|
||||||
uint16_t m_Weight = 0;
|
uint16_t m_Weight = 0;
|
||||||
Enums::ItemType m_Type = Enums::ItemType::none;
|
Enums::ItemTypeEnum m_Type = Enums::ItemTypeEnum::none;
|
||||||
GetState m_PrevState = GetState();
|
GetState m_PrevState = GetState();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
iconName,
|
iconName,
|
||||||
description,
|
description,
|
||||||
weight,
|
weight,
|
||||||
Enums::ItemType::etc
|
Enums::ItemTypeEnum::etc
|
||||||
),
|
),
|
||||||
m_Amount(amount),
|
m_Amount(amount),
|
||||||
m_IsQuest(isQuest)
|
m_IsQuest(isQuest)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "BaseItem.h"
|
#include "BaseItem.h"
|
||||||
#include "../Enums/CrystalType.h"
|
#include "../Enums/CrystalTypeEnum.h"
|
||||||
|
|
||||||
namespace L2Bot::Domain::Entities
|
namespace L2Bot::Domain::Entities
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
const uint16_t weight,
|
const uint16_t weight,
|
||||||
const bool isEquipped,
|
const bool isEquipped,
|
||||||
const uint16_t enchantLevel,
|
const uint16_t enchantLevel,
|
||||||
const Enums::CrystalType crystalType,
|
const Enums::CrystalTypeEnum crystalType,
|
||||||
const int16_t evasion,
|
const int16_t evasion,
|
||||||
const uint32_t pDefense,
|
const uint32_t pDefense,
|
||||||
const uint16_t defRate
|
const uint16_t defRate
|
||||||
@ -97,7 +97,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
iconName,
|
iconName,
|
||||||
description,
|
description,
|
||||||
weight,
|
weight,
|
||||||
Enums::ItemType::shield
|
Enums::ItemTypeEnum::shield
|
||||||
),
|
),
|
||||||
m_IsEquipped(isEquipped),
|
m_IsEquipped(isEquipped),
|
||||||
m_EnchantLevel(enchantLevel),
|
m_EnchantLevel(enchantLevel),
|
||||||
@ -136,7 +136,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
private:
|
private:
|
||||||
bool m_IsEquipped = 0;
|
bool m_IsEquipped = 0;
|
||||||
uint16_t m_EnchantLevel = 0;
|
uint16_t m_EnchantLevel = 0;
|
||||||
Enums::CrystalType m_CrystalType = Enums::CrystalType::none;
|
Enums::CrystalTypeEnum m_CrystalType = Enums::CrystalTypeEnum::none;
|
||||||
int16_t m_Evasion = 0;
|
int16_t m_Evasion = 0;
|
||||||
uint32_t m_PDefense = 0;
|
uint32_t m_PDefense = 0;
|
||||||
uint16_t m_DefRate = 0;
|
uint16_t m_DefRate = 0;
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "BaseItem.h"
|
#include "BaseItem.h"
|
||||||
#include "../Enums/WeaponType.h"
|
#include "../Enums/WeaponTypeEnum.h"
|
||||||
#include "../Enums/CrystalType.h"
|
#include "../Enums/CrystalTypeEnum.h"
|
||||||
|
|
||||||
namespace L2Bot::Domain::Entities
|
namespace L2Bot::Domain::Entities
|
||||||
{
|
{
|
||||||
@ -109,8 +109,8 @@ namespace L2Bot::Domain::Entities
|
|||||||
const uint16_t weight,
|
const uint16_t weight,
|
||||||
const bool isEquipped,
|
const bool isEquipped,
|
||||||
const uint16_t enchantLevel,
|
const uint16_t enchantLevel,
|
||||||
const Enums::WeaponType weaponType,
|
const Enums::WeaponTypeEnum weaponType,
|
||||||
const Enums::CrystalType crystalType,
|
const Enums::CrystalTypeEnum crystalType,
|
||||||
const uint8_t rndDamage,
|
const uint8_t rndDamage,
|
||||||
const uint32_t pAttack,
|
const uint32_t pAttack,
|
||||||
const uint32_t mAttack,
|
const uint32_t mAttack,
|
||||||
@ -130,7 +130,7 @@ namespace L2Bot::Domain::Entities
|
|||||||
iconName,
|
iconName,
|
||||||
description,
|
description,
|
||||||
weight,
|
weight,
|
||||||
Enums::ItemType::weapon
|
Enums::ItemTypeEnum::weapon
|
||||||
),
|
),
|
||||||
m_IsEquipped(isEquipped),
|
m_IsEquipped(isEquipped),
|
||||||
m_EnchantLevel(enchantLevel),
|
m_EnchantLevel(enchantLevel),
|
||||||
@ -184,8 +184,8 @@ namespace L2Bot::Domain::Entities
|
|||||||
private:
|
private:
|
||||||
bool m_IsEquipped = 0;
|
bool m_IsEquipped = 0;
|
||||||
uint16_t m_EnchantLevel = 0;
|
uint16_t m_EnchantLevel = 0;
|
||||||
Enums::WeaponType m_WeaponType = Enums::WeaponType::none;
|
Enums::WeaponTypeEnum m_WeaponType = Enums::WeaponTypeEnum::none;
|
||||||
Enums::CrystalType m_CrystalType = Enums::CrystalType::none;
|
Enums::CrystalTypeEnum m_CrystalType = Enums::CrystalTypeEnum::none;
|
||||||
uint8_t m_RndDamage = 0;
|
uint8_t m_RndDamage = 0;
|
||||||
uint32_t m_PAttack = 0;
|
uint32_t m_PAttack = 0;
|
||||||
uint32_t m_MAttack = 0;
|
uint32_t m_MAttack = 0;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace L2Bot::Domain::Enums
|
namespace L2Bot::Domain::Enums
|
||||||
{
|
{
|
||||||
enum class ArmorType : uint8_t
|
enum class ArmorTypeEnum : uint8_t
|
||||||
{
|
{
|
||||||
none = 0,
|
none = 0,
|
||||||
light,
|
light,
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace L2Bot::Domain::Enums
|
namespace L2Bot::Domain::Enums
|
||||||
{
|
{
|
||||||
enum class CrystalType : int8_t
|
enum class CrystalTypeEnum : int8_t
|
||||||
{
|
{
|
||||||
none = -1,
|
none = -1,
|
||||||
ng,
|
ng,
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace L2Bot::Domain::Enums
|
namespace L2Bot::Domain::Enums
|
||||||
{
|
{
|
||||||
enum class ItemType : int8_t
|
enum class ItemTypeEnum : int8_t
|
||||||
{
|
{
|
||||||
none = -1,
|
none = -1,
|
||||||
etc,
|
etc,
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace L2Bot::Domain::Enums
|
namespace L2Bot::Domain::Enums
|
||||||
{
|
{
|
||||||
enum class WeaponType : uint8_t
|
enum class WeaponTypeEnum : uint8_t
|
||||||
{
|
{
|
||||||
none = 0,
|
none = 0,
|
||||||
sword,
|
sword,
|
@ -168,10 +168,11 @@
|
|||||||
<ClInclude Include="Domain\Entities\ShieldItem.h" />
|
<ClInclude Include="Domain\Entities\ShieldItem.h" />
|
||||||
<ClInclude Include="Domain\Entities\Skill.h" />
|
<ClInclude Include="Domain\Entities\Skill.h" />
|
||||||
<ClInclude Include="Domain\Entities\WeaponItem.h" />
|
<ClInclude Include="Domain\Entities\WeaponItem.h" />
|
||||||
<ClInclude Include="Domain\Enums\ArmorType.h" />
|
<ClInclude Include="Domain\Enums\ArmorTypeEnum.h" />
|
||||||
<ClInclude Include="Domain\Enums\CrystalType.h" />
|
<ClInclude Include="Domain\Enums\CrystalTypeEnum.h" />
|
||||||
<ClInclude Include="Domain\Enums\ItemType.h" />
|
<ClInclude Include="Domain\Enums\ChatChannelEnum.h" />
|
||||||
<ClInclude Include="Domain\Enums\WeaponType.h" />
|
<ClInclude Include="Domain\Enums\ItemTypeEnum.h" />
|
||||||
|
<ClInclude Include="Domain\Enums\WeaponTypeEnum.h" />
|
||||||
<ClInclude Include="Domain\ValueObjects\Vector3.h" />
|
<ClInclude Include="Domain\ValueObjects\Vector3.h" />
|
||||||
<ClInclude Include="Domain\Enums\SpoilStateEnum.h" />
|
<ClInclude Include="Domain\Enums\SpoilStateEnum.h" />
|
||||||
<ClInclude Include="Domain\Transports\TransportInterface.h" />
|
<ClInclude Include="Domain\Transports\TransportInterface.h" />
|
||||||
|
@ -117,13 +117,13 @@
|
|||||||
<ClInclude Include="Domain\Entities\ArmorItem.h">
|
<ClInclude Include="Domain\Entities\ArmorItem.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Enums\ArmorType.h">
|
<ClInclude Include="Domain\Enums\ArmorTypeEnum.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Enums\CrystalType.h">
|
<ClInclude Include="Domain\Enums\CrystalTypeEnum.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Enums\WeaponType.h">
|
<ClInclude Include="Domain\Enums\WeaponTypeEnum.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Entities\WeaponItem.h">
|
<ClInclude Include="Domain\Entities\WeaponItem.h">
|
||||||
@ -132,12 +132,15 @@
|
|||||||
<ClInclude Include="Domain\Entities\ShieldItem.h">
|
<ClInclude Include="Domain\Entities\ShieldItem.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Enums\ItemType.h">
|
<ClInclude Include="Domain\Enums\ItemTypeEnum.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Domain\Entities\AbnormalEffect.h">
|
<ClInclude Include="Domain\Entities\AbnormalEffect.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Domain\Enums\ChatChannelEnum.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="pch.cpp">
|
<ClCompile Include="pch.cpp">
|
||||||
|
@ -134,8 +134,8 @@ namespace Interlude
|
|||||||
itemData ? itemData->weight : 0,
|
itemData ? itemData->weight : 0,
|
||||||
itemInfo.isEquipped > 0,
|
itemInfo.isEquipped > 0,
|
||||||
itemInfo.enchantLevel,
|
itemInfo.enchantLevel,
|
||||||
casted ? static_cast<Enums::ArmorType>(casted->armorType) : Enums::ArmorType::none,
|
casted ? static_cast<Enums::ArmorTypeEnum>(casted->armorType) : Enums::ArmorTypeEnum::none,
|
||||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
casted ? static_cast<Enums::CrystalTypeEnum>(casted->crystalType) : Enums::CrystalTypeEnum::none,
|
||||||
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->pDefense : 0, itemInfo.enchantLevel),
|
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->pDefense : 0, itemInfo.enchantLevel),
|
||||||
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->mDefense : 0, itemInfo.enchantLevel),
|
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->mDefense : 0, itemInfo.enchantLevel),
|
||||||
setEffect,
|
setEffect,
|
||||||
@ -166,8 +166,8 @@ namespace Interlude
|
|||||||
itemData ? itemData->weight : 0,
|
itemData ? itemData->weight : 0,
|
||||||
itemInfo.isEquipped > 0,
|
itemInfo.isEquipped > 0,
|
||||||
itemInfo.enchantLevel,
|
itemInfo.enchantLevel,
|
||||||
casted ? static_cast<Enums::WeaponType>(casted->weaponType) : Enums::WeaponType::none,
|
casted ? static_cast<Enums::WeaponTypeEnum>(casted->weaponType) : Enums::WeaponTypeEnum::none,
|
||||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
casted ? static_cast<Enums::CrystalTypeEnum>(casted->crystalType) : Enums::CrystalTypeEnum::none,
|
||||||
casted ? casted->rndDamage : 0,
|
casted ? casted->rndDamage : 0,
|
||||||
m_EnchantHelper.GetPAttackEnchantValue(casted->weaponType, itemInfo.isTwoHanded, casted->crystalType, casted ? casted->pAttack : 0, itemInfo.enchantLevel),
|
m_EnchantHelper.GetPAttackEnchantValue(casted->weaponType, itemInfo.isTwoHanded, casted->crystalType, casted ? casted->pAttack : 0, itemInfo.enchantLevel),
|
||||||
m_EnchantHelper.GetMAttackEnchantValue(casted->crystalType, casted ? casted->mAttack : 0, itemInfo.enchantLevel),
|
m_EnchantHelper.GetMAttackEnchantValue(casted->crystalType, casted ? casted->mAttack : 0, itemInfo.enchantLevel),
|
||||||
@ -190,7 +190,7 @@ namespace Interlude
|
|||||||
itemData ? itemData->weight : 0,
|
itemData ? itemData->weight : 0,
|
||||||
itemInfo.isEquipped > 0,
|
itemInfo.isEquipped > 0,
|
||||||
itemInfo.enchantLevel,
|
itemInfo.enchantLevel,
|
||||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
casted ? static_cast<Enums::CrystalTypeEnum>(casted->crystalType) : Enums::CrystalTypeEnum::none,
|
||||||
casted ? casted->shieldEvasion : 0,
|
casted ? casted->shieldEvasion : 0,
|
||||||
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->shieldPdef : 0, itemInfo.enchantLevel),
|
m_EnchantHelper.GetDefenseEnchantValue(casted ? casted->shieldPdef : 0, itemInfo.enchantLevel),
|
||||||
casted ? casted->shieldDefRate : 0
|
casted ? casted->shieldDefRate : 0
|
||||||
|
Reference in New Issue
Block a user