OnAddVendingOffer
Usage
- No return behavior
Example Autogenerated
csharp
private void OnAddVendingOffer( VendingMachine instance, SellOrder sellOrder )
{
Puts( "OnAddVendingOffer works!" );
}
Location
- VendingMachine::AddSellOrder(int itemToSellID, int itemToSellAmount, int currencyToUseID, int currencyAmount, byte bpState)
csharp
//---
sellOrder.itemToSellAmount = itemToSellAmount;
sellOrder.currencyID = currencyToUseID;
sellOrder.currencyAmountPerItem = currencyAmount;
sellOrder.currencyIsBP = (bpState == 3 || bpState == 2);
sellOrder.itemToSellIsBP = (bpState == 3 || bpState == 1);
Interface.CallHook("OnAddVendingOffer", this, sellOrder);
this.sellOrders.sellOrders.Add(sellOrder);
this.RefreshSellOrderStockLevel(itemDefinition);
this.UpdateMapMarker(false);
base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
}