Exemplo n.º 1
0
        public void UserMission(string missionID, UserMissionTemplate3 template)
        {
            int id;

            if (!int.TryParse(missionID, out id))
            {
                //TODO:
            }
            UserMission userMission = MissionBO.Instance.GetUserMission(UserBO.Instance.GetCurrentUserID(), id);

            bool isApplied, isFinished, havePrize;

            if (userMission == null)
            {
                isApplied  = false;
                isFinished = false;
            }
            else
            {
                isApplied = true;
                if (userMission.FinishPercent == 1)
                {
                    isFinished = true;
                }
                else
                {
                    isFinished = false;
                }
            }

            if (MissionBO.Instance.GetMission(id).Prize.PrizeTypes.Count > 0)
            {
                havePrize = true;
            }
            else
            {
                havePrize = false;
            }
            template(isApplied, isFinished, havePrize, userMission);
        }
Exemplo n.º 2
0
        public void UserMission(string missionID, UserMissionTemplate3 template)
        {
            int id;
            if (!int.TryParse(missionID, out id))
            {
                //TODO:
            }
            UserMission userMission = MissionBO.Instance.GetUserMission(UserBO.Instance.GetCurrentUserID(), id);

            bool isApplied, isFinished, havePrize;
            if (userMission == null)
            {
                isApplied = false;
                isFinished = false;
            }
            else
            {
                isApplied = true;
                if (userMission.FinishPercent == 1)
                    isFinished = true;
                else
                    isFinished = false;

            }

            if (MissionBO.Instance.GetMission(id).Prize.PrizeTypes.Count > 0)
                havePrize = true;
            else
                havePrize = false;
            template(isApplied, isFinished, havePrize, userMission);
        }