Skip to content

Commit

Permalink
fix new url in rune changer
Browse files Browse the repository at this point in the history
  • Loading branch information
KebsCS committed Nov 13, 2022
1 parent 4a5ccfb commit c17f44d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions KBotExt/GameTab.h
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,11 @@ class GameTab

static std::string ChangeRunesOpgg()
{
std::string champSelect = LCU::Request("GET", "/lol-champ-select/v1/session");
if (champSelect.empty() || champSelect.find("RPC_ERROR") != std::string::npos)
{
return "Champion select not found";
}
/* std::string champSelect = LCU::Request("GET", "/lol-champ-select/v1/session");
if (champSelect.empty() || champSelect.find("RPC_ERROR") != std::string::npos)
{
return "Champion select not found";
}*/

Json::CharReaderBuilder builder;
const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
Expand All @@ -957,7 +957,7 @@ class GameTab
//}

std::string currentChampion = LCU::Request("GET", "/lol-champ-select/v1/current-champion");
if (currentChampion == "0")
if (currentChampion == "0" || currentChampion.empty() || currentChampion.find("RPC_ERROR") != std::string::npos)
{
return "Champion not picked";
}
Expand Down Expand Up @@ -989,7 +989,8 @@ class GameTab
if (runes.size() == 9)
break;

if (buf.find("src=\"https://opgg-static.akamaized.net/images/lol/perk") != std::string::npos)
if (buf.find("src=\"https://opgg-static.akamaized.net/images/lol/perk") != std::string::npos
|| buf.find("src=\"https://opgg-static.akamaized.net/meta/images/lol/perk") != std::string::npos)
{
if (buf.find("grayscale") != std::string::npos)
continue;
Expand Down

0 comments on commit c17f44d

Please sign in to comment.