mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 21:45:33 +00:00
Replace ancestor with parent
This commit is contained in:
parent
aa721fe1f6
commit
b0e6a52595
1 changed files with 4 additions and 4 deletions
|
@ -477,14 +477,14 @@ void MWWorld::ContainerStore::restock (const ESM::InventoryList& items, const MW
|
||||||
//If something was not sold
|
//If something was not sold
|
||||||
if(itemCount >= spawnedCount)
|
if(itemCount >= spawnedCount)
|
||||||
{
|
{
|
||||||
const std::string& ancestor = it->second.second;
|
const std::string& parent = it->second.second;
|
||||||
// Security check for old saves:
|
// Security check for old saves:
|
||||||
//If item is imported from old save(doesn't have an ancestor) and wasn't sold
|
//If item is imported from old save(doesn't have an parent) and wasn't sold
|
||||||
if(ancestor == "")
|
if(parent == "")
|
||||||
{
|
{
|
||||||
//Remove it, from shop,
|
//Remove it, from shop,
|
||||||
remove(it->first, itemCount, ptr);//ptr is the NPC
|
remove(it->first, itemCount, ptr);//ptr is the NPC
|
||||||
//And remove it from map, so that when we restock, the new item will have proper ancestor.
|
//And remove it from map, so that when we restock, the new item will have proper parent.
|
||||||
mLevelledItemMap.erase(it);
|
mLevelledItemMap.erase(it);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue