Example #1
0
 public void AnalyseSkillCombine(ref ActorPreloadTab loadInfo, int combineId)
 {
     if (combineId > 0)
     {
         ResSkillCombineCfgInfo dataByKey = GameDataMgr.skillCombineDatabin.GetDataByKey((long)combineId);
         if (dataByKey != null)
         {
             AssetLoadBase item = new AssetLoadBase {
                 assetPath = StringHelper.UTF8BytesToString(ref dataByKey.szPrefab)
             };
             string checkerKey = this.GetCheckerKey(item.assetPath, loadInfo.MarkID);
             if (!this.ageCheckerSet.ContainsKey(checkerKey))
             {
                 loadInfo.ageActions.Add(item);
                 this.ageCheckerSet.Add(checkerKey, true);
             }
             if ((dataByKey.bIsShowBuff == 1) && !string.IsNullOrEmpty(dataByKey.szIconPath))
             {
                 string path = CUIUtility.s_Sprite_Dynamic_Skill_Dir + dataByKey.szIconPath;
                 if (!loadInfo.IsExistsSprite(path))
                 {
                     loadInfo.AddSprite(path);
                 }
             }
             if ((dataByKey.astSkillFuncInfo != null) && (dataByKey.astSkillFuncInfo.Length > 0))
             {
                 for (int i = 0; i < dataByKey.astSkillFuncInfo.Length; i++)
                 {
                     ResDT_SkillFunc func = dataByKey.astSkillFuncInfo[i];
                     if (((((func.dwSkillFuncType == 0x1c) || (func.dwSkillFuncType == 0x21)) || (((func.dwSkillFuncType == 0x36) || (func.dwSkillFuncType == 0x37)) || (func.dwSkillFuncType == 0x1b))) && (func.astSkillFuncParam != null)) && (func.astSkillFuncParam.Length != 0))
                     {
                         int markId  = 0;
                         int skillID = 0;
                         int iParam  = 0;
                         if (func.astSkillFuncParam[0] != null)
                         {
                             markId = func.astSkillFuncParam[0].iParam;
                         }
                         if (func.astSkillFuncParam[1] != null)
                         {
                             skillID = func.astSkillFuncParam[1].iParam;
                         }
                         if (func.astSkillFuncParam[5] != null)
                         {
                             iParam = func.astSkillFuncParam[5].iParam;
                         }
                         if (func.dwSkillFuncType == 0x1c)
                         {
                             this.AnalyseSkillMark(ref loadInfo, markId);
                         }
                         else if (func.dwSkillFuncType == 0x21)
                         {
                             if (combineId != markId)
                             {
                                 this.AnalyseSkillCombine(ref loadInfo, markId);
                             }
                         }
                         else if (func.dwSkillFuncType == 0x36)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, markId);
                         }
                         else if (func.dwSkillFuncType == 0x37)
                         {
                             this.AnalyseSkill(ref loadInfo, skillID);
                         }
                         else if (func.dwSkillFuncType == 0x1b)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, iParam);
                         }
                     }
                 }
             }
         }
     }
 }
Example #2
0
 public void AnalyseSkillCombine(ref ActorPreloadTab loadInfo, int combineId)
 {
     if (combineId > 0)
     {
         ResSkillCombineCfgInfo dataByKey = GameDataMgr.skillCombineDatabin.GetDataByKey((long)combineId);
         if (dataByKey != null)
         {
             if (!this.skillCombineList.Contains((long)combineId))
             {
                 this.skillCombineList.Add((long)combineId);
             }
             AssetLoadBase assetLoadBase = default(AssetLoadBase);
             assetLoadBase.assetPath = StringHelper.UTF8BytesToString(ref dataByKey.szPrefab);
             string checkerKey = this.GetCheckerKey(assetLoadBase.assetPath, loadInfo.MarkID);
             if (!this.ageCheckerSet.ContainsKey(checkerKey))
             {
                 loadInfo.ageActions.Add(assetLoadBase);
                 this.ageCheckerSet.Add(checkerKey, true);
             }
             if (dataByKey.bIsShowBuff == 1 && !string.IsNullOrEmpty(dataByKey.szIconPath))
             {
                 string path = CUIUtility.s_Sprite_Dynamic_Skill_Dir + dataByKey.szIconPath;
                 if (!loadInfo.IsExistsSprite(path))
                 {
                     loadInfo.AddSprite(path);
                 }
             }
             if (dataByKey.astSkillFuncInfo != null && dataByKey.astSkillFuncInfo.Length > 0)
             {
                 for (int i = 0; i < dataByKey.astSkillFuncInfo.Length; i++)
                 {
                     ResDT_SkillFunc resDT_SkillFunc = dataByKey.astSkillFuncInfo[i];
                     if ((resDT_SkillFunc.bSkillFuncType == 28 || resDT_SkillFunc.bSkillFuncType == 33 || resDT_SkillFunc.bSkillFuncType == 54 || resDT_SkillFunc.bSkillFuncType == 55 || resDT_SkillFunc.bSkillFuncType == 27 || resDT_SkillFunc.bSkillFuncType == 84 || resDT_SkillFunc.bSkillFuncType == 32) && resDT_SkillFunc.astSkillFuncParam != null && resDT_SkillFunc.astSkillFuncParam.Length != 0)
                     {
                         int num        = 0;
                         int num2       = 0;
                         int combineId2 = 0;
                         int combineId3 = 0;
                         if (resDT_SkillFunc.astSkillFuncParam[0] != null)
                         {
                             num = resDT_SkillFunc.astSkillFuncParam[0].iParam;
                         }
                         if (resDT_SkillFunc.astSkillFuncParam[1] != null)
                         {
                             num2 = resDT_SkillFunc.astSkillFuncParam[1].iParam;
                         }
                         if (resDT_SkillFunc.astSkillFuncParam[5] != null)
                         {
                             combineId2 = resDT_SkillFunc.astSkillFuncParam[5].iParam;
                         }
                         if (resDT_SkillFunc.astSkillFuncParam[6] != null)
                         {
                             combineId3 = resDT_SkillFunc.astSkillFuncParam[6].iParam;
                         }
                         if (resDT_SkillFunc.bSkillFuncType == 28)
                         {
                             this.AnalyseSkillMark(ref loadInfo, num);
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 33)
                         {
                             if (combineId != num)
                             {
                                 this.AnalyseSkillCombine(ref loadInfo, num);
                             }
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 54)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, num);
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 55)
                         {
                             this.AnalyseSkill(ref loadInfo, num2);
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 27)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, combineId2);
                             this.AnalyseSkillCombine(ref loadInfo, combineId3);
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 84)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, num);
                             this.AnalyseSkillCombine(ref loadInfo, num2);
                         }
                         else if (resDT_SkillFunc.bSkillFuncType == 32)
                         {
                             this.AnalyseSkillCombine(ref loadInfo, combineId3);
                         }
                     }
                 }
             }
         }
     }
 }