Example #1
0
        private FuBenData GetFuBenData(GameClient client, int fuBenID)
        {
            bool      isNotify  = false;
            FuBenData fuBenData = Global.GetFuBenData(client, fuBenID);

            int dayID = TimeUtil.NowDateTime().DayOfYear;

            if (null == fuBenData)
            {
                fuBenData = Global.AddFuBenData(client, fuBenID, dayID, 0, 0, 0);
            }

            if (fuBenData.DayID != dayID)
            {
                fuBenData.DayID     = dayID;
                fuBenData.EnterNum  = 0;
                fuBenData.FinishNum = 0;

                isNotify = true;
            }

            //将新的副本的数据通知自己
            if (isNotify)
            {
                GameManager.ClientMgr.NotifyFuBenData(client, fuBenData);
            }

            return(fuBenData);
        }