Esempio n. 1
0
    string Consume()
    {
        VIPDataInfo info     = GameCenter.vipMng.VipData;
        int         maxTimes = info != null ? info.HangUpMaxBuyTimes : 0;
        int         curTimes = maxTimes - GameCenter.activityMng.HangUpRemainBuyTimes;

        if (curTimes <= 0)
        {
            curTimes = maxTimes;
            Debug.LogError("当前VIP最大次数小于剩余次数,数据异常!");
        }
        Dictionary <int, ItemValue> itemDic            = new Dictionary <int, ItemValue>();
        StepConsumptionRef          stepConsumptionRef = ConfigMng.Instance.GetStepConsumptionRef(curTimes + 1);

        if (stepConsumptionRef != null && stepConsumptionRef.hangUpCoppyTimesCost.Count > 0)
        {
            for (int j = 0, lengthJ = stepConsumptionRef.hangUpCoppyTimesCost.Count; j < lengthJ; j++)
            {
                ItemValue item = stepConsumptionRef.hangUpCoppyTimesCost[j];
                AddOne(itemDic, item);
            }
        }
        System.Text.StringBuilder builder = new System.Text.StringBuilder();
        using (var item = itemDic.GetEnumerator())
        {
            while (item.MoveNext())
            {
                builder.Append(GameHelper.GetStringWithBagNumber(item.Current.Value, out enough, out lackEquip)).Append(" ");
            }
        }
        return(builder.ToString());
    }
Esempio n. 2
0
/// <summary>
    ///  add 唐源
    /// S2s the c VIP 数据.
    /// </summary>
    /// <param name="info">Info.</param>
    void S2C_VIPResult(Pt info)
    {
        pt_vip_info_d329 msg = info as pt_vip_info_d329;

        if (msg == null)
        {
            return;
        }
        vipData = new VIPDataInfo(msg);
        if (OnVIPDataUpdate != null)
        {
            OnVIPDataUpdate();
        }
    }