|
|
|
@ -29,6 +29,7 @@
|
|
|
|
|
|
|
|
|
|
#include "../mwmechanics/actorutil.hpp"
|
|
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
|
|
|
|
#include "../mwmechanics/npcstats.hpp"
|
|
|
|
|
|
|
|
|
|
#include "itemview.hpp"
|
|
|
|
|
#include "inventoryitemmodel.hpp"
|
|
|
|
@ -732,6 +733,12 @@ namespace MWGui
|
|
|
|
|
if (!object.getRefData().activate())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// Player must not be paralyzed, knocked down, or dead to pick up an item.
|
|
|
|
|
const MWMechanics::NpcStats& playerStats = player.getClass().getNpcStats(player);
|
|
|
|
|
bool godmode = MWBase::Environment::get().getWorld()->getGodModeState();
|
|
|
|
|
if ((!godmode && playerStats.isParalyzed()) || playerStats.getKnockedDown() || playerStats.isDead())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, object, MWWorld::Ptr(), count);
|
|
|
|
|
|
|
|
|
|
// add to player inventory
|
|
|
|
|