Minor Correction to existing conjured item logic

deque
Ragora 10 years ago
parent 69dbd6b30f
commit 74e1db3ac8

@ -41,6 +41,13 @@ CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* ma
void CompanionWindow::onItemSelected(int index)
{
if (mDragAndDrop->mIsOnDragAndDrop)
{
mDragAndDrop->drop(mModel, mItemView);
updateEncumbranceBar();
return;
}
const ItemStack& item = mSortModel->getItem(index);
// We can't take conjured items from a companion NPC
@ -50,13 +57,6 @@ void CompanionWindow::onItemSelected(int index)
return;
}
if (mDragAndDrop->mIsOnDragAndDrop)
{
mDragAndDrop->drop(mModel, mItemView);
updateEncumbranceBar();
return;
}
MWWorld::Ptr object = item.mBase;
int count = item.mCount;
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();

@ -174,6 +174,13 @@ namespace MWGui
void ContainerWindow::onItemSelected(int index)
{
if (mDragAndDrop->mIsOnDragAndDrop)
{
if (!dynamic_cast<PickpocketItemModel*>(mModel))
dropItem();
return;
}
const ItemStack& item = mSortModel->getItem(index);
// We can't take a conjured item from a container (some NPC we're pickpocketing, a box, etc)
@ -183,13 +190,6 @@ namespace MWGui
return;
}
if (mDragAndDrop->mIsOnDragAndDrop)
{
if (!dynamic_cast<PickpocketItemModel*>(mModel))
dropItem();
return;
}
MWWorld::Ptr object = item.mBase;
int count = item.mCount;
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();

Loading…
Cancel
Save