I want to set a stat of a creature but I do not want it to add the actual gold to that creatures inventory.
I'd like to do this : data->mNpcStats.setGoldPool(gold);
but if I run the game the gold will be found in the creatures inventory.
If I comment that line in question out the gold is not in the inventory but the creature stat is not set.
Any idea?
Code: Select all
// Relates to NPC gold reset delay
data->mNpcStats.setTradeTime(MWWorld::TimeStamp(0.0, 0));
data->mNpcStats.setGoldPool(gold);
// store
ptr.getRefData().setCustomData (data.release());
// TODO: this is not quite correct, in vanilla the merchant's gold pool is not available in his inventory.
// (except for gold you gave him)
//getContainerStore(ptr).add(MWWorld::ContainerStore::sGoldId, gold, ptr);
getInventoryStore(ptr).autoEquip(ptr);