mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
[Regression] Make creatures autoequip shields properly again
This commit is contained in:
parent
3278ca0b33
commit
9b28420875
1 changed files with 1 additions and 5 deletions
|
@ -504,14 +504,10 @@ void MWWorld::InventoryStore::autoEquipShield(const MWWorld::Ptr& actor, TSlots&
|
||||||
continue;
|
continue;
|
||||||
if (iter->getClass().canBeEquipped(*iter, actor).first != 1)
|
if (iter->getClass().canBeEquipped(*iter, actor).first != 1)
|
||||||
continue;
|
continue;
|
||||||
if (iter->getClass().getItemHealth(*iter) <= 0)
|
|
||||||
continue;
|
|
||||||
std::pair<std::vector<int>, bool> shieldSlots =
|
std::pair<std::vector<int>, bool> shieldSlots =
|
||||||
iter->getClass().getEquipmentSlots(*iter);
|
iter->getClass().getEquipmentSlots(*iter);
|
||||||
if (shieldSlots.first.empty())
|
|
||||||
continue;
|
|
||||||
int slot = shieldSlots.first[0];
|
int slot = shieldSlots.first[0];
|
||||||
const ContainerStoreIterator& shield = mSlots[slot];
|
const ContainerStoreIterator& shield = slots_[slot];
|
||||||
if (shield != end()
|
if (shield != end()
|
||||||
&& shield.getType() == Type_Armor && shield->get<ESM::Armor>()->mBase->mData.mType == ESM::Armor::Shield)
|
&& shield.getType() == Type_Armor && shield->get<ESM::Armor>()->mBase->mData.mType == ESM::Armor::Shield)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue