diff --git a/CHANGELOG.md b/CHANGELOG.md index ebac456e..5a4e2b5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fix message requiring login not using the command specifier set in the config file. (@hakusaro) * Move `TShock.CheckSpawn` to `Utils.IsInSpawn`. (@hakusaro) * Fix stack hack detection being inconsistent between two different check points. Moved `TShock.HackedInventory` to `TSPlayer.HasHackedItemStacks`. Added `GetDataHandlers.GetDataHandledEventArgs` which is where most hooks will inherit from in the future. (@hakusaro) +* All `GetDataHandlers` hooks now inherit from `GetDataHandledEventArgs` which includes a `TSPlayer` and a `MemoryStream` of raw data. (@hakusaro) ## TShock 4.3.25 * Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6. diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 86076fad..627c0e49 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -426,6 +426,7 @@ namespace TShockAPI /// Fires the ProjectileKill event. /// The TSPlayer that caused the event. + /// The MemoryStream containing the raw event data. /// The projectile identity (from the packet). /// The projectile's owner (from the packet). /// The projectile's index (from Main.projectiles). @@ -618,6 +619,8 @@ namespace TShockAPI public static HandlerList HealOtherPlayer = new HandlerList(); /// Fires the HealOtherPlayer event + /// The TSPlayer that caused the event. + /// The MemoryStream containing the raw event data. /// The Terraria player index that the event targets /// The amount to heal /// bool @@ -684,9 +687,6 @@ namespace TShockAPI /// The arguments to the PlaceObject hook. public class PlaceObjectEventArgs : GetDataHandledEventArgs { - /// The calling Player. - public TSPlayer Player { get; set; } - /// The X location where the object was placed. public short X { get; set ; } @@ -710,7 +710,8 @@ namespace TShockAPI public static HandlerList PlaceObject = new HandlerList(); /// Fires the PlaceObject hook. To be called when an object is placed in the world. - /// The originating player. + /// The TSPlayer that caused the event. + /// The MemoryStream containing the raw event data. /// The x position where the object is placed. /// The y position where the object is placed. /// The type of object.