From 946bf2ad4901fda1e9d995f7ce183bf6bea2676e Mon Sep 17 00:00:00 2001 From: Deathmax Date: Fri, 6 Jan 2012 21:52:15 +0800 Subject: [PATCH 1/2] Fix chairs not having the correct direction This also fixes purification powder not working, and other stuff that relies on sendtilesquare --- TShockAPI/GetDataHandlers.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6224c362..7863a3af 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -698,7 +698,8 @@ namespace TShockAPI {PacketTypes.PlayerAnimation, HandlePlayerAnimation}, {PacketTypes.PlayerBuff, HandlePlayerBuffUpdate}, {PacketTypes.PasswordSend, HandlePassword}, - {PacketTypes.ContinueConnecting2, HandleConnecting} + {PacketTypes.ContinueConnecting2, HandleConnecting}, + {PacketTypes.ProjectileDestroy, HandleProjectileKill} }; } @@ -1050,11 +1051,11 @@ namespace TShockAPI var tile = Main.tile[realx, realy]; var newtile = tiles[x, y]; - if (TShock.CheckTilePermission(args.Player, x, y)) + if (TShock.CheckTilePermission(args.Player, realx, realy)) { continue; } - if (TShock.CheckRangePermission(args.Player, x, y)) + if (TShock.CheckRangePermission(args.Player, realx, realy)) { continue; } From 714746ab6c85d18d6f979f7be5814a6a5316f887 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Fri, 6 Jan 2012 21:58:51 +0800 Subject: [PATCH 2/2] TSHOCKPLUGINS-9 #close fixed Fixed. Workaround for REST meteor null reference exception crash. Requires an initializer for genRand if using any WorldGen methods in the future. --- TShockAPI/Rest/RestManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index b6b0a896..0d5e52f3 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -428,11 +428,11 @@ namespace TShockAPI private object WorldMeteor(RestVerbs verbs, IParameterCollection parameters) { + if (WorldGen.genRand == null) + WorldGen.genRand = new Random(); WorldGen.dropMeteor(); - var returnBlock = new Dictionary(); - returnBlock.Add("status", "200"); - returnBlock.Add("response", "Meteor has been spawned."); - return returnBlock; + var returnBlock = new Dictionary {{"status", "200"}, {"response", "Meteor has been spawned."}}; + return returnBlock; } private object WorldBloodmoon(RestVerbs verbs, IParameterCollection parameters)