mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 00:26:39 +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)
 | 
			
		||||
{
 | 
			
		||||
    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…
	
		Reference in a new issue