summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/LevelChangedEventArgs.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Events/LevelChangedEventArgs.cs')
-rw-r--r--src/SMAPI/Events/LevelChangedEventArgs.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/SMAPI/Events/LevelChangedEventArgs.cs b/src/SMAPI/Events/LevelChangedEventArgs.cs
new file mode 100644
index 00000000..174094c7
--- /dev/null
+++ b/src/SMAPI/Events/LevelChangedEventArgs.cs
@@ -0,0 +1,42 @@
+using System;
+using StardewModdingAPI.Enums;
+using StardewValley;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for a <see cref="IPlayerEvents.LevelChanged"/> event.</summary>
+ public class LevelChangedEventArgs : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The player whose skill level changed.</summary>
+ public Farmer Player { get; }
+
+ /// <summary>The skill whose level changed.</summary>
+ public SkillType Skill { get; }
+
+ /// <summary>The previous skill level.</summary>
+ public int OldLevel { get; }
+
+ /// <summary>The new skill level.</summary>
+ public int NewLevel { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="player">The player whose skill level changed.</param>
+ /// <param name="skill">The skill whose level changed.</param>
+ /// <param name="oldLevel">The previous skill level.</param>
+ /// <param name="newLevel">The new skill level.</param>
+ public LevelChangedEventArgs(Farmer player, SkillType skill, int oldLevel, int newLevel)
+ {
+ this.Player = player;
+ this.Skill = skill;
+ this.OldLevel = oldLevel;
+ this.NewLevel = newLevel;
+ }
+ }
+}