Ejemplo n.º 1
0
 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);
             }
         }
     }
 }
Ejemplo n.º 2
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     MapDataLoaderUtils.AddSpawnEffect((TroopTypeVO)GCHandledObjects.GCHandleToObject(*args), (List <IAssetVO>)GCHandledObjects.GCHandleToObject(args[1]), (IDataController)GCHandledObjects.GCHandleToObject(args[2]));
     return(-1L);
 }