From 4c3600f58d1c165e6e70a24ce0818274ed558b5e Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 23 Dec 2017 14:36:28 -0700 Subject: [PATCH] OnLiquidSet now uses GetDataHandledEventArgs. --- TShockAPI/GetDataHandlers.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 854e2b70..8406e778 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -808,10 +808,8 @@ namespace TShockAPI /// /// For use in a LiquidSet event /// - public class LiquidSetEventArgs : HandledEventArgs + public class LiquidSetEventArgs : GetDataHandledEventArgs { - /// The TSPlayer that triggered the event. - public TSPlayer Player { get; set; } /// /// X location of the tile /// @@ -834,7 +832,7 @@ namespace TShockAPI /// public static HandlerList LiquidSet = new HandlerList(); - private static bool OnLiquidSet(TSPlayer player, int tilex, int tiley, byte amount, byte type) + private static bool OnLiquidSet(TSPlayer player, MemoryStream data, int tilex, int tiley, byte amount, byte type) { if (LiquidSet == null) return false; @@ -842,6 +840,7 @@ namespace TShockAPI var args = new LiquidSetEventArgs { Player = player, + Data = data, TileX = tilex, TileY = tiley, Amount = amount, @@ -2471,7 +2470,7 @@ namespace TShockAPI byte amount = args.Data.ReadInt8(); byte type = args.Data.ReadInt8(); - if (OnLiquidSet(args.Player, tileX, tileY, amount, type)) + if (OnLiquidSet(args.Player, args.Data, tileX, tileY, amount, type)) return true; return false;