示例#1
0
    public static void SetArchivementClearPoint()
    {
        int[] setCheckTypes = { 7, 8, 9, 14, 15 };
        int   point         = 0;

        for (var j = 0; j < setCheckTypes.Length; j++)
        {
            List <Mission> currentMissions = userMissions.FindAll(x => !x.enable && !x.clear && x.clearType == setCheckTypes[j]);
            for (var i = 0; i < currentMissions.Count; i++)
            {
                if (currentMissions[i].missionType == 2)
                {
                    switch (currentMissions[i].clearType)
                    {
                    case 7:
                        point = User.level;
                        break;

                    case 8:
                        point = 0;
                        foreach (var hero in HeroSystem.GetUserHeros())
                        {
                            point += hero.level;
                        }
                        break;

                    case 9:
                        point = User.flatEnergyMaxLevel + User.flatEnergyChargingLevel + User.addMoneyLevel + User.addExpLevel + User.addAttackLevel + User.addDefenceLevel;
                        break;

                    case 14:
                        point = 0;
                        foreach (var skill in SkillSystem.GetPlayerSkillList())
                        {
                            point += SkillSystem.GetUserSkillLevel(skill.id);
                        }
                        break;

                    case 15:
                        point = 0;
                        foreach (var skill in SkillSystem.GetUserHerosSkills())
                        {
                            point += SkillSystem.GetUserSkillLevel(skill.id);
                        }
                        break;
                    }
                    currentMissions[i].point = point;
                    Debugging.Log(MissionSystem.GetMissionName(currentMissions[i].id) + " 의 포인트 > " + point);
                }
            }
        }
        Debugging.Log("업적 세팅타입 설정완료");
    }