diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 6a04bf0c..7b452fe4 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -1379,7 +1379,7 @@ namespace TShockAPI /// The item prefix. public virtual void GiveItem(int type, int stack, int prefix = 0) { - int itemIndex = Item.NewItem((int)X, (int)Y, TPlayer.width, TPlayer.height, type, stack, true, prefix, true); + int itemIndex = Item.NewItem(new EntitySource_DebugCommand(), (int)X, (int)Y, TPlayer.width, TPlayer.height, type, stack, true, prefix, true); SendData(PacketTypes.ItemDrop, "", itemIndex); } diff --git a/TShockAPI/TSServerPlayer.cs b/TShockAPI/TSServerPlayer.cs index d414d424..14ea674b 100644 --- a/TShockAPI/TSServerPlayer.cs +++ b/TShockAPI/TSServerPlayer.cs @@ -26,6 +26,7 @@ using TShockAPI; using TShockAPI.DB; using Terraria.Localization; using System.Linq; +using Terraria.DataStructures; namespace TShockAPI { @@ -166,7 +167,7 @@ namespace TShockAPI int spawnTileY; TShock.Utils.GetRandomClearTileWithInRange(startTileX, startTileY, tileXRange, tileYRange, out spawnTileX, out spawnTileY); - NPC.NewNPC(spawnTileX * 16, spawnTileY * 16, type); + NPC.NewNPC(new EntitySource_DebugCommand(), spawnTileX * 16, spawnTileY * 16, type); } }