From c607ecfe27cdd4d8f726becc3275e77fda917649 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 23 Dec 2017 15:31:20 -0700 Subject: [PATCH] OnNPCSpecial now uses GetDataHandledEventArgs. --- TShockAPI/GetDataHandlers.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 1d00fa89..e14573d7 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1341,7 +1341,7 @@ namespace TShockAPI /// /// For use with a NPCSpecial event /// - public class NPCSpecialEventArgs : HandledEventArgs + public class NPCSpecialEventArgs : GetDataHandledEventArgs { /// /// ??? @@ -1357,13 +1357,15 @@ namespace TShockAPI /// public static HandlerList NPCSpecial = new HandlerList(); - private static bool OnNPCSpecial(byte id, byte type) + private static bool OnNPCSpecial(TSPlayer player, MemoryStream data, byte id, byte type) { if (NPCSpecial == null) return false; var args = new NPCSpecialEventArgs { + Player = player, + Data = data, ID = id, Type = type, }; @@ -2724,7 +2726,7 @@ namespace TShockAPI var id = args.Data.ReadInt8(); var type = args.Data.ReadInt8(); - if (OnNPCSpecial(id, type)) + if (OnNPCSpecial(args.Player, args.Data, id, type)) return true; if (type == 1 && TShock.Config.DisableDungeonGuardian)