コード例 #1
0
    void InitPanel()
    {
        uint nobleID = DataManager.Manager <Mall_HuangLingManager>().NobleID;

        table.NobleDataBase noble = GameTableManager.Instance.GetTableItem <table.NobleDataBase>(nobleID);
        if (noble.HuntingTransNumber >= DataManager.Manager <HuntingManager>().UsedTime)
        {
            leftTransTime = noble.HuntingTransNumber - DataManager.Manager <HuntingManager>().UsedTime;
        }
        else
        {
            leftTransTime = 0;
        }
        m_label_Frequency.text   = leftTransTime.ToString();;
        m_label_RemindLabel.text = string.Format("(每天{0}次免费传送次数,提高皇令等级可以增加次数)", noble.HuntingTransNumber);
    }
コード例 #2
0
 public override void SetGridData(object data)
 {
     OnAwake();
     base.SetGridData(data);
     nobleID = (uint)data;
     table.NobleDataBase db = GameTableManager.Instance.GetTableItem <table.NobleDataBase>(nobleID);
     if (null != db && null != Bg)
     {
         UIManager.GetTextureAsyn(db.bgResID, ref m_texSeedData, () =>
         {
             if (null != Bg)
             {
                 Bg = null;
             }
         }, Bg, false);
     }
 }
コード例 #3
0
 public void BuyNobleRequest(uint id)
 {
     if (UnityEngine.Application.isEditor)
     {
         NetService.Instance.Send(new stBuyNoblePropertyUserCmd_CS()
         {
             noble_id = id
         });
     }
     else
     {
         table.NobleDataBase nobleDB = GameTableManager.Instance.GetTableItem <table.NobleDataBase>(id);
         if (null != nobleDB)
         {
             DataManager.Manager <RechargeManager>().DoRecharge(nobleDB.rechargeID);
         }
     }
 }
コード例 #4
0
ファイル: MallManager.cs プロジェクト: zuojiashun/src
    /// <summary>
    /// 获取流动商城刷新数据
    /// </summary>
    /// <param name="mallType"></param>
    /// <returns></returns>
    public MallDefine.BlackMarketRefreshData GetBlackMallRefreshData(int mallType = 0)
    {
        if (!MallReady)
        {
            InitMallData();
        }
        GameCmd.CommonStore targetStore = (mallType == 0)? blackMarketActiveStore
            : (GameCmd.CommonStore)mallType;
        MallDefine.BlackMarketRefreshData refreshData = new MallDefine.BlackMarketRefreshData();
        table.NobleDataBase ndb =
            GameTableManager.Instance.GetTableItem <table.NobleDataBase>(DataManager.Manager <Mall_HuangLingManager>().NobleID);
        if (null == ndb)
        {
            return(refreshData);
        }

        //刷新消费
        string refreshCostString =
            GameTableManager.Instance.GetGlobalConfig <string>(DYNASTORE_REFRESH_COST);

        if (null == refreshCostString)
        {
            return(refreshData);
        }
        string[] refreshCostStringArray = refreshCostString.Split(new char[] { '_' });
        if (null == refreshCostStringArray && refreshCostStringArray.Length != 5)
        {
            return(refreshData);
        }

        //刷新消费类型
        string refreshCostType =
            GameTableManager.Instance.GetGlobalConfig <string>(DYNASTORE_COST_TYPE);

        if (null == refreshCostString)
        {
            return(refreshData);
        }
        string[] refreshCostTypeArray = refreshCostType.Split(new char[] { '_' });
        if (null == refreshCostTypeArray && refreshCostTypeArray.Length != 5)
        {
            return(refreshData);
        }

        //刷新时间间隔
        string refreshGap =
            GameTableManager.Instance.GetGlobalConfig <string>(DYNASTORE_REFRESH_TIME);

        if (null == refreshCostString)
        {
            return(refreshData);
        }
        string[] refreshGapArray = refreshGap.Split(new char[] { '_' });
        if (null == refreshGapArray && refreshGapArray.Length != 5)
        {
            return(refreshData);
        }
        int type = 0;
        int num  = 0;

        switch (targetStore)
        {
        case GameCmd.CommonStore.CommonStore_HundredOne:
            //声望
        {
            refreshData.RefreshCount = (int)ndb.repRefCount;
            int.TryParse(refreshGapArray[0], out refreshData.RefreshGap);
            int.TryParse(refreshCostTypeArray[0], out type);
            int.TryParse(refreshCostStringArray[0], out num);
        }
        break;

        case GameCmd.CommonStore.CommonStore_HundredTwo:
            //积分
        {
            refreshData.RefreshCount = (int)ndb.scoreRefCount;
            int.TryParse(refreshGapArray[1], out refreshData.RefreshGap);
            int.TryParse(refreshCostTypeArray[1], out type);
            int.TryParse(refreshCostStringArray[1], out num);
        }
        break;

        case GameCmd.CommonStore.CommonStore_HundredThree:
            //黑市
        {
            refreshData.RefreshCount = (int)ndb.blackRefCount;
            int.TryParse(refreshGapArray[2], out refreshData.RefreshGap);
            int.TryParse(refreshCostTypeArray[2], out type);
            int.TryParse(refreshCostStringArray[2], out num);
        }
        break;

        case GameCmd.CommonStore.CommonStore_HundredFour:
            //战勋
        {
            refreshData.RefreshCount = (int)ndb.campScoreRefCount;
            int.TryParse(refreshGapArray[3], out refreshData.RefreshGap);
            int.TryParse(refreshCostTypeArray[3], out type);
            int.TryParse(refreshCostStringArray[3], out num);
        }
        break;

        case GameCmd.CommonStore.CommonStore_HundredFive:
            //战勋
        {
            refreshData.RefreshCount = (int)ndb.shouLieScoreRefCount;
            int.TryParse(refreshGapArray[4], out refreshData.RefreshGap);
            int.TryParse(refreshCostTypeArray[4], out type);
            int.TryParse(refreshCostStringArray[4], out num);
        }
        break;
        }
        refreshData.RefreshCost = new MallDefine.CurrencyData((MoneyType)
                                                              type, (uint)num);
        return(refreshData);
    }