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