Adding EntitySource parameter to the used at NewNPC and NewItem methods.

I've decided to use the DebugCommand entity source for anything server related, as it makes the most sense as source. Feel free to discuss.
This commit is contained in:
Patrikkk 2022-02-25 04:42:16 +01:00
parent 2f31322b5f
commit 1b96ed8992
2 changed files with 3 additions and 2 deletions

View file

@ -1379,7 +1379,7 @@ namespace TShockAPI
/// <param name="prefix">The item prefix.</param>
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);
}