Fixed chests
This commit is contained in:
parent
a4806463c8
commit
f6078a9594
1 changed files with 5 additions and 4 deletions
|
|
@ -2674,8 +2674,10 @@ namespace TShockAPI
|
||||||
|
|
||||||
private static bool HandleTileKill(GetDataHandlerArgs args)
|
private static bool HandleTileKill(GetDataHandlerArgs args)
|
||||||
{
|
{
|
||||||
var tileX = args.Data.ReadInt32();
|
int flag = args.Data.ReadByte();
|
||||||
var tileY = args.Data.ReadInt32();
|
int tileX = args.Data.ReadInt16();
|
||||||
|
int tileY = args.Data.ReadInt16();
|
||||||
|
|
||||||
if (OnTileKill(tileX, tileY))
|
if (OnTileKill(tileX, tileY))
|
||||||
return true;
|
return true;
|
||||||
if (!TShock.Utils.TilePlacementValid(tileX, tileY) || (args.Player.Dead && TShock.Config.PreventDeadModification))
|
if (!TShock.Utils.TilePlacementValid(tileX, tileY) || (args.Player.Dead && TShock.Config.PreventDeadModification))
|
||||||
|
|
@ -2687,7 +2689,7 @@ namespace TShockAPI
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Main.tile[tileX, tileY].type != 0x15 && (!TShock.Utils.MaxChests() && Main.tile[tileX, tileY].type != 0)) //Chest
|
if (flag != 0 && Main.tile[tileX, tileY].type != 21 && (!TShock.Utils.MaxChests() && Main.tile[tileX, tileY].type != 0)) //Chest
|
||||||
{
|
{
|
||||||
args.Player.SendTileSquare(tileX, tileY, 3);
|
args.Player.SendTileSquare(tileX, tileY, 3);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2704,7 +2706,6 @@ namespace TShockAPI
|
||||||
args.Player.SendTileSquare(tileX, tileY, 3);
|
args.Player.SendTileSquare(tileX, tileY, 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue