forked from mirror/openmw-tes3mp
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.
This commit is contained in:
parent
379d13c7b9
commit
944dfa5372
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue