Exemple #1
0
 public MasteryStatic(JArray descriptionA,
                      int id,
                      JObject imageO,
                      string name,
                      string prereq,
                      int?ranks,
                      JArray sanitizedDescriptionA)
 {
     description          = new List <string>();
     sanitizedDescription = new List <string>();
     if (descriptionA != null)
     {
         this.description = HelperMethods.LoadStrings(descriptionA);
     }
     this.id = id;
     if (imageO != null)
     {
         this.image = HelperMethods.LoadImageStatic(imageO);
     }
     this.name   = name;
     this.prereq = prereq;
     this.ranks  = ranks;
     if (sanitizedDescriptionA != null)
     {
         this.sanitizedDescription = HelperMethods.LoadStrings(sanitizedDescriptionA);
     }
 }
 public LevelTipStatic(JArray effectA, JArray labelA)
 {
     effect      = new List <string>();
     label       = new List <string>();
     this.effect = HelperMethods.LoadStrings(effectA);
     this.label  = HelperMethods.LoadStrings(labelA);
 }
 public ItemTreeStatic(string header,
                       JArray tagsA)
 {
     tags        = new List <string>();
     this.header = header;
     if (tagsA != null)
     {
         tags = HelperMethods.LoadStrings(tagsA);
     }
 }
Exemple #4
0
 public Shard(string hostname,
              JArray localesA,
              string name,
              string regionTag,
              string slug)
 {
     this.hostname = hostname;
     if (localesA != null)
     {
         this.locales = HelperMethods.LoadStrings(localesA);
     }
     this.name      = name;
     this.regionTag = regionTag;
     this.slug      = slug;
 }
Exemple #5
0
        public async Task <List <string> > RetrieveVersions(CreepScore.Region region)
        {
            Url url = UrlConstants.StaticDataUrlBuilder(region, UrlConstants.versionsPart);

            url.SetQueryParams(new
            {
                api_key = apiKey
            });
            Uri uri = new Uri(url.ToString());

            string responseString;

            try
            {
                responseString = await GetWebData(uri);
            }
            catch (CreepScoreException)
            {
                throw;
            }
            return(HelperMethods.LoadStrings(JArray.Parse(responseString)));
        }
 public ChampionSpellStatic(JArray altImagesA,
                            JArray cooldownA,
                            string cooldownBurn,
                            JArray costA,
                            string costBurn,
                            string costType,
                            string description,
                            JArray effectA,
                            JArray effectBurnA,
                            JObject imageO,
                            string key,
                            JObject levelTipO,
                            int maxRank,
                            string name,
                            object range,
                            string rangeBurn,
                            string resource,
                            string sanitizedDescription,
                            string sanitizedTooltip,
                            string tooltip,
                            JArray varsA)
 {
     altImages  = new List <ImageStatic>();
     cooldown   = new List <double>();
     cost       = new List <int>();
     effect     = new List <List <double> >();
     effectBurn = new List <string>();
     rangeList  = new List <int>();
     vars       = new List <SpellVarsStatic>();
     if (altImagesA != null)
     {
         LoadAltImages(altImagesA);
     }
     LoadCooldowns(cooldownA);
     this.cooldownBurn = cooldownBurn;
     LoadCosts(costA);
     this.costBurn    = costBurn;
     this.costType    = costType;
     this.description = description;
     if (effectA != null)
     {
         LoadEffects(effectA);
     }
     if (effectBurnA != null)
     {
         this.effectBurn = HelperMethods.LoadStrings(effectBurnA);
     }
     this.image    = LoadImage(imageO);
     this.key      = key;
     this.levelTip = LoadLevelTip(levelTipO);
     this.maxRank  = maxRank;
     this.name     = name;
     if (range.GetType() == typeof(JValue))
     {
         rangeString = ((JValue)range).ToString();
     }
     else
     {
         LoadRanges((JArray)range);
     }
     this.rangeBurn            = rangeBurn;
     this.resource             = resource;
     this.sanitizedDescription = sanitizedDescription;
     this.sanitizedTooltip     = sanitizedTooltip;
     this.tooltip = tooltip;
     if (varsA != null)
     {
         LoadVars(varsA);
     }
 }
