mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:23:54 +00:00
Merge branch 'lol_so_random' into 'master'
Set the ptr's custom data before filling the store so leveled lists have access to the level See merge request OpenMW/openmw!1028
This commit is contained in:
commit
e5f96ab4ae
1 changed files with 4 additions and 4 deletions
|
@ -383,15 +383,15 @@ namespace MWClass
|
|||
if (!spellsInitialised)
|
||||
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);
|
||||
|
||||
// store
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue