mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +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;
|
||||
if (iter->getClass().canBeEquipped(*iter, actor).first != 1)
|
||||
continue;
|
||||
if (iter->getClass().getItemHealth(*iter) <= 0)
|
||||
continue;
|
||||
std::pair<std::vector<int>, bool> shieldSlots =
|
||||
iter->getClass().getEquipmentSlots(*iter);
|
||||
if (shieldSlots.first.empty())
|
||||
continue;
|
||||
int slot = shieldSlots.first[0];
|
||||
const ContainerStoreIterator& shield = mSlots[slot];
|
||||
const ContainerStoreIterator& shield = slots_[slot];
|
||||
if (shield != end()
|
||||
&& shield.getType() == Type_Armor && shield->get<ESM::Armor>()->mBase->mData.mType == ESM::Armor::Shield)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue