Пример #1
0
 public void UpdateNextSkillByCategory(IShooterSkill categorySkill, List <IShooterSkill> skills, int curWeaponId)
 {
     if (categorySkill != null)
     {
         //Update next skill
         List <ShooterSkillId> nextSkillIdList = categorySkill.GetNextSkillIdList();
         if (nextSkillIdList != null && nextSkillIdList.Count > 0)
         {
             foreach (ShooterSkillId skillId in nextSkillIdList)
             {
                 IShooterSkill tSkill = GetSkillById(skills, (int)skillId);
                 if (tSkill != null && tSkill.GetWeaponId() == curWeaponId)
                 {
                     categorySkill.SetNextSkillId((int)skillId);
                     break;
                 }
             }
         }
     }
 }