Exemple #1
0
        private static void AddBuildingProjectileAssets(Map map, List <IAssetVO> assets, IDataController dc)
        {
            int i     = 0;
            int count = map.Buildings.Count;

            while (i < count)
            {
                BuildingTypeVO buildingTypeVO = dc.Get <BuildingTypeVO>(map.Buildings[i].Uid);
                if (!string.IsNullOrEmpty(buildingTypeVO.TurretUid))
                {
                    TurretTypeVO turretTypeVO = dc.Get <TurretTypeVO>(buildingTypeVO.TurretUid);
                    ProjectileUtils.AddProjectileAssets(turretTypeVO.ProjectileType, assets, dc);
                }
                if (buildingTypeVO.TrapUid != null)
                {
                    TrapTypeVO trapTypeVO = dc.Get <TrapTypeVO>(buildingTypeVO.TrapUid);
                    if (trapTypeVO.TurretTED != null && !string.IsNullOrEmpty(trapTypeVO.TurretTED.TurretUid))
                    {
                        TurretTypeVO turretTypeVO2 = dc.Get <TurretTypeVO>(trapTypeVO.TurretTED.TurretUid);
                        ProjectileUtils.AddProjectileAssets(turretTypeVO2.ProjectileType, assets, dc);
                    }
                    if (trapTypeVO.ShipTED != null && !string.IsNullOrEmpty(trapTypeVO.ShipTED.SpecialAttackName))
                    {
                        ProjectileUtils.AddSpecialAttackProjectileAssets(trapTypeVO.ShipTED.SpecialAttackName, assets, dc);
                    }
                }
                i++;
            }
        }
Exemple #2
0
        private static void AddSpecialAttackProjectileAssets(string specialAttackUid, List <IAssetVO> assets, IDataController dc)
        {
            SpecialAttackTypeVO specialAttackTypeVO = dc.Get <SpecialAttackTypeVO>(specialAttackUid);

            ProjectileUtils.AddProjectileAssets(specialAttackTypeVO.ProjectileType, assets, dc);
            if (!string.IsNullOrEmpty(specialAttackTypeVO.LinkedUnit))
            {
                ProjectileUtils.AddTroopProjectileAssets(specialAttackTypeVO.LinkedUnit, assets, dc);
            }
        }
Exemple #3
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);
            }
        }
Exemple #4
0
 public unsafe static long $Invoke7(long instance, long *args)
 {
     ProjectileUtils.AddProjectileAssets((ProjectileTypeVO)GCHandledObjects.GCHandleToObject(*args), (List <IAssetVO>)GCHandledObjects.GCHandleToObject(args[1]), (IDataController)GCHandledObjects.GCHandleToObject(args[2]));
     return(-1L);
 }