Added a constructor with arguments taking Terraria.Item.
This commit is contained in:
parent
62b8e5067c
commit
86be1738cc
1 changed files with 11 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue