Skip to content

OnInventoryNetworkUpdate

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnInventoryNetworkUpdate( PlayerInventory instance, ItemContainer container, UpdateItemContainer updateItemContainer, Type type, NetworkInventoryMode mode )
{
    Puts( "OnInventoryNetworkUpdate works!" );
}

Location

  • PlayerInventory::SendUpdatedInventoryInternal(PlayerInventory/Type type, ItemContainer container, PlayerInventory/NetworkInventoryMode mode)
csharp
//---
			container.dirty = false;
			updateItemContainer.container = Pool.Get<List<ProtoBuf.ItemContainer>>();
			bool bIncludeContainer = type != PlayerInventory.Type.Wear || mode == PlayerInventory.NetworkInventoryMode.LocalPlayer;
			updateItemContainer.container.Add(container.Save(bIncludeContainer));
		}
		if (Interface.CallHook("OnInventoryNetworkUpdate", this, container, updateItemContainer, type, mode) != null)
		{
			return;
		}
		if (mode == PlayerInventory.NetworkInventoryMode.Everyone)
		{
//---

Released under the MIT License.