示例#1
0
 private static void AddEquipmentAssets(List <string> equipment, List <IAssetVO> assets, IDataController dc)
 {
     if (equipment != null)
     {
         int i     = 0;
         int count = equipment.Count;
         while (i < count)
         {
             EquipmentVO equipmentVO = dc.Get <EquipmentVO>(equipment[i]);
             string[]    effectUids  = equipmentVO.EffectUids;
             if (effectUids != null)
             {
                 int j   = 0;
                 int num = effectUids.Length;
                 while (j < num)
                 {
                     EquipmentEffectVO equipmentEffectVO = dc.Get <EquipmentEffectVO>(effectUids[j]);
                     string[]          buffUids          = equipmentEffectVO.BuffUids;
                     if (buffUids != null)
                     {
                         int k    = 0;
                         int num2 = buffUids.Length;
                         while (k < num2)
                         {
                             ProjectileUtils.AddBuffProjectileAssets(buffUids[k], assets, dc);
                             k++;
                         }
                     }
                     j++;
                 }
             }
             i++;
         }
     }
 }
示例#2
0
 public static void AddProjectileAssets(ProjectileTypeVO ptVO, List <IAssetVO> assets, IDataController dc)
 {
     if (ptVO != null)
     {
         assets.Add(ptVO);
         ProjectileUtils.AddBuffProjectileAssets(ptVO.ApplyBuffs, assets, dc);
     }
 }
示例#3
0
 private static void AddBuffProjectileAssets(string[] buffUids, List <IAssetVO> assets, IDataController dc)
 {
     if (buffUids != null)
     {
         int i   = 0;
         int num = buffUids.Length;
         while (i < num)
         {
             ProjectileUtils.AddBuffProjectileAssets(buffUids[i], assets, dc);
             i++;
         }
     }
 }
示例#4
0
 private static void AddWarBuffAssets(List <string> warBuffs, List <IAssetVO> assets, IDataController dc)
 {
     if (warBuffs != null)
     {
         int i     = 0;
         int count = warBuffs.Count;
         while (i < count)
         {
             WarBuffVO warBuffVO = dc.Get <WarBuffVO>(warBuffs[i]);
             ProjectileUtils.AddBuffProjectileAssets(warBuffVO.TroopBuffUid, assets, dc);
             ProjectileUtils.AddBuffProjectileAssets(warBuffVO.BuildingBuffUid, assets, dc);
             i++;
         }
     }
 }
示例#5
0
        public static void AddTroopProjectileAssets(string troopUid, List <IAssetVO> assets, IDataController dc)
        {
            TroopTypeVO      troopTypeVO    = dc.Get <TroopTypeVO>(troopUid);
            ProjectileTypeVO projectileType = troopTypeVO.ProjectileType;
            ActiveArmory     activeArmory   = Service.Get <CurrentPlayer>().ActiveArmory;

            if (activeArmory != null)
            {
                SkinTypeVO applicableSkin = Service.Get <SkinController>().GetApplicableSkin(troopTypeVO, activeArmory.Equipment);
                if (applicableSkin != null && applicableSkin.Override != null && applicableSkin.Override.ProjectileType != null)
                {
                    projectileType = applicableSkin.Override.ProjectileType;
                }
            }
            ProjectileUtils.AddProjectileAssets(projectileType, assets, dc);
            ProjectileUtils.AddProjectileAssets(troopTypeVO.DeathProjectileType, assets, dc);
            ProjectileUtils.AddBuffProjectileAssets(troopTypeVO.SpawnApplyBuffs, assets, dc);
            if (!string.IsNullOrEmpty(troopTypeVO.Ability))
            {
                TroopAbilityVO troopAbilityVO = dc.Get <TroopAbilityVO>(troopTypeVO.Ability);
                ProjectileUtils.AddProjectileAssets(troopAbilityVO.ProjectileType, assets, dc);
                ProjectileUtils.AddBuffProjectileAssets(troopAbilityVO.SelfBuff, assets, dc);
            }
        }
示例#6
0
 public unsafe static long $Invoke3(long instance, long *args)
 {
     ProjectileUtils.AddBuffProjectileAssets((string[])GCHandledObjects.GCHandleToPinnedArrayObject(*args), (List <IAssetVO>)GCHandledObjects.GCHandleToObject(args[1]), (IDataController)GCHandledObjects.GCHandleToObject(args[2]));
     return(-1L);
 }
示例#7
0
 public unsafe static long $Invoke2(long instance, long *args)
 {
     ProjectileUtils.AddBuffProjectileAssets(Marshal.PtrToStringUni(*(IntPtr *)args), (List <IAssetVO>)GCHandledObjects.GCHandleToObject(args[1]), (IDataController)GCHandledObjects.GCHandleToObject(args[2]));
     return(-1L);
 }