Added an overload for TSPlayer.GiveItem
Added `TShockAPI.NetItem` structure to the parameters.
This commit is contained in:
parent
3d585d4d69
commit
2f7514c0ef
1 changed files with 9 additions and 0 deletions
|
|
@ -1566,6 +1566,15 @@ namespace TShockAPI
|
||||||
GiveItemByDrop(type, stack, prefix);
|
GiveItemByDrop(type, stack, prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gives an item to the player.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">Item with data to be given to the player.</param>
|
||||||
|
public virtual void GiveItem(NetItem item)
|
||||||
|
{
|
||||||
|
GiveItem(item.NetId, item.Stack, item.PrefixId);
|
||||||
|
}
|
||||||
|
|
||||||
private Item EmptySentinelItem = new Item();
|
private Item EmptySentinelItem = new Item();
|
||||||
|
|
||||||
private bool Depleted(Item item)
|
private bool Depleted(Item item)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue