Skip to content

OnItemUnwrap

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void OnItemUnwrap( Item item, BasePlayer player, ItemModUnwrap instance )
{
    Puts( "OnItemUnwrap works!" );
}

Location

  • ItemModUnwrap::ServerCommand(Item item, string command, BasePlayer player)
csharp
//---
	{
		if (item.amount <= 0)
		{
			return;
		}
		if (Interface.CallHook("OnItemUnwrap", item, player, this) != null)
		{
			return;
		}
		item.UseItem(1);
		int num = UnityEngine.Random.Range(this.minTries, this.maxTries + 1);
//---

Released under the MIT License.