Hey I'm new! But that makes no sense? You mean to say that hostile NPCs will all have torches equipped if they have no gear? Why not check to see if they are in combat, than of it's dark, then if they have a touch. If all is true than equip torch. That way you don't have to worry about friend or foe. And idk how you do the sweep, probable by cell, but then do this check for all NPCs at scheduled times maybe. 

> On Dec 29, 2013, at 8:26 PM, scrawl <notifications@github.com> wrote:
> 
> In apps/openmw/mwmechanics/actors.cpp:
> 
> >          MWWorld::InventoryStore &inventoryStore = MWWorld::Class::get(ptr).getInventoryStore(ptr);
> >          MWWorld::ContainerStoreIterator heldIter =
> >                  inventoryStore.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
> > +        /**
> > +         * Automatically equip NPCs torches at night and unequip them at day
> > +         */
> > +        if (!isPlayer && !MWWorld::Class::get (ptr).getCreatureStats (ptr).isHostile())
> Hostile NPCs should wear torches, if they don't have anything else in that slot.
> 
> —
> Reply to this email directly or view it on GitHub.