feat: add enchant value to pdef/mdef, patk/matk
This commit is contained in:
@@ -134,8 +134,8 @@ namespace Interlude
|
||||
itemInfo.enchantLevel,
|
||||
casted ? static_cast<Enums::ArmorType>(casted->armorType) : Enums::ArmorType::none,
|
||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
||||
casted ? casted->pDef : 0,
|
||||
casted ? casted->mDef : 0,
|
||||
GetEnchantValue(casted ? casted->pDef : 0, itemInfo.enchantLevel, 1, 3),
|
||||
GetEnchantValue(casted ? casted->mDef : 0, itemInfo.enchantLevel, 1, 3),
|
||||
setEffect,
|
||||
addSetEffect,
|
||||
enchantEffect
|
||||
@@ -167,8 +167,8 @@ namespace Interlude
|
||||
casted ? static_cast<Enums::WeaponType>(casted->weaponType) : Enums::WeaponType::none,
|
||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
||||
casted ? casted->rndDamage : 0,
|
||||
casted ? casted->pAtk : 0,
|
||||
casted ? casted->mAtk : 0,
|
||||
GetEnchantValue(casted ? casted->pAtk : 0, itemInfo.enchantLevel, 3, 6),
|
||||
GetEnchantValue(casted ? casted->mAtk : 0, itemInfo.enchantLevel, 3, 6),
|
||||
casted ? casted->critical : 0,
|
||||
casted ? casted->hitModify : 0,
|
||||
casted ? casted->atkSpd : 0,
|
||||
@@ -190,7 +190,7 @@ namespace Interlude
|
||||
itemInfo.enchantLevel,
|
||||
casted ? static_cast<Enums::CrystalType>(casted->crystalType) : Enums::CrystalType::none,
|
||||
casted ? casted->shieldEvasion : 0,
|
||||
casted ? casted->shieldPdef : 0,
|
||||
GetEnchantValue(casted ? casted->shieldPdef : 0, itemInfo.enchantLevel, 1, 3),
|
||||
casted ? casted->shieldDefRate : 0
|
||||
);
|
||||
}
|
||||
|
@@ -72,6 +72,7 @@ namespace Interlude
|
||||
}
|
||||
}
|
||||
|
||||
//todo need to delete items if they are not exists in create "queue"
|
||||
void OnItemCreated(const Event& evt)
|
||||
{
|
||||
std::shared_lock<std::shared_timed_mutex>(m_Mutex);
|
||||
@@ -112,7 +113,6 @@ namespace Interlude
|
||||
}
|
||||
}
|
||||
|
||||
//todo deleted ehchant scroll
|
||||
void OnItemDeleted(const Event& evt)
|
||||
{
|
||||
//fixme may be a race condition
|
||||
|
@@ -66,7 +66,6 @@ namespace Interlude
|
||||
EventDispatcher::GetInstance().Subscribe(HeroDeletedEvent::name, [this](const Event& evt) {
|
||||
OnHeroDeleted(evt);
|
||||
});
|
||||
// TODO delete outdated skills: on hero change subclass?
|
||||
}
|
||||
|
||||
SkillRepository() = delete;
|
||||
@@ -91,6 +90,8 @@ namespace Interlude
|
||||
m_ReloadingTimers.StopAll();
|
||||
}
|
||||
}
|
||||
|
||||
//todo need to delete skills if they are not exists in create "queue"
|
||||
void OnSkillCreated(const Event& evt)
|
||||
{
|
||||
std::shared_lock<std::shared_timed_mutex>(m_Mutex);
|
||||
|
Reference in New Issue
Block a user