Пример #1
0
    void InItData()
    {
        string     groupName = "";
        List <int> keys      = new List <int> ();

        prof = Profession.get((JobType)GamePlayer.Instance.GetIprop(PropertyType.PT_Profession), GamePlayer.Instance.GetIprop(PropertyType.PT_ProfessionLevel));
        bool isdeyi = false;

        foreach (int key in SkillData.GetAllData().Keys)
        {
            keys.Add(key);
        }
        for (int i = 0; i < keys.Count; i++)
        {
            groupName = SkillData.GetMinxiLevelData(keys[i])._Name;
            isdeyi    = prof.isProudSkill(GamePlayer.Instance.GetIprop(PropertyType.PT_Profession), keys[i], GamePlayer.Instance.GetIprop(PropertyType.PT_ProfessionLevel));

            if (groupName.Equals("null"))
            {
                continue;
            }
            if (SkillData.GetMinxiLevelData(keys[i])._Level != 1)
            {
                continue;
            }
            SkillData sdd = SkillData.GetMinxiLevelData(keys[i]);
            int       lev = prof.getSkilMaxLevel(sdd._Id);
            if (lev == 0)
            {
                continue;
            }
            if (isdeyi)
            {
                Pskillist.Add(SkillData.GetMinxiLevelData(keys[i]));
                //continue;
            }
            skillist.Add(SkillData.GetMinxiLevelData(keys[i]));
        }

        for (int i = 0; i < skillist.Count; i++)
        {
            if (skillist[i]._LearnGroup == 1)
            {
                ATskillist.Add(skillist[i]);
            }
            if (skillist[i]._LearnGroup == 2)
            {
                AMskillist.Add(skillist[i]);
            }
            if (skillist[i]._LearnGroup == 3)
            {
                Sskillist.Add(skillist[i]);
            }
            if (skillist[i]._LearnGroup == 4)
            {
                Askillist.Add(skillist[i]);
            }
//            if(skillist[i].LearnGroup_ == 5)
//            {
//                Pskillist.Add(skillist[i]);
//
//            }
//            if(skillist[i].LearnGroup_ == 6)
//            {
//                Fskillist.Add(skillist[i]);
//            }
        }
        ATskillist.Sort(SortPSkill);
        AMskillist.Sort(SortPSkill);
        Sskillist.Sort(SortPSkill);
        Askillist.Sort(SortPSkill);

        ATskillist.Sort(SortSkill);
        AMskillist.Sort(SortSkill);
        Sskillist.Sort(SortSkill);
        Askillist.Sort(SortSkill);



        ButtonToSelect(4);
        AddItem(Pskillist);
    }