Added a constructor with arguments taking Terraria.Item.

This commit is contained in:
AkjaHAsLk1IALk0MasH 2023-05-14 10:13:59 +07:00
parent 62b8e5067c
commit 86be1738cc

View file

@ -162,6 +162,17 @@ namespace TShockAPI
_prefixId = prefixId;
}
/// <summary>
/// Creates a new <see cref="NetItem"/>.
/// </summary>
/// <param name="item">Item in the game.</param>
public NetItem(Item item)
{
_netId = item.netID;
_stack = item.stack;
_prefixId = item.prefix;
}
/// <summary>
/// Creates <see cref="Terraria.Item"/> based on data from this structure.
/// </summary>