Esempio n. 1
0
    private void ResponseBuyItem(ScChargeBuySuccess msg)
    {
        if (tempCache.ContainsKey(msg.productId))
        {
            tempCache[msg.productId].UpdateItemInfo();
        }

        Window_ItemTip.Show(ConfigText.GetDefalutString(TextForMatType.RechargeUIText, 12), moduleCharge.CurrentDeal.info.reward, msg.hasTotalBuyCount == 1);
        moduleGlobal.UnLockUI();
    }
Esempio n. 2
0
    private void ResponseBuyCard(ScChargeBuySuccess msg)
    {
        var product = moduleCharge.GetProduct(msg.productId);

        if (product.info.type == (int)ProductType.MonthCard)
        {
            var title = ConfigText.GetDefalutString(TextForMatType.RechargeUIText, Module_Charge.CalcCardDays(moduleCharge.MonthEndTime) > 0 ? 24 : 23);
            Window_ItemTip.Show(title, monthChargeItem.info.reward);
        }
        else if (product.info.type == (int)ProductType.SeasonCard)
        {
            var title = ConfigText.GetDefalutString(TextForMatType.RechargeUIText, Module_Charge.CalcCardDays(moduleCharge.SeasonEndTime) > 0 ? 24 : 23);
            Window_ItemTip.Show(title, seasonChargeItem.info.reward);
        }
    }
Esempio n. 3
0
    void _Packet(ScChargeBuySuccess msg)
    {
        var product = GetProduct(msg.productId);

        if (product != null)
        {
            product.hasTotalBuyCount = msg.hasTotalBuyCount;
            product.hasBuyCount      = msg.hasBuyCount;

            LockDeal(false);
        }

        DispatchModuleEvent(NoticeChargeBuySuccess, msg);

        SDKManager.Setryzf(msg.orderUid.ToString(), msg.paymentType.ToString(), product != null && product.info != null ? product.info.currencyType : (byte)0, msg.cost);
    }