Skip to content

OnActiveItemChange

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnActiveItemChange( BasePlayer instance, Item activeItem, ItemId itemID )
{
    Puts( "OnActiveItemChange works!" );
}

Location

  • BasePlayer::UpdateActiveItem(ItemId itemID)
csharp
//---
	if (this.IsItemHoldRestricted(item))
	{
		itemID = default(ItemId);
	}
	Item activeItem = this.GetActiveItem();
	if (Interface.CallHook("OnActiveItemChange", this, activeItem, itemID) != null)
	{
		return;
	}
	this.svActiveItemID = default(ItemId);
	if (activeItem != null)
//---

Released under the MIT License.