|
|
|
@ -233,24 +233,6 @@ namespace MWClass
|
|
|
|
|
if (!(ref->mBase->mData.mFlags & ESM::Light::Carry))
|
|
|
|
|
return std::make_pair(0,"");
|
|
|
|
|
|
|
|
|
|
const MWWorld::InventoryStore& invStore = npc.getClass().getInventoryStore(npc);
|
|
|
|
|
MWWorld::ConstContainerStoreIterator weapon = invStore.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
|
|
|
|
|
|
|
|
|
if(weapon == invStore.end())
|
|
|
|
|
return std::make_pair(1,"");
|
|
|
|
|
|
|
|
|
|
/// \todo the 2h check is repeated many times; put it in a function
|
|
|
|
|
if(weapon->getTypeName() == typeid(ESM::Weapon).name() &&
|
|
|
|
|
(weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::LongBladeTwoHand ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::BluntTwoClose ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::BluntTwoWide ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::SpearTwoWide ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::AxeTwoHand ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanBow ||
|
|
|
|
|
weapon->get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanCrossbow))
|
|
|
|
|
{
|
|
|
|
|
return std::make_pair(3,"");
|
|
|
|
|
}
|
|
|
|
|
return std::make_pair(1,"");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|