OnBonusItemDrop
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnBonusItemDrop( Item item, BasePlayer basePlayer )
{
Puts( "OnBonusItemDrop works!" );
}
Location
- LootContainer::DropBonusItems(BaseEntity initiator, ItemContainer container)
csharp
//---
if (num4 > 0)
{
Item item = ItemManager.Create(LootContainer.scrapDef, num4, 0uL, true);
if (item != null)
{
if (Interface.CallHook("OnBonusItemDrop", item, basePlayer) != null)
{
return;
}
(item.Drop(this.GetDropPosition() + new Vector3(0f, 0.5f, 0f), this.GetInheritedDropVelocity(), default(Quaternion)) as DroppedItem).DropReason = DroppedItem.DropReasonEnum.Loot;
}
//---