Skip to content

OnItemSubmit

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnItemSubmit( Item slot, Mailbox instance, BasePlayer fromPlayer )
{
    Puts( "OnItemSubmit works!" );
}
csharp
private void OnItemSubmit(  )
{
    Puts( "OnItemSubmit works!" );
}

Location

  • Mailbox::SubmitInputItems(BasePlayer fromPlayer)
  • Mailbox::SubmitInputItems(BasePlayer fromPlayer)
csharp
//---
	for (int i = 0; i < this.InputContainer.capacity; i++)
	{
		Item slot = this.InputContainer.GetSlot(i);
		if (slot != null)
		{
			if (Interface.CallHook("OnItemSubmit", slot, this, fromPlayer) != null)
			{
				return;
			}
			if (slot.MoveToContainer(base.inventory, -1, true, false, null, true))
			{
//---
csharp
//---
	for (int i = 0; i < this.InputContainer.capacity; i++)
	{
		Item slot = this.InputContainer.GetSlot(i);
		if (slot != null)
		{
			if (Interface.CallHook("OnItemSubmit", slot, this, fromPlayer) == null)
			{
				if (slot.MoveToContainer(base.inventory, -1, true, false, null, true))
				{
					Effect.server.Run(this.mailDropSound.resourcePath, this.GetDropPosition(), default(Vector3), null, false, null);
					if (fromPlayer != null && !this.PlayerIsOwner(fromPlayer))
//---

Released under the MIT License.