private static void AddDeployableToList <T>(string uid, int amount, List <IAssetVO> assets, List <string> equipment, StaticDataController dc, SkinController skinController) where T : IValueObject { if (amount > 0) { IAssetVO assetVO = dc.GetOptional <T>(uid) as IAssetVO; if (assetVO != null) { if (assetVO is TroopTypeVO) { TroopTypeVO troopTypeVO = (TroopTypeVO)assetVO; MapDataLoaderUtils.AddSpawnEffect(troopTypeVO, assets, dc); MapDataLoaderUtils.AddPlanetAttachments(troopTypeVO, assets, dc); SkinTypeVO applicableSkin = skinController.GetApplicableSkin(troopTypeVO, equipment); if (applicableSkin != null) { assetVO = applicableSkin; } } for (int i = 0; i < amount; i++) { assets.Add(assetVO); } } } }