OnPaintWall now uses GetDataHandledEventArgs.
This commit is contained in:
parent
6814aabf6e
commit
ad83c39300
1 changed files with 5 additions and 3 deletions
|
|
@ -2133,7 +2133,7 @@ namespace TShockAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For use with a PaintWall event
|
/// For use with a PaintWall event
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PaintWallEventArgs : HandledEventArgs
|
public class PaintWallEventArgs : GetDataHandledEventArgs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// X Location
|
/// X Location
|
||||||
|
|
@ -2153,13 +2153,15 @@ namespace TShockAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static HandlerList<PaintWallEventArgs> PaintWall = new HandlerList<PaintWallEventArgs>();
|
public static HandlerList<PaintWallEventArgs> PaintWall = new HandlerList<PaintWallEventArgs>();
|
||||||
|
|
||||||
private static bool OnPaintWall(Int32 x, Int32 y, byte t)
|
private static bool OnPaintWall(TSPlayer player, MemoryStream data, Int32 x, Int32 y, byte t)
|
||||||
{
|
{
|
||||||
if (PaintWall == null)
|
if (PaintWall == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var args = new PaintWallEventArgs
|
var args = new PaintWallEventArgs
|
||||||
{
|
{
|
||||||
|
Player = player,
|
||||||
|
Data = data,
|
||||||
X = x,
|
X = x,
|
||||||
Y = y,
|
Y = y,
|
||||||
type = t
|
type = t
|
||||||
|
|
@ -2949,7 +2951,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (OnPaintWall(x, y, t))
|
if (OnPaintWall(args.Player, args.Data, x, y, t))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue