diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-04 15:42:21 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-04 15:42:21 -0400 |
commit | 9a3b4260f7b8c59c41335b6d945df99ad4637bc3 (patch) | |
tree | b540d170146a9fcd0e5aff92728d898db5aca9cb /src/StardewModdingAPI/Events | |
parent | bec7025aa49193f0191c3ce850339032d244b7b1 (diff) | |
download | SMAPI-9a3b4260f7b8c59c41335b6d945df99ad4637bc3.tar.gz SMAPI-9a3b4260f7b8c59c41335b6d945df99ad4637bc3.tar.bz2 SMAPI-9a3b4260f7b8c59c41335b6d945df99ad4637bc3.zip |
refactor to avoid an out parameter
Diffstat (limited to 'src/StardewModdingAPI/Events')
-rw-r--r-- | src/StardewModdingAPI/Events/PlayerEvents.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Events/PlayerEvents.cs b/src/StardewModdingAPI/Events/PlayerEvents.cs index 71b43e71..87e6a509 100644 --- a/src/StardewModdingAPI/Events/PlayerEvents.cs +++ b/src/StardewModdingAPI/Events/PlayerEvents.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using StardewModdingAPI.Inheritance; using StardewValley; @@ -45,9 +46,9 @@ namespace StardewModdingAPI.Events /// <summary>Raise an <see cref="InventoryChanged"/> event.</summary> /// <param name="inventory">The player's inventory.</param> /// <param name="changedItems">The inventory changes.</param> - internal static void InvokeInventoryChanged(List<Item> inventory, List<ItemStackChange> changedItems) + internal static void InvokeInventoryChanged(List<Item> inventory, IEnumerable<ItemStackChange> changedItems) { - PlayerEvents.InventoryChanged.Invoke(null, new EventArgsInventoryChanged(inventory, changedItems)); + PlayerEvents.InventoryChanged.Invoke(null, new EventArgsInventoryChanged(inventory, changedItems.ToList())); } /// <summary>Rase a <see cref="LeveledUp"/> event.</summary> |