mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:56:39 +00:00 
			
		
		
		
	Merge branch 'weareboundtogetheryouandi' into 'master'
Remove the correct bound item when the effect expires See merge request OpenMW/openmw!2507
This commit is contained in:
		
						commit
						4520a8c659
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -217,10 +217,13 @@ namespace | |||
|         bool wasEquipped | ||||
|             = currentItem != store.end() && Misc::StringUtils::ciEqual(currentItem->getCellRef().getRefId(), itemId); | ||||
| 
 | ||||
|         if (actor != MWMechanics::getPlayer()) | ||||
|         { | ||||
|         if (wasEquipped) | ||||
|             store.remove(*currentItem, 1, actor); | ||||
|         else | ||||
|             store.remove(itemId, 1, actor); | ||||
| 
 | ||||
|         if (actor != MWMechanics::getPlayer()) | ||||
|         { | ||||
|             // Equip a replacement
 | ||||
|             if (!wasEquipped) | ||||
|                 return; | ||||
|  | @ -258,8 +261,6 @@ namespace | |||
|                 action.execute(actor); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         store.remove(itemId, 1, actor); | ||||
|     } | ||||
| 
 | ||||
|     bool isCorprusEffect(const MWMechanics::ActiveSpells::ActiveEffect& effect, bool harmfulOnly = false) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue