Ejemplo n.º 1
0
        private static void AddDeployablesToList <T>(InventoryStorage storage, List <IAssetVO> assets, List <string> equipment, StaticDataController dc, SkinController skinController) where T : IValueObject
        {
            Dictionary <string, InventoryEntry> internalStorage = storage.GetInternalStorage();

            foreach (KeyValuePair <string, InventoryEntry> current in internalStorage)
            {
                MapDataLoaderUtils.AddDeployableToList <T>(current.Key, current.Value.Amount, assets, equipment, dc, skinController);
            }
        }
Ejemplo n.º 2
0
 private static void AddDeployablesToList <T>(Dictionary <string, int> deployables, List <IAssetVO> assets, List <string> equipment, StaticDataController dc, SkinController skinController) where T : IValueObject
 {
     if (deployables != null)
     {
         foreach (KeyValuePair <string, int> current in deployables)
         {
             MapDataLoaderUtils.AddDeployableToList <T>(current.Key, current.Value, assets, equipment, dc, skinController);
         }
     }
 }
Ejemplo n.º 3
0
        private static void AddSummonableVisitorsToList(BattleInitializationData battleData, StaticDataController idc, List <IAssetVO> assets, SkinController sc)
        {
            List <string> list  = new List <string>();
            List <string> list2 = new List <string>();
            List <string> list3 = new List <string>();

            if (battleData.AttackerEquipment != null)
            {
                list3.AddRange(battleData.AttackerEquipment);
            }
            if (battleData.DefenderEquipment != null)
            {
                list3.AddRange(battleData.DefenderEquipment);
            }
            int count = list3.Count;

            for (int i = 0; i < count; i++)
            {
                EquipmentVO equipmentVO = idc.Get <EquipmentVO>(list3[i]);
                int         num         = equipmentVO.EffectUids.Length;
                for (int j = 0; j < num; j++)
                {
                    EquipmentEffectVO equipmentEffectVO = idc.Get <EquipmentEffectVO>(equipmentVO.EffectUids[j]);
                    int num2 = equipmentEffectVO.BuffUids.Length;
                    for (int k = 0; k < num2; k++)
                    {
                        BuffTypeVO buffTypeVO = idc.Get <BuffTypeVO>(equipmentEffectVO.BuffUids[k]);
                        if (buffTypeVO.Modify == BuffModify.Summon)
                        {
                            SummonDetailsVO summonDetailsVO = idc.Get <SummonDetailsVO>(buffTypeVO.Details);
                            int             num3            = summonDetailsVO.VisitorUids.Length;
                            for (int l = 0; l < num3; l++)
                            {
                                string        item  = summonDetailsVO.VisitorUids[l];
                                List <string> list4 = (summonDetailsVO.VisitorType != VisitorType.Troop) ? list2 : list;
                                if (!list4.Contains(item))
                                {
                                    list4.Add(item);
                                }
                            }
                        }
                    }
                }
            }
            int m      = 0;
            int count2 = list.Count;

            while (m < count2)
            {
                MapDataLoaderUtils.AddDeployableToList <TroopTypeVO>(list[m], 1, assets, list3, idc, sc);
                m++;
            }
            int n      = 0;
            int count3 = list2.Count;

            while (n < count3)
            {
                MapDataLoaderUtils.AddDeployableToList <SpecialAttackTypeVO>(list2[n], 1, assets, list3, idc, sc);
                n++;
            }
        }