Merge remote-tracking branch 'origin/general-devel' into otapi3

This commit is contained in:
Lucas Nicodemus 2022-04-01 01:14:01 -07:00
commit 49a2dce59e
3 changed files with 26 additions and 1 deletions

View file

@ -1379,7 +1379,9 @@ namespace TShockAPI
public virtual void GiveItem(int type, int stack, int prefix = 0)
{
int itemIndex = Item.NewItem(new EntitySource_DebugCommand(), (int)X, (int)Y, TPlayer.width, TPlayer.height, type, stack, true, prefix, true);
SendData(PacketTypes.ItemDrop, "", itemIndex);
Main.item[itemIndex].playerIndexTheItemIsReservedFor = this.Index;
SendData(PacketTypes.ItemDrop, "", itemIndex, 1);
SendData(PacketTypes.ItemOwner, null, itemIndex);
}
/// <summary>