Update to Mintaka (thanks @enerdy)

This commit is contained in:
Lucas Nicodemus 2016-12-06 17:36:44 -07:00
parent d728a24902
commit 678f6c7cf8
No known key found for this signature in database
GPG key ID: CEE668CCE1BF2C7C
29 changed files with 51 additions and 39 deletions

View file

@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Microsoft.Xna.Framework;
using OTAPI.Tile;
using System;
using System.Collections.Generic;
using Terraria;
@ -165,10 +167,10 @@ namespace TShockAPI
NetMessage.SendData((int)PacketTypes.NpcStrike, -1, -1, "", npcid, damage, knockBack, hitDirection);
}
public void RevertTiles(Dictionary<Vector2, Tile> tiles)
public void RevertTiles(Dictionary<Vector2, ITile> tiles)
{
// Update Main.Tile first so that when tile sqaure is sent it is correct
foreach (KeyValuePair<Vector2, Tile> entry in tiles)
foreach (KeyValuePair<Vector2, ITile> entry in tiles)
{
Main.tile[(int)entry.Key.X, (int)entry.Key.Y] = entry.Value;
}