OnDispenserGather
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnDispenserGather( ResourceDispenser instance, BasePlayer entity, Item item )
{
Puts( "OnDispenserGather works!" );
}
Location
- ResourceDispenser::GiveResourceFromItem(BasePlayer entity, ItemAmount itemAmt, float gatherDamage, float destroyFraction, AttackEntity attackWeapon)
csharp
//---
if (num3 >= 1f)
{
int num6 = this.CalculateGatherBonus(entity, itemAmt, num3);
int iAmount = Mathf.FloorToInt(num3) + num6;
Item item = ItemManager.CreateByItemID(itemAmt.itemid, iAmount, 0uL);
if (Interface.CallHook("OnDispenserGather", this, entity, item) != null)
{
return;
}
if (item == null)
{
//---