a light without the carry flag can't be equipped !

it fixes Antares big mod teaching disciplines, it adds a light which should
not be equipped to npcs which have learnt something.
pull/786/head
Emmanuel Anne 9 years ago
parent 379d13c7b9
commit 944dfa5372

@ -234,6 +234,11 @@ namespace MWClass
std::pair<int, std::string> Light::canBeEquipped(const MWWorld::Ptr &ptr, const MWWorld::Ptr &npc) const
{
MWWorld::LiveCellRef<ESM::Light> *ref =
ptr.get<ESM::Light>();
if (!(ref->mBase->mData.mFlags & ESM::Light::Carry))
return std::make_pair(0,"");
MWWorld::InventoryStore& invStore = npc.getClass().getInventoryStore(npc);
MWWorld::ContainerStoreIterator weapon = invStore.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);

Loading…
Cancel
Save