mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Set the ptr's custom data before filling the store so leveled lists have access to the level
This commit is contained in:
parent
d30f0f11b4
commit
b95cf4fd00
@ -383,15 +383,15 @@ namespace MWClass
|
|||||||
if (!spellsInitialised)
|
if (!spellsInitialised)
|
||||||
data->mNpcStats.getSpells().addAllToInstance(ref->mBase->mSpells.mList);
|
data->mNpcStats.getSpells().addAllToInstance(ref->mBase->mSpells.mList);
|
||||||
|
|
||||||
// inventory
|
|
||||||
// setting ownership is used to make the NPC auto-equip his initial equipment only, and not bartered items
|
|
||||||
data->mInventoryStore.fill(ref->mBase->mInventory, ptr.getCellRef().getRefId());
|
|
||||||
|
|
||||||
data->mNpcStats.setGoldPool(gold);
|
data->mNpcStats.setGoldPool(gold);
|
||||||
|
|
||||||
// store
|
// store
|
||||||
ptr.getRefData().setCustomData(std::move(data));
|
ptr.getRefData().setCustomData(std::move(data));
|
||||||
|
|
||||||
|
// inventory
|
||||||
|
// setting ownership is used to make the NPC auto-equip his initial equipment only, and not bartered items
|
||||||
|
getInventoryStore(ptr).fill(ref->mBase->mInventory, ptr.getCellRef().getRefId());
|
||||||
|
|
||||||
getInventoryStore(ptr).autoEquip(ptr);
|
getInventoryStore(ptr).autoEquip(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user