Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
- Add auto multi-search
- Bump version
[build]
  • Loading branch information
BennyExtreme committed Jan 22, 2024
1 parent 29091dc commit d2de656
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions KBotExt/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct Settings
{
size_t indexFirstRole = 0;
size_t indexSecondRole = 0;
bool autoMultiSearch = false;
size_t indexMultiSearch = 0;
bool autoAcceptEnabled = false;
int instalockEnabled = 0;
Expand Down Expand Up @@ -134,6 +135,7 @@ class Config

root["gameTab"]["indexFirstRole"] = S.gameTab.indexFirstRole;
root["gameTab"]["indexSecondRole"] = S.gameTab.indexSecondRole;
root["gameTab"]["autoMultiSearch"] = S.gameTab.autoMultiSearch;
root["gameTab"]["indexMultiSearch"] = S.gameTab.indexMultiSearch;
root["gameTab"]["autoAcceptEnabled"] = S.gameTab.autoAcceptEnabled;
root["gameTab"]["instalockEnabled"] = S.gameTab.instalockEnabled;
Expand Down Expand Up @@ -228,6 +230,8 @@ class Config
S.gameTab.indexFirstRole = t.asUInt();
if (auto t = root["gameTab"]["indexSecondRole"]; !t.empty())
S.gameTab.indexSecondRole = t.asUInt();
if (auto t = root["gameTab"]["autoMultiSearch"]; !t.empty())
S.gameTab.autoMultiSearch = t.asBool();
if (auto t = root["gameTab"]["indexMultiSearch"]; !t.empty())
S.gameTab.indexMultiSearch = t.asUInt();
if (auto t = root["gameTab"]["autoAcceptEnabled"]; !t.empty())
Expand Down
11 changes: 10 additions & 1 deletion KBotExt/GameTab.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ class GameTab
"OP.GG", "U.GG", "PORO.GG", "Porofessor.gg"
};
const char* selectedMultiSearch = itemsMultiSearch[S.gameTab.indexMultiSearch].c_str();


ImGui::Checkbox("Auto", &S.gameTab.autoMultiSearch);
ImGui::SameLine();
if (ImGui::Button("Multi-Search"))
{
result = MultiSearch(itemsMultiSearch[S.gameTab.indexMultiSearch]);
Expand Down Expand Up @@ -1018,6 +1020,13 @@ class GameTab
std::thread instantMessageThread(&GameTab::InstantMessage, S.gameTab.instantMute, S.gameTab.sideNotification);
instantMessageThread.detach();
}

if (S.gameTab.autoMultiSearch) {
static std::vector<std::string> itemsMultiSearch = {
"OP.GG", "U.GG", "PORO.GG", "Porofessor.gg"
};
MultiSearch(itemsMultiSearch[S.gameTab.indexMultiSearch]);
}
}

if ((S.gameTab.instalockEnabled != 0 || S.gameTab.autoBanId) && !isPicked)
Expand Down
2 changes: 1 addition & 1 deletion KBotExt/Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class Misc
{
public:
static inline std::string programVersion = "1.4.9";
static inline std::string programVersion = "1.5.0";
static inline std::string latestVersion;

static bool LaunchClient(const std::string& args)
Expand Down

0 comments on commit d2de656

Please sign in to comment.