private void FindImageQuery(string input, ListNamesAssets champ) { string inputlower = input.ToLower(); bool blankCard = cardCodeText.text.StartsWith(cardCodeDefaultText); // Passive IMG if (inputlower.EndsWith(" p") || inputlower.EndsWith("passive")) { UploadSpell(p, passiveURL); return; } // Spell IMGs if (inputlower.EndsWith(" q")) { UploadSpell(q, spellURL); return; } if (inputlower.EndsWith(" w")) { UploadSpell(w, spellURL); return; } if (inputlower.EndsWith(" e")) { UploadSpell(e, spellURL); return; } if (inputlower.EndsWith(" r")) { UploadSpell(r, spellURL); return; } // Skin Images for (int i = skins.Count - 1; i >= 1; i--) { string skinName = skins[i]; foreach (string s in champ.names) { skinName = skinName.Replace(" " + s, ""); skinName = skinName.Replace(s + " ", ""); } if (inputlower.Replace(" ", "").Contains(skinName.ToLower().Replace(" ", ""))) { UploadSkin(i); return; } } // Else load default skin string defaultSkin = activeChampion + "_0.jpg"; uploader.GetWebImage(splashURL + defaultSkin, defaultSkin); // Push champ into title if (blankCard) { blankChampPushEvent.Invoke(); } }