refactor: switch to wide string
This commit is contained in:
@@ -43,14 +43,14 @@ namespace L2Bot::Domain::Entities
|
||||
{
|
||||
std::vector<Serializers::Node> result;
|
||||
|
||||
result.push_back({ "skillId", std::to_string(m_SkillId) });
|
||||
result.push_back({ "level", std::to_string(m_Level) });
|
||||
result.push_back({ L"skillId", std::to_wstring(m_SkillId) });
|
||||
result.push_back({ L"level", std::to_wstring(m_Level) });
|
||||
|
||||
if (m_IsNewState)
|
||||
{
|
||||
result.push_back({ "name", m_Name });
|
||||
result.push_back({ "iconName", m_IconName });
|
||||
result.push_back({ "description", m_Description });
|
||||
result.push_back({ L"name", m_Name });
|
||||
result.push_back({ L"iconName", m_IconName });
|
||||
result.push_back({ L"description", m_Description });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -59,9 +59,9 @@ namespace L2Bot::Domain::Entities
|
||||
AbnormalEffect(
|
||||
const uint32_t skillId,
|
||||
const uint8_t level,
|
||||
const std::string& name,
|
||||
const std::string& description,
|
||||
const std::string& iconName
|
||||
const std::wstring& name,
|
||||
const std::wstring& description,
|
||||
const std::wstring& iconName
|
||||
) :
|
||||
m_SkillId(skillId),
|
||||
m_Level(level),
|
||||
@@ -87,9 +87,9 @@ namespace L2Bot::Domain::Entities
|
||||
private:
|
||||
uint32_t m_SkillId = 0;
|
||||
uint8_t m_Level = 0;
|
||||
std::string m_Name = "";
|
||||
std::string m_Description = "";
|
||||
std::string m_IconName = "";
|
||||
std::wstring m_Name = L"";
|
||||
std::wstring m_Description = L"";
|
||||
std::wstring m_IconName = L"";
|
||||
bool m_IsNewState = true;
|
||||
};
|
||||
}
|
||||
|
@@ -60,28 +60,28 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "armorType", std::to_string(static_cast<uint8_t>(m_ArmorType)) });
|
||||
result.push_back({ "crystalType", std::to_string(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ "setEffect", m_SetEffect });
|
||||
result.push_back({ "addSetEffect", m_AddSetEffect });
|
||||
result.push_back({ "enchantEffect", m_EnchantEffect });
|
||||
result.push_back({ L"armorType", std::to_wstring(static_cast<uint8_t>(m_ArmorType)) });
|
||||
result.push_back({ L"crystalType", std::to_wstring(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ L"setEffect", m_SetEffect });
|
||||
result.push_back({ L"addSetEffect", m_AddSetEffect });
|
||||
result.push_back({ L"enchantEffect", m_EnchantEffect });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_IsEquipped != m_PrevState.isEquipped)
|
||||
{
|
||||
result.push_back({ "isEquipped", std::to_string(m_IsEquipped) });
|
||||
result.push_back({ L"isEquipped", std::to_wstring(m_IsEquipped) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_EnchantLevel != m_PrevState.enchantLevel)
|
||||
{
|
||||
result.push_back({ "enchantLevel", std::to_string(m_EnchantLevel) });
|
||||
result.push_back({ L"enchantLevel", std::to_wstring(m_EnchantLevel) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_PDefense != m_PrevState.pDefense)
|
||||
{
|
||||
result.push_back({ "pDefense", std::to_string(m_PDefense) });
|
||||
result.push_back({ L"pDefense", std::to_wstring(m_PDefense) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_MDefense != m_PrevState.mDefense)
|
||||
{
|
||||
result.push_back({ "mDefense", std::to_string(m_MDefense) });
|
||||
result.push_back({ L"mDefense", std::to_wstring(m_MDefense) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -91,9 +91,9 @@ namespace L2Bot::Domain::Entities
|
||||
const uint32_t objectId,
|
||||
const uint32_t itemId,
|
||||
const int32_t mana,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName,
|
||||
const std::wstring& description,
|
||||
const uint16_t weight,
|
||||
const bool isEquipped,
|
||||
const uint16_t enchantLevel,
|
||||
@@ -101,9 +101,9 @@ namespace L2Bot::Domain::Entities
|
||||
const Enums::CrystalTypeEnum crystalType,
|
||||
const uint32_t pDefense,
|
||||
const uint32_t mDefense,
|
||||
const std::string& setEffect,
|
||||
const std::string& addSetEffect,
|
||||
const std::string& enchantEffect
|
||||
const std::wstring& setEffect,
|
||||
const std::wstring& addSetEffect,
|
||||
const std::wstring& enchantEffect
|
||||
) :
|
||||
BaseItem
|
||||
(
|
||||
@@ -163,9 +163,9 @@ namespace L2Bot::Domain::Entities
|
||||
Enums::CrystalTypeEnum m_CrystalType = Enums::CrystalTypeEnum::none;
|
||||
uint32_t m_PDefense = 0;
|
||||
uint32_t m_MDefense = 0;
|
||||
std::string m_SetEffect = "";
|
||||
std::string m_AddSetEffect = "";
|
||||
std::string m_EnchantEffect = "";
|
||||
std::wstring m_SetEffect = L"";
|
||||
std::wstring m_AddSetEffect = L"";
|
||||
std::wstring m_EnchantEffect = L"";
|
||||
GetState m_PrevState = GetState();
|
||||
};
|
||||
}
|
||||
|
@@ -58,24 +58,24 @@ namespace L2Bot::Domain::Entities
|
||||
{
|
||||
std::vector<Serializers::Node> result;
|
||||
|
||||
result.push_back({ "objectId", std::to_string(m_ObjectId) });
|
||||
result.push_back({ "itemId", std::to_string(m_ItemId) });
|
||||
result.push_back({ L"objectId", std::to_wstring(m_ObjectId) });
|
||||
result.push_back({ L"itemId", std::to_wstring(m_ItemId) });
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "type", std::to_string(static_cast<int8_t>(m_Type))});
|
||||
result.push_back({ "name", m_Name });
|
||||
result.push_back({ "iconName", m_IconName });
|
||||
result.push_back({ "description", m_Description });
|
||||
result.push_back({ L"type", std::to_wstring(static_cast<int8_t>(m_Type))});
|
||||
result.push_back({ L"name", m_Name });
|
||||
result.push_back({ L"iconName", m_IconName });
|
||||
result.push_back({ L"description", m_Description });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_Mana != m_PrevState.mana)
|
||||
{
|
||||
result.push_back({ "mana", std::to_string(m_Mana) });
|
||||
result.push_back({ L"mana", std::to_wstring(m_Mana) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_Weight != m_PrevState.weight)
|
||||
{
|
||||
result.push_back({ "weight", std::to_string(m_Weight) });
|
||||
result.push_back({ L"weight", std::to_wstring(m_Weight) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -85,9 +85,9 @@ namespace L2Bot::Domain::Entities
|
||||
const uint32_t objectId,
|
||||
const uint32_t itemId,
|
||||
const int32_t mana,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName,
|
||||
const std::wstring& description,
|
||||
const uint16_t weight,
|
||||
const Enums::ItemTypeEnum type
|
||||
) :
|
||||
@@ -130,9 +130,9 @@ namespace L2Bot::Domain::Entities
|
||||
uint32_t m_ObjectId = 0;
|
||||
uint32_t m_ItemId = 0;
|
||||
int32_t m_Mana = -1;
|
||||
std::string m_Name = "";
|
||||
std::string m_IconName = "";
|
||||
std::string m_Description = "";
|
||||
std::wstring m_Name = L"";
|
||||
std::wstring m_IconName = L"";
|
||||
std::wstring m_Description = L"";
|
||||
uint16_t m_Weight = 0;
|
||||
Enums::ItemTypeEnum m_Type = Enums::ItemTypeEnum::none;
|
||||
GetState m_PrevState = GetState();
|
||||
|
@@ -38,10 +38,10 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_IsNewState)
|
||||
{
|
||||
result.push_back({ "itemId", std::to_string(m_ItemId) });
|
||||
result.push_back({ "amount", std::to_string(m_Amount) });
|
||||
result.push_back({ "name", m_Name });
|
||||
result.push_back({ "iconName", m_IconName });
|
||||
result.push_back({ L"itemId", std::to_wstring(m_ItemId) });
|
||||
result.push_back({ L"amount", std::to_wstring(m_Amount) });
|
||||
result.push_back({ L"name", m_Name });
|
||||
result.push_back({ L"iconName", m_IconName });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -52,8 +52,8 @@ namespace L2Bot::Domain::Entities
|
||||
const ValueObjects::Transform transform,
|
||||
const uint32_t itemId,
|
||||
const uint32_t amount,
|
||||
const std::string& name,
|
||||
const std::string& iconName
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName
|
||||
) :
|
||||
WorldObject(id, transform),
|
||||
m_ItemId(itemId),
|
||||
@@ -69,8 +69,8 @@ namespace L2Bot::Domain::Entities
|
||||
private:
|
||||
uint32_t m_ItemId = 0;
|
||||
uint32_t m_Amount = 0;
|
||||
std::string m_Name = "";
|
||||
std::string m_IconName = "";
|
||||
std::wstring m_Name = L"";
|
||||
std::wstring m_IconName = L"";
|
||||
bool m_IsNewState = true;
|
||||
};
|
||||
}
|
||||
|
@@ -49,16 +49,16 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "isQuest", std::to_string(m_IsQuest) });
|
||||
result.push_back({ L"isQuest", std::to_wstring(m_IsQuest) });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_Amount != m_PrevState.amount)
|
||||
{
|
||||
result.push_back({ "amount", std::to_string(m_Amount) });
|
||||
result.push_back({ L"amount", std::to_wstring(m_Amount) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_IsAutoused != m_PrevState.isAutoused)
|
||||
{
|
||||
result.push_back({ "isAutoused", std::to_string(m_IsAutoused) });
|
||||
result.push_back({ L"isAutoused", std::to_wstring(m_IsAutoused) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -68,9 +68,9 @@ namespace L2Bot::Domain::Entities
|
||||
const uint32_t objectId,
|
||||
const uint32_t itemId,
|
||||
const int32_t mana,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName,
|
||||
const std::wstring& description,
|
||||
const uint16_t weight,
|
||||
const uint32_t amount,
|
||||
const bool isQuest
|
||||
|
@@ -70,43 +70,43 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState || !m_FullName.IsEqual(&m_PrevState.fullName))
|
||||
{
|
||||
result.push_back({ "fullName", m_FullName.BuildSerializationNodes() });
|
||||
result.push_back({ L"fullName", m_FullName.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_VitalStats.IsEqual(&m_PrevState.vitalStats))
|
||||
{
|
||||
result.push_back({ "vitalStats", m_VitalStats.BuildSerializationNodes() });
|
||||
result.push_back({ L"vitalStats", m_VitalStats.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_Phenotype.IsEqual(&m_PrevState.phenotype))
|
||||
{
|
||||
result.push_back({ "phenotype", m_Phenotype.BuildSerializationNodes() });
|
||||
result.push_back({ L"phenotype", m_Phenotype.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_ExperienceInfo.IsEqual(&m_PrevState.experienceInfo))
|
||||
{
|
||||
result.push_back({ "experienceInfo", m_ExperienceInfo.BuildSerializationNodes() });
|
||||
result.push_back({ L"experienceInfo", m_ExperienceInfo.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_PermanentStats.IsEqual(&m_PrevState.permanentStats))
|
||||
{
|
||||
result.push_back({ "permanentStats", m_PermanentStats.BuildSerializationNodes() });
|
||||
result.push_back({ L"permanentStats", m_PermanentStats.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_VariableStats.IsEqual(&m_PrevState.variableStats))
|
||||
{
|
||||
result.push_back({ "variableStats", m_VariableStats.BuildSerializationNodes() });
|
||||
result.push_back({ L"variableStats", m_VariableStats.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_Reputation.IsEqual(&m_PrevState.reputation))
|
||||
{
|
||||
result.push_back({ "reputation", m_Reputation.BuildSerializationNodes() });
|
||||
result.push_back({ L"reputation", m_Reputation.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_InventoryInfo.IsEqual(&m_PrevState.inventoryInfo))
|
||||
{
|
||||
result.push_back({ "inventoryInfo", m_InventoryInfo.BuildSerializationNodes() });
|
||||
result.push_back({ L"inventoryInfo", m_InventoryInfo.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_TargetId != m_PrevState.targetId)
|
||||
{
|
||||
result.push_back({ "targetId", std::to_string(m_TargetId) });
|
||||
result.push_back({ L"targetId", std::to_wstring(m_TargetId) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_IsStanding != m_PrevState.isStanding)
|
||||
{
|
||||
result.push_back({ "isStanding", std::to_string(m_IsStanding) });
|
||||
result.push_back({ L"isStanding", std::to_wstring(m_IsStanding) });
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -49,20 +49,20 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState || !m_FullName.IsEqual(&m_PrevState.fullName))
|
||||
{
|
||||
result.push_back({ "fullName", m_FullName.BuildSerializationNodes() });
|
||||
result.push_back({ L"fullName", m_FullName.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "isHostile", std::to_string(m_IsHostile) });
|
||||
result.push_back({ "npcId", std::to_string(m_NpcId) });
|
||||
result.push_back({ L"isHostile", std::to_wstring(m_IsHostile) });
|
||||
result.push_back({ L"npcId", std::to_wstring(m_NpcId) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_SpoilState != m_PrevState.spoilState)
|
||||
{
|
||||
result.push_back({ "spoilState", std::to_string(static_cast<uint32_t>(m_SpoilState)) });
|
||||
result.push_back({ L"spoilState", std::to_wstring(static_cast<uint32_t>(m_SpoilState)) });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_VitalStats.IsEqual(&m_PrevState.vitalStats))
|
||||
{
|
||||
result.push_back({ "vitalStats", m_VitalStats.BuildSerializationNodes() });
|
||||
result.push_back({ L"vitalStats", m_VitalStats.BuildSerializationNodes() });
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -40,11 +40,11 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState || !m_FullName.IsEqual(&m_PrevState.fullName))
|
||||
{
|
||||
result.push_back({ "fullName", m_FullName.BuildSerializationNodes() });
|
||||
result.push_back({ L"fullName", m_FullName.BuildSerializationNodes() });
|
||||
}
|
||||
if (m_PrevState.isNewState || !m_Phenotype.IsEqual(&m_PrevState.phenotype))
|
||||
{
|
||||
result.push_back({ "phenotype", m_Phenotype.BuildSerializationNodes() });
|
||||
result.push_back({ L"phenotype", m_Phenotype.BuildSerializationNodes() });
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@@ -52,22 +52,22 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "crystalType", std::to_string(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ "evasion", std::to_string(m_Evasion) });
|
||||
result.push_back({ "defRate", std::to_string(m_DefRate) });
|
||||
result.push_back({ L"crystalType", std::to_wstring(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ L"evasion", std::to_wstring(m_Evasion) });
|
||||
result.push_back({ L"defRate", std::to_wstring(m_DefRate) });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_IsEquipped != m_PrevState.isEquipped)
|
||||
{
|
||||
result.push_back({ "isEquipped", std::to_string(m_IsEquipped) });
|
||||
result.push_back({ L"isEquipped", std::to_wstring(m_IsEquipped) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_EnchantLevel != m_PrevState.enchantLevel)
|
||||
{
|
||||
result.push_back({ "enchantLevel", std::to_string(m_EnchantLevel) });
|
||||
result.push_back({ L"enchantLevel", std::to_wstring(m_EnchantLevel) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_PDefense != m_PrevState.pDefense)
|
||||
{
|
||||
result.push_back({ "pDefense", std::to_string(m_PDefense) });
|
||||
result.push_back({ L"pDefense", std::to_wstring(m_PDefense) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -77,9 +77,9 @@ namespace L2Bot::Domain::Entities
|
||||
const uint32_t objectId,
|
||||
const uint32_t itemId,
|
||||
const int32_t mana,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName,
|
||||
const std::wstring& description,
|
||||
const uint16_t weight,
|
||||
const bool isEquipped,
|
||||
const uint16_t enchantLevel,
|
||||
|
@@ -90,43 +90,43 @@ namespace L2Bot::Domain::Entities
|
||||
{
|
||||
std::vector<Serializers::Node> result;
|
||||
|
||||
result.push_back({ "skillId", std::to_string(m_SkillId) });
|
||||
result.push_back({ "level", std::to_string(m_Level) });
|
||||
result.push_back({ L"skillId", std::to_wstring(m_SkillId) });
|
||||
result.push_back({ L"level", std::to_wstring(m_Level) });
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "isActive", std::to_string(m_IsActive) });
|
||||
result.push_back({ "name", m_Name });
|
||||
result.push_back({ "iconName", m_IconName });
|
||||
result.push_back({ L"isActive", std::to_wstring(m_IsActive) });
|
||||
result.push_back({ L"name", m_Name });
|
||||
result.push_back({ L"iconName", m_IconName });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_Description != m_PrevState.description)
|
||||
{
|
||||
result.push_back({ "description", m_Description });
|
||||
result.push_back({ L"description", m_Description });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_Cost != m_PrevState.cost)
|
||||
{
|
||||
result.push_back({ "cost", std::to_string(m_Cost) });
|
||||
result.push_back({ L"cost", std::to_wstring(m_Cost) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_Range != m_PrevState.range)
|
||||
{
|
||||
result.push_back({ "range", std::to_string(m_Range) });
|
||||
result.push_back({ L"range", std::to_wstring(m_Range) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_IsToggled != m_PrevState.isToggled)
|
||||
{
|
||||
result.push_back({ "isToggled", std::to_string(m_IsToggled) });
|
||||
result.push_back({ L"isToggled", std::to_wstring(m_IsToggled) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_IsCasting != m_PrevState.isCasting)
|
||||
{
|
||||
result.push_back({ "isCasting", std::to_string(m_IsCasting) });
|
||||
result.push_back({ L"isCasting", std::to_wstring(m_IsCasting) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_IsReloading != m_PrevState.isReloading)
|
||||
{
|
||||
result.push_back({ "isReloading", std::to_string(m_IsReloading) });
|
||||
result.push_back({ L"isReloading", std::to_wstring(m_IsReloading) });
|
||||
}
|
||||
if (m_PrevState.isNewState || IsReadyToUse() != m_PrevState.isReadyToUse)
|
||||
{
|
||||
result.push_back({ "isReadyToUse", std::to_string(IsReadyToUse()) });
|
||||
result.push_back({ L"isReadyToUse", std::to_wstring(IsReadyToUse()) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -138,9 +138,9 @@ namespace L2Bot::Domain::Entities
|
||||
const bool isActive,
|
||||
const uint8_t cost,
|
||||
const int16_t range,
|
||||
const std::string& name,
|
||||
const std::string& description,
|
||||
const std::string& iconName,
|
||||
const std::wstring& name,
|
||||
const std::wstring& description,
|
||||
const std::wstring& iconName,
|
||||
const bool isToggled,
|
||||
const bool isCasting,
|
||||
const bool isReloading
|
||||
@@ -183,7 +183,7 @@ namespace L2Bot::Domain::Entities
|
||||
{
|
||||
uint8_t cost = 0;
|
||||
int16_t range = 0;
|
||||
std::string description = "";
|
||||
std::wstring description = L"";
|
||||
bool isToggled = false;
|
||||
bool isCasting = false;
|
||||
bool isReloading = false;
|
||||
@@ -198,9 +198,9 @@ namespace L2Bot::Domain::Entities
|
||||
bool m_IsActive = false;
|
||||
uint8_t m_Cost = 0;
|
||||
int16_t m_Range = 0;
|
||||
std::string m_Name = "";
|
||||
std::string m_Description = "";
|
||||
std::string m_IconName = "";
|
||||
std::wstring m_Name = L"";
|
||||
std::wstring m_Description = L"";
|
||||
std::wstring m_IconName = L"";
|
||||
bool m_IsToggled = false;
|
||||
bool m_IsCasting = false;
|
||||
bool m_IsReloading = false;
|
||||
|
@@ -68,32 +68,32 @@ namespace L2Bot::Domain::Entities
|
||||
|
||||
if (m_PrevState.isNewState)
|
||||
{
|
||||
result.push_back({ "weaponType", std::to_string(static_cast<uint8_t>(m_WeaponType)) });
|
||||
result.push_back({ "crystalType", std::to_string(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ "rndDamage", std::to_string(m_RndDamage) });
|
||||
result.push_back({ "critical", std::to_string(m_Critical) });
|
||||
result.push_back({ "hitModify", std::to_string(m_HitModify) });
|
||||
result.push_back({ "attackSpeed", std::to_string(m_AttackSpeed) });
|
||||
result.push_back({ "mpConsume", std::to_string(m_MpConsume) });
|
||||
result.push_back({ "soulshotCount", std::to_string(m_SoulshotCount) });
|
||||
result.push_back({ "spiritshotCount", std::to_string(m_SpiritshotCount) });
|
||||
result.push_back({ L"weaponType", std::to_wstring(static_cast<uint8_t>(m_WeaponType)) });
|
||||
result.push_back({ L"crystalType", std::to_wstring(static_cast<int8_t>(m_CrystalType)) });
|
||||
result.push_back({ L"rndDamage", std::to_wstring(m_RndDamage) });
|
||||
result.push_back({ L"critical", std::to_wstring(m_Critical) });
|
||||
result.push_back({ L"hitModify", std::to_wstring(m_HitModify) });
|
||||
result.push_back({ L"attackSpeed", std::to_wstring(m_AttackSpeed) });
|
||||
result.push_back({ L"mpConsume", std::to_wstring(m_MpConsume) });
|
||||
result.push_back({ L"soulshotCount", std::to_wstring(m_SoulshotCount) });
|
||||
result.push_back({ L"spiritshotCount", std::to_wstring(m_SpiritshotCount) });
|
||||
}
|
||||
|
||||
if (m_PrevState.isNewState || m_IsEquipped != m_PrevState.isEquipped)
|
||||
{
|
||||
result.push_back({ "isEquipped", std::to_string(m_IsEquipped) });
|
||||
result.push_back({ L"isEquipped", std::to_wstring(m_IsEquipped) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_EnchantLevel != m_PrevState.enchantLevel)
|
||||
{
|
||||
result.push_back({ "enchantLevel", std::to_string(m_EnchantLevel) });
|
||||
result.push_back({ L"enchantLevel", std::to_wstring(m_EnchantLevel) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_PAttack != m_PrevState.pAttack)
|
||||
{
|
||||
result.push_back({ "pAttack", std::to_string(m_PAttack) });
|
||||
result.push_back({ L"pAttack", std::to_wstring(m_PAttack) });
|
||||
}
|
||||
if (m_PrevState.isNewState || m_MAttack != m_PrevState.mAttack)
|
||||
{
|
||||
result.push_back({ "mAttack", std::to_string(m_MAttack) });
|
||||
result.push_back({ L"mAttack", std::to_wstring(m_MAttack) });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -103,9 +103,9 @@ namespace L2Bot::Domain::Entities
|
||||
const uint32_t objectId,
|
||||
const uint32_t itemId,
|
||||
const int32_t mana,
|
||||
const std::string& name,
|
||||
const std::string& iconName,
|
||||
const std::string& description,
|
||||
const std::wstring& name,
|
||||
const std::wstring& iconName,
|
||||
const std::wstring& description,
|
||||
const uint16_t weight,
|
||||
const bool isEquipped,
|
||||
const uint16_t enchantLevel,
|
||||
|
@@ -34,10 +34,10 @@ namespace L2Bot::Domain::Entities
|
||||
{
|
||||
std::vector<Serializers::Node> result;
|
||||
|
||||
result.push_back({ "id", std::to_string(GetId()) });
|
||||
result.push_back({ L"id", std::to_wstring(GetId()) });
|
||||
if (m_PrevState.isNewState || !m_Transform.IsEqual(&m_PrevState.transform))
|
||||
{
|
||||
result.push_back({ "transform", m_Transform.BuildSerializationNodes() });
|
||||
result.push_back({ L"transform", m_Transform.BuildSerializationNodes() });
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user