mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:59:56 +00:00
Include creatures
This commit is contained in:
parent
cdfd305ac3
commit
11e8e1eeb5
2 changed files with 3 additions and 5 deletions
|
@ -264,9 +264,7 @@ namespace
|
|||
}
|
||||
else if (state.mVersion <= ESM::MaxOldCreatureStatsFormatVersion)
|
||||
{
|
||||
if constexpr (std::is_same_v<T, ESM::Creature>)
|
||||
MWWorld::convertStats(state.mCreatureStats);
|
||||
else if constexpr (std::is_same_v<T, ESM::NPC>)
|
||||
if constexpr (std::is_same_v<T, ESM::Creature> || std::is_same_v<T, ESM::NPC>)
|
||||
{
|
||||
MWWorld::convertStats(state.mCreatureStats);
|
||||
MWWorld::convertEnchantmentSlots(state.mCreatureStats, state.mInventory);
|
||||
|
@ -274,7 +272,7 @@ namespace
|
|||
}
|
||||
else if (state.mVersion <= ESM::MaxActiveSpellSlotIndexFormatVersion)
|
||||
{
|
||||
if constexpr (std::is_same_v<T, ESM::NPC>)
|
||||
if constexpr (std::is_same_v<T, ESM::Creature> || std::is_same_v<T, ESM::NPC>)
|
||||
MWWorld::convertEnchantmentSlots(state.mCreatureStats, state.mInventory);
|
||||
}
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ namespace MWWorld
|
|||
continue;
|
||||
if (activeSpell.mFlags & ESM::ActiveSpells::Flag_Equipment)
|
||||
{
|
||||
auto slotIndex = activeSpell.mItem.mIndex;
|
||||
std::int64_t slotIndex = activeSpell.mItem.mIndex;
|
||||
auto slot = std::find_if(inventory.mEquipmentSlots.begin(), inventory.mEquipmentSlots.end(),
|
||||
[=](const auto& entry) { return entry.second == slotIndex; });
|
||||
if (slot != inventory.mEquipmentSlots.end() && slot->first < inventory.mItems.size())
|
||||
|
|
Loading…
Reference in a new issue