示例#1
0
    private void UpdateStarActivityRefresh(int obj)
    {
        var refreshTimeStamp = _missionModel.GetStarActivityRefreshTimePintList()[_missionModel.GetOpenDay()];
        var curTimeStamp     = ClientTimer.Instance.GetCurrentTimeStamp();
        var overTimeStamp    = _missionModel.GetStarActivityOverTimeStamp();

        if (curTimeStamp == overTimeStamp)
        {
            ModuleManager.Instance.GoBack();
            return;
        }
        if (refreshTimeStamp == curTimeStamp)
        {
            MissionRefreshReq req = new MissionRefreshReq();
            var data = NetWorkManager.GetByteData(req);
            NetWorkManager.Instance.Send <MissionRefreshRes>(CMD.MISSION_REFRESH, data, res =>
            {
                _missionModel.UpdateUserMissionInfo(res.UserMissionInfo);
                _missionModel.UpdateStarActivityMission(res.UserMissions);
                View.SetData(_missionModel, _missionModel.Day);
            });
        }
    }