// Token: 0x060004AC RID: 1196 RVA: 0x00012C34 File Offset: 0x00010E34
        public CostTypeDef.PayCostResults PayCost(int cost, Interactor activator, GameObject purchasedObject, Xoroshiro128Plus rng, ItemIndex avoidedItemIndex)
        {
            CostTypeDef.PayCostResults payCostResults = new CostTypeDef.PayCostResults();
            CharacterBody component = activator.GetComponent <CharacterBody>();

            this.payCost(this, new CostTypeDef.PayCostContext
            {
                cost             = cost,
                activator        = activator,
                activatorBody    = component,
                activatorMaster  = (component ? component.master : null),
                purchasedObject  = purchasedObject,
                results          = payCostResults,
                rng              = rng,
                avoidedItemIndex = avoidedItemIndex
            });
            return(payCostResults);
        }
        // Token: 0x060010B3 RID: 4275 RVA: 0x00049330 File Offset: 0x00047530
        public void OnInteractionBegin(Interactor activator)
        {
            if (!this.CanBeAffordedByInteractor(activator))
            {
                return;
            }
            CharacterBody        component   = activator.GetComponent <CharacterBody>();
            CostTypeDef          costTypeDef = CostTypeCatalog.GetCostTypeDef(this.costType);
            ItemIndex            itemIndex   = ItemIndex.None;
            ShopTerminalBehavior component2  = base.GetComponent <ShopTerminalBehavior>();

            if (component2)
            {
                itemIndex = component2.CurrentPickupIndex().itemIndex;
            }
            CostTypeDef.PayCostResults payCostResults = costTypeDef.PayCost(this.cost, activator, base.gameObject, this.rng, itemIndex);
            foreach (ItemIndex itemIndex2 in payCostResults.itemsTaken)
            {
                PurchaseInteraction.CreateItemTakenOrb(component.corePosition, base.gameObject, itemIndex2);
                if (itemIndex2 != itemIndex)
                {
                    Action <PurchaseInteraction, Interactor> action = PurchaseInteraction.onItemSpentOnPurchase;
                    if (action != null)
                    {
                        action(this, activator);
                    }
                }
            }
            foreach (EquipmentIndex arg in payCostResults.equipmentTaken)
            {
                Action <PurchaseInteraction, Interactor, EquipmentIndex> action2 = PurchaseInteraction.onEquipmentSpentOnPurchase;
                if (action2 != null)
                {
                    action2(this, activator, arg);
                }
            }
            IEnumerable <StatDef> statDefsToIncrement = this.purchaseStatNames.Select(new Func <string, StatDef>(StatDef.Find));

            StatManager.OnPurchase <IEnumerable <StatDef> >(component, this.costType, statDefsToIncrement);
            this.onPurchase.Invoke(activator);
            this.lastActivator = activator;
        }