mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:39:40 +00:00
Minor Correction to existing conjured item logic
This commit is contained in:
parent
69dbd6b30f
commit
74e1db3ac8
2 changed files with 14 additions and 14 deletions
|
@ -41,6 +41,13 @@ CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* ma
|
||||||
|
|
||||||
void CompanionWindow::onItemSelected(int index)
|
void CompanionWindow::onItemSelected(int index)
|
||||||
{
|
{
|
||||||
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
||||||
|
{
|
||||||
|
mDragAndDrop->drop(mModel, mItemView);
|
||||||
|
updateEncumbranceBar();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ItemStack& item = mSortModel->getItem(index);
|
const ItemStack& item = mSortModel->getItem(index);
|
||||||
|
|
||||||
// We can't take conjured items from a companion NPC
|
// We can't take conjured items from a companion NPC
|
||||||
|
@ -50,13 +57,6 @@ void CompanionWindow::onItemSelected(int index)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDragAndDrop->mIsOnDragAndDrop)
|
|
||||||
{
|
|
||||||
mDragAndDrop->drop(mModel, mItemView);
|
|
||||||
updateEncumbranceBar();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MWWorld::Ptr object = item.mBase;
|
MWWorld::Ptr object = item.mBase;
|
||||||
int count = item.mCount;
|
int count = item.mCount;
|
||||||
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();
|
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();
|
||||||
|
|
|
@ -174,6 +174,13 @@ namespace MWGui
|
||||||
|
|
||||||
void ContainerWindow::onItemSelected(int index)
|
void ContainerWindow::onItemSelected(int index)
|
||||||
{
|
{
|
||||||
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
||||||
|
{
|
||||||
|
if (!dynamic_cast<PickpocketItemModel*>(mModel))
|
||||||
|
dropItem();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ItemStack& item = mSortModel->getItem(index);
|
const ItemStack& item = mSortModel->getItem(index);
|
||||||
|
|
||||||
// We can't take a conjured item from a container (some NPC we're pickpocketing, a box, etc)
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDragAndDrop->mIsOnDragAndDrop)
|
|
||||||
{
|
|
||||||
if (!dynamic_cast<PickpocketItemModel*>(mModel))
|
|
||||||
dropItem();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MWWorld::Ptr object = item.mBase;
|
MWWorld::Ptr object = item.mBase;
|
||||||
int count = item.mCount;
|
int count = item.mCount;
|
||||||
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();
|
bool shift = MyGUI::InputManager::getInstance().isShiftPressed();
|
||||||
|
|
Loading…
Reference in a new issue