mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 13:26:43 +00:00 
			
		
		
		
	Merge pull request #2724 from akortunov/factions
Cleanup ownership for items in containers
This commit is contained in:
		
						commit
						79517f3f42
					
				
					 2 changed files with 11 additions and 5 deletions
				
			
		|  | @ -290,7 +290,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr | |||
|     item.getCellRef().setOwner(""); | ||||
|     item.getCellRef().resetGlobalVariable(); | ||||
|     item.getCellRef().setFaction(""); | ||||
|     item.getCellRef().setFactionRank(-1); | ||||
|     item.getCellRef().setFactionRank(-2); | ||||
| 
 | ||||
|     // must reset the RefNum on the copied item, so that the RefNum on the original item stays unique
 | ||||
|     // maybe we should do this in the copy constructor instead?
 | ||||
|  |  | |||
|  | @ -153,13 +153,19 @@ void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum, bool inInventory, bool | |||
|         esm.writeHNT("XSCL", scale); | ||||
|     } | ||||
| 
 | ||||
|     esm.writeHNOCString("ANAM", mOwner); | ||||
|     if (!inInventory) | ||||
|         esm.writeHNOCString("ANAM", mOwner); | ||||
| 
 | ||||
|     esm.writeHNOCString("BNAM", mGlobalVariable); | ||||
|     esm.writeHNOCString("XSOL", mSoul); | ||||
| 
 | ||||
|     esm.writeHNOCString("CNAM", mFaction); | ||||
|     if (mFactionRank != -2) { | ||||
|         esm.writeHNT("INDX", mFactionRank); | ||||
|     if (!inInventory) | ||||
|     { | ||||
|         esm.writeHNOCString("CNAM", mFaction); | ||||
|         if (mFactionRank != -2) | ||||
|         { | ||||
|             esm.writeHNT("INDX", mFactionRank); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     if (mEnchantmentCharge != -1) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue