|
|
|
@ -13,6 +13,7 @@
|
|
|
|
|
#include "../mwworld/containerstore.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwmechanics/pickpocket.hpp"
|
|
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
|
|
|
|
|
|
|
|
|
#include "countdialog.hpp"
|
|
|
|
|
#include "tradewindow.hpp"
|
|
|
|
@ -84,8 +85,7 @@ namespace MWGui
|
|
|
|
|
// otherwise, do the transfer
|
|
|
|
|
if (targetModel != mSourceModel)
|
|
|
|
|
{
|
|
|
|
|
targetModel->copyItem(mItem, mDraggedCount);
|
|
|
|
|
mSourceModel->removeItem(mItem, mDraggedCount);
|
|
|
|
|
mSourceModel->moveItem(mItem, mDraggedCount, targetModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mSourceModel->update();
|
|
|
|
@ -292,8 +292,7 @@ namespace MWGui
|
|
|
|
|
if (!onTakeItem(item, item.mCount))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
playerModel->copyItem(item, item.mCount);
|
|
|
|
|
mModel->removeItem(item, item.mCount);
|
|
|
|
|
mModel->moveItem(item, item.mCount, playerModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
|
|
|
|
@ -341,7 +340,11 @@ namespace MWGui
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, item.mBase, count);
|
|
|
|
|
// Looting a dead corpse is considered OK
|
|
|
|
|
if (mPtr.getClass().isActor() && mPtr.getClass().getCreatureStats(mPtr).isDead())
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, item.mBase, count);
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|