Exemple #7
0
 public ChampionStatic(JArray allyTipsA,
                       string blurb,
                       JArray enemyTipsA,
                       int id,
                       JObject imageO,
                       JObject infoO,
                       string key,
                       string lore,
                       string name,
                       string parType,
                       JObject passiveO,
                       JArray recommendedA,
                       JArray skinsA,
                       JArray spellsA,
                       JObject statsO,
                       JArray tagsA,
                       string title)
 {
     System.Diagnostics.Debug.WriteLine(name);
     allyTips    = new List <string>();
     enemyTips   = new List <string>();
     recommended = new List <RecommendedStatic>();
     skins       = new List <SkinStatic>();
     spells      = new List <ChampionSpellStatic>();
     tags        = new List <string>();
     if (allyTipsA != null)
     {
         allyTips = HelperMethods.LoadStrings(allyTipsA);
     }
     this.blurb = blurb;
     if (enemyTipsA != null)
     {
         enemyTips = HelperMethods.LoadStrings(enemyTipsA);
     }
     this.id = id;
     if (imageO != null)
     {
         this.image = HelperMethods.LoadImageStatic(imageO);
     }
     if (infoO != null)
     {
         this.info = LoadInfo(infoO);
     }
     this.key     = key;
     this.lore    = lore;
     this.name    = name;
     this.parType = parType;
     if (passiveO != null)
     {
         this.passive = LoadPassive(passiveO);
     }
     if (recommendedA != null)
     {
         LoadRecommended(recommendedA);
     }
     if (skinsA != null)
     {
         LoadSkins(skinsA);
     }
     if (spellsA != null)
     {
         LoadSpells(spellsA);
     }
     if (statsO != null)
     {
         this.stats = LoadStats(statsO);
     }
     if (tagsA != null)
     {
         tags = HelperMethods.LoadStrings(tagsA);
     }
     this.title = title;
 }
Exemple #8
0
 public BasicDataStatic(string colloq,
                        bool?consumeOnFull,
                        bool?consumed,
                        int?depth,
                        string description,
                        JArray fromA,
                        JObject goldO,
                        string group,
                        bool?hideFromAll,
                        int id,
                        JObject imageO,
                        bool?inStore,
                        JArray intoA,
                        JObject maps,
                        string name,
                        string plainText,
                        string requiredChampion,
                        JObject runeO,
                        string sanitizedDescription,
                        int?specialRecipe,
                        int?stacks,
                        JObject statsO,
                        JArray tagsA)
 {
     from               = new List <string>();
     into               = new List <string>();
     this.maps          = new Dictionary <string, bool>();
     tags               = new List <string>();
     this.colloq        = colloq;
     this.consumeOnFull = consumeOnFull;
     this.consumed      = consumed;
     this.depth         = depth;
     this.description   = description;
     if (fromA != null)
     {
         this.from = HelperMethods.LoadStrings(fromA);
     }
     if (goldO != null)
     {
         LoadGold(goldO);
     }
     this.group       = group;
     this.hideFromAll = hideFromAll;
     this.id          = id;
     if (imageO != null)
     {
         this.image = HelperMethods.LoadImageStatic(imageO);
     }
     this.inStore = inStore;
     if (intoA != null)
     {
         this.into = HelperMethods.LoadStrings(intoA);
     }
     if (maps != null)
     {
         this.maps = JsonConvert.DeserializeObject <Dictionary <string, bool> >(maps.ToString());
     }
     this.name             = name;
     this.plainText        = plainText;
     this.requiredChampion = requiredChampion;
     if (runeO != null)
     {
         this.rune = HelperMethods.LoadMetaDataStatic(runeO);
     }
     this.sanitizedDescription = sanitizedDescription;
     this.stacks = stacks;
     if (statsO != null)
     {
         LoadBasicDataStats(statsO);
     }
     if (tagsA != null)
     {
         this.tags = HelperMethods.LoadStrings(tagsA);
     }
 }