Skip to content

OnItemStacked

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnItemStacked( Item slot2, Item instance, ItemContainer newcontainer, int num2 )
{
    Puts( "OnItemStacked works!" );
}
csharp
private void OnItemStacked( Item entityOwner2, Item instance, ItemContainer newcontainer )
{
    Puts( "OnItemStacked works!" );
}

Location

  • Item::MoveToContainer(ItemContainer newcontainer, int iTargetPos, bool allowStack, bool ignoreStackLimit, BasePlayer sourcePlayer, bool allowSwap)
  • Item::MoveToContainer(ItemContainer newcontainer, int iTargetPos, bool allowStack, bool ignoreStackLimit, BasePlayer sourcePlayer, bool allowSwap)
csharp
//---
							{
								expr_2D1(slot2, num2);
							}
							this.amount -= num2;
							slot2.MarkDirty();
							Interface.CallHook("OnItemStacked", slot2, this, newcontainer, num2);
							this.MarkDirty();
							this.MigrateItemOwnership(slot2, num2);
							if (this.amount <= 0)
							{
								this.RemoveFromWorld();
//---
csharp
//---
							{
								expr_2D1(slot2, num2);
							}
							this.amount -= num2;
							slot2.MarkDirty();
							Interface.CallHook("OnItemStacked", slot2, this, newcontainer, num2);
							this.MarkDirty();
							this.MigrateItemOwnership(slot2, num2);
							if (this.amount <= 0)
							{
								this.RemoveFromWorld();
//---

Released under the MIT License.