Esempio n. 1
0
        private bool LevelUp()
        {
            int  lv  = m_base.GetLv();
            long exp = m_base.GetExp();

            if (theGameConst.MaxLv <= lv)
            {
                return(false);
            }

            int  incLv   = 0;
            long tempExp = exp;
            bool bLvup   = false;

            for (int i = lv; i <= theGameConst.MaxLv; ++i)
            {
                fmDataExp data = theFmDataFinder.Find <fmDataExp>(i);
                if (null == data)
                {
                    return(false);
                }

                long remainExp = data.m_biNeedExp - tempExp;

                if (remainExp <= 0)
                {
                    incLv   += 1;
                    tempExp -= data.m_biNeedExp;
                    bLvup    = true;
                }
                else
                {
                    if (false == bLvup)
                    {
                        tempExp = remainExp;
                    }
                    break;
                }
            }

            if (incLv <= 0)
            {
                return(false);
            }

            int sumLv = (lv + incLv);


            if (theGameConst.MaxLv <= sumLv)
            {
                sumLv   = 70;
                tempExp = 0;
            }

            m_base.LevelUp(sumLv, tempExp);
            m_stat.LevelUp(incLv);

            return(true);
        }
Esempio n. 2
0
        public override void LoadExcelSheet(DataRow rowData)
        {
            fmDataExp data = m_fmData as fmDataExp;

            data.m_nCode      = GetInt(rowData, "nCode");
            data.m_biTotalExp = GetLong(rowData, "biTotalExp");
            data.m_biNeedExp  = GetLong(rowData, "biNeedExp");
        }
Esempio n. 3
0
 public LoaderExp()
 {
     m_fmData = new fmDataExp();
 }
Esempio n. 4
0
        public override bool IsValid()
        {
            fmDataExp data = m_fmData as fmDataExp;

            return(true);
        }