/// <summary> /// Regenerates items in this container based on loot table key. /// Existing items will be destroyed. /// </summary> public void GenerateItems() { LootChanceMatrix matrix = LootTables.GetMatrix(LootTableKey); DaggerfallUnityItem[] newitems = LootTables.GenerateRandomLoot(LootTableKey, matrix, GameManager.Instance.PlayerEntity); items.Import(newitems); }
/// <summary> /// Generates items in the given item collection based on loot table key. /// Any existing items will be destroyed. /// </summary> public static void GenerateItems(string LootTableKey, ItemCollection collection) { LootChanceMatrix matrix = LootTables.GetMatrix(LootTableKey); DaggerfallUnityItem[] newitems = LootTables.GenerateRandomLoot(LootTableKey, matrix, GameManager.Instance.PlayerEntity); collection.Import(newitems); }
/// <summary> /// Generates items in the given item collection based on loot table key. /// Any existing items will be destroyed. /// </summary> public static void GenerateItems(string LootTableKey, ItemCollection collection) { LootChanceMatrix matrix = LootTables.GetMatrix(LootTableKey); DaggerfallUnityItem[] newitems = LootTables.GenerateRandomLoot(matrix, GameManager.Instance.PlayerEntity); DaggerfallUnityItem[] modifieditems = FormulaHelper.ModifyFoundLootItems(ref newitems); collection.Import(modifieditems); }