diff --git a/GameServerLib/GameObjects/Other/Stackable.cs b/GameServerLib/GameObjects/Other/Stackable.cs index 2426bb55f9..fcc6b5fc80 100644 --- a/GameServerLib/GameObjects/Other/Stackable.cs +++ b/GameServerLib/GameObjects/Other/Stackable.cs @@ -6,7 +6,19 @@ namespace LeagueSandbox.GameServer.GameObjects.Other public class Stackable { public int MaxStacks { get; protected set; } - public int StackCount { get; protected set; } + public int StackCount + { + get => stackCount; protected set + { + if (stackCount != value) + { + OnStackCountChanged(stackCount, value); + stackCount = value; + } + } + } + + private int stackCount; public virtual bool IncrementStackCount() { @@ -37,5 +49,9 @@ public virtual void SetStacks(int newStacks) } StackCount = newStacks; } + + protected virtual void OnStackCountChanged(int oldStackCount, int newStackCount) + { + } } }