Skip to content

Commit 69676e3

Browse files
committed
nexus blitz force jg/lane, challenge points editor
and moved patched refund exploit to misc, fixed info name search with spacebars, fixed previous commit indentation
1 parent bd58d61 commit 69676e3

16 files changed

Lines changed: 336 additions & 241 deletions

KBotExt/Auth.cpp

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ DWORD Auth::GetProcessId(const std::wstring& processName)
110110
CloseHandle(snapshot);
111111
return entry.th32ProcessID;
112112
}
113-
}
114-
while (Process32NextW(snapshot, &entry));
113+
} while (Process32NextW(snapshot, &entry));
115114
}
116115
}
117116
CloseHandle(snapshot);
@@ -134,8 +133,7 @@ std::vector<DWORD> Auth::GetAllProcessIds(const std::wstring& processName)
134133
{
135134
pids.emplace_back(entry.th32ProcessID);
136135
}
137-
}
138-
while (Process32NextW(snapshot, &entry));
136+
} while (Process32NextW(snapshot, &entry));
139137
}
140138
}
141139
CloseHandle(snapshot);
@@ -145,13 +143,13 @@ std::vector<DWORD> Auth::GetAllProcessIds(const std::wstring& processName)
145143
std::wstring Auth::GetProcessCommandLine(const DWORD& processId)
146144
{
147145
using tNtQueryInformationProcess = NTSTATUS(__stdcall*)
148-
(
149-
HANDLE ProcessHandle,
150-
ULONG ProcessInformationClass,
151-
PVOID ProcessInformation,
152-
ULONG ProcessInformationLength,
153-
PULONG ReturnLength
154-
);
146+
(
147+
HANDLE ProcessHandle,
148+
ULONG ProcessInformationClass,
149+
PVOID ProcessInformation,
150+
ULONG ProcessInformationLength,
151+
PULONG ReturnLength
152+
);
155153

156154
std::wstring result;
157155
const HANDLE processHandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, processId);
@@ -202,7 +200,7 @@ std::wstring Auth::GetProcessCommandLine(const DWORD& processId)
202200
ZeroMemory(&pbi, sizeof(pbi));
203201

204202
if (const auto NtQueryInformationProcess =
205-
reinterpret_cast<tNtQueryInformationProcess>(GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtWow64QueryInformationProcess64"));
203+
reinterpret_cast<tNtQueryInformationProcess>(GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtWow64QueryInformationProcess64"));
206204
NtQueryInformationProcess(processHandle, 0, &pbi, sizeof(pbi), nullptr) != 0)
207205
{
208206
MessageBoxA(nullptr, "NtQueryInformationProcess failed", nullptr, 0);
@@ -257,14 +255,14 @@ std::wstring Auth::GetProcessCommandLine(const DWORD& processId)
257255
USHORT Length;
258256
USHORT MaximumLength;
259257
PWSTR Buffer;
260-
} UNICODE_STRING, *PUNICODE_STRING [[maybe_unused]];
258+
} UNICODE_STRING, * PUNICODE_STRING [[maybe_unused]];
261259
/*[[maybe_unused]]*/ using PCUNICODE_STRING = const UNICODE_STRING*;
262260

263261
PROCESS_BASIC_INFORMATION pbi;
264262
ZeroMemory(&pbi, sizeof(pbi));
265263

266264
if (const auto NtQueryInformationProcess =
267-
reinterpret_cast<tNtQueryInformationProcess>(GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQueryInformationProcess"));
265+
reinterpret_cast<tNtQueryInformationProcess>(GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQueryInformationProcess"));
268266
NtQueryInformationProcess(processHandle, 0, &pbi, sizeof(pbi), nullptr) != 0)
269267
{
270268
MessageBoxA(nullptr, "NtQueryInformationProcess failed", nullptr, 0);
@@ -310,7 +308,7 @@ std::wstring Auth::GetProcessPath(const DWORD& processId)
310308
if (WCHAR result[MAX_PATH]; GetModuleFileNameExW(processHandle, nullptr, result, MAX_PATH))
311309
{
312310
CloseHandle(processHandle);
313-
return {result};
311+
return { result };
314312
}
315313
CloseHandle(processHandle);
316314
}
@@ -332,12 +330,12 @@ std::string Auth::GetFileVersion(const std::wstring& file)
332330
const DWORD dwFileVersionMS = lpFfi->dwFileVersionMS;
333331
const DWORD dwFileVersionLS = lpFfi->dwFileVersionLS;
334332
std::string result = std::format("{}.{}.{}.{}",
335-
HIWORD(dwFileVersionMS), LOWORD(dwFileVersionMS),
336-
HIWORD(dwFileVersionLS), LOWORD(dwFileVersionLS));
333+
HIWORD(dwFileVersionMS), LOWORD(dwFileVersionMS),
334+
HIWORD(dwFileVersionLS), LOWORD(dwFileVersionLS));
337335
return result;
338336
}
339337
}
340338
}
341339

342340
return "";
343-
}
341+
}

KBotExt/ChampsTab.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class ChampsTab
4848
std::string summId = root["summonerId"].asString();
4949

5050
std::string getChampions = LCU::Request("GET",
51-
std::format("https://127.0.0.1/lol-champions/v1/inventories/{}/champions-minimal",
52-
summId));
51+
std::format("https://127.0.0.1/lol-champions/v1/inventories/{}/champions-minimal",
52+
summId));
5353

5454
if (reader->parse(getChampions.c_str(), getChampions.c_str() + static_cast<int>(getChampions.length()), &root, &err))
5555
{
@@ -89,8 +89,8 @@ class ChampsTab
8989
}
9090

9191
std::string getCollections = LCU::Request("GET",
92-
std::format("https://127.0.0.1/lol-collections/v1/inventories/{}/champion-mastery",
93-
summId));
92+
std::format("https://127.0.0.1/lol-collections/v1/inventories/{}/champion-mastery",
93+
summId));
9494

9595
if (reader->parse(getCollections.c_str(), getCollections.c_str() + static_cast<int>(getCollections.length()), &root, &err))
9696
{
@@ -143,31 +143,31 @@ class ChampsTab
143143
iLastSort = iSort;
144144
switch (iSort)
145145
{
146-
// alphabetically
146+
// alphabetically
147147
case 0:
148148
std::ranges::sort(champsAll, [](const ChampAll& lhs, const ChampAll& rhs) {
149149
return lhs.min.name < rhs.min.name;
150-
});
150+
});
151151
break;
152-
// purchase date
152+
// purchase date
153153
case 1:
154154
std::ranges::sort(champsAll, [](const ChampAll& lhs, const ChampAll& rhs) {
155155
return std::stoll(lhs.min.purchased) < std::stoll(rhs.min.purchased);
156-
});
156+
});
157157
break;
158-
// mastery points
158+
// mastery points
159159
case 2:
160160
std::ranges::sort(champsAll, [](const ChampAll& lhs, const ChampAll& rhs) {
161161
return lhs.mas.championPoints > rhs.mas.championPoints;
162-
});
162+
});
163163
break;
164-
// id
164+
// id
165165
case 3:
166166
std::ranges::sort(champsAll, [](const ChampAll& lhs, const ChampAll& rhs) {
167167
return lhs.min.id < rhs.min.id;
168-
});
168+
});
169169
break;
170-
default: ;
170+
default:;
171171
}
172172
}
173173

@@ -188,7 +188,7 @@ class ChampsTab
188188

189189
const ImVec2 label_size = ImGui::CalcTextSize("W", nullptr, true);
190190
ImGui::InputTextMultiline("##separatorChampsTab", allNamesSeparator, IM_ARRAYSIZE(allNamesSeparator),
191-
ImVec2(0, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f), ImGuiInputTextFlags_AllowTabInput);
191+
ImVec2(0, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f), ImGuiInputTextFlags_AllowTabInput);
192192

193193
ImGui::Separator();
194194
ImGui::Text("Champions owned: %d", iChampsOwned);
@@ -231,14 +231,14 @@ highestGrade: {}
231231
lastPlayTime: {}
232232
playerId: {}
233233
tokensEarned: {})", mas.championLevel, mas.championPoints, mas.championPointsSinceLastLevel,
234-
mas.championPointsUntilNextLevel, mas.chestGranted, mas.formattedChampionPoints, mas.formattedMasteryGoal,
235-
mas.highestGrade, buffer, mas.playerId, mas.tokensEarned);
234+
mas.championPointsUntilNextLevel, mas.chestGranted, mas.formattedChampionPoints, mas.formattedMasteryGoal,
235+
mas.highestGrade, buffer, mas.playerId, mas.tokensEarned);
236236
}
237237

238238
strcpy(input, text.c_str());
239239
ImGui::PushID(inputId.c_str());
240240
ImGui::InputTextMultiline("", input, IM_ARRAYSIZE(input), ImVec2(ImGui::GetWindowSize().x, textHeight),
241-
ImGuiInputTextFlags_ReadOnly);
241+
ImGuiInputTextFlags_ReadOnly);
242242
ImGui::PopID();
243243
}
244244

KBotExt/Config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
struct Settings
1111
{
12-
Settings(): hwnd(nullptr)
12+
Settings() : hwnd(nullptr)
1313
{
1414
}
1515

KBotExt/CustomTab.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ class CustomTab
4949
ImGui::Text("Method:");
5050
const ImVec2 label_size = ImGui::CalcTextSize("W", nullptr, true);
5151
ImGui::InputTextEx("##inputMethod", nullptr, method, IM_ARRAYSIZE(method),
52-
ImVec2(S.Window.width - 130.f, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f), 0, nullptr, nullptr);
52+
ImVec2(S.Window.width - 130.f, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f), 0, nullptr, nullptr);
5353

5454
ImGui::Text("URL:");
5555
ImGui::InputTextMultiline("##inputUrl", urlText, IM_ARRAYSIZE(urlText),
56-
ImVec2(S.Window.width - 130.f, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f));
56+
ImVec2(S.Window.width - 130.f, label_size.y + ImGui::GetStyle().FramePadding.y * 2.0f));
5757

5858
ImGui::Text("Body:");
5959
ImGui::InputTextMultiline("##inputBody", (requestText), IM_ARRAYSIZE(requestText), ImVec2(S.Window.width - 130.f,
60-
(label_size.y + ImGui::GetStyle().FramePadding.y) *
61-
6.f), ImGuiInputTextFlags_AllowTabInput);
60+
(label_size.y + ImGui::GetStyle().FramePadding.y) *
61+
6.f), ImGuiInputTextFlags_AllowTabInput);
6262

6363
S.customTab.method = method;
6464
S.customTab.urlText = urlText;
@@ -108,7 +108,7 @@ class CustomTab
108108
{
109109
if (strlen(method) != 0)
110110
{
111-
std::strcpy(method, Utils::ToUpper(std::string(method)).c_str());
111+
std::strcpy(method, Utils::ToUpper(std::string(method)).c_str());
112112
}
113113
if (strlen(urlText) == 0 || strcmp(urlText, localhostUrl.c_str()) == 0
114114
|| strcmp(urlText, storeUrl.c_str()) == 0 || strcmp(urlText, ledgeUrl.c_str()) == 0)
@@ -165,7 +165,7 @@ class CustomTab
165165

166166
ImGui::Text("Header:");
167167
ImGui::InputTextMultiline("##inputHeader", (inputHeader), IM_ARRAYSIZE(inputHeader), ImVec2(S.Window.width - 130.f,
168-
(label_size.y + ImGui::GetStyle().FramePadding.y) * 6.f), ImGuiInputTextFlags_AllowTabInput);
168+
(label_size.y + ImGui::GetStyle().FramePadding.y) * 6.f), ImGuiInputTextFlags_AllowTabInput);
169169

170170
S.customTab.port = inputPort;
171171
S.customTab.header = inputHeader;
@@ -305,7 +305,7 @@ class CustomTab
305305
{
306306
cResultJson = sResultJson.data();
307307
ImGui::InputTextMultiline("##customResult", cResultJson, sResultJson.size() + 1, ImVec2(S.Window.width - 130.f,
308-
(label_size.y + ImGui::GetStyle().FramePadding.y) * 19.f));
308+
(label_size.y + ImGui::GetStyle().FramePadding.y) * 19.f));
309309
}
310310
}
311311

@@ -342,7 +342,7 @@ class CustomTab
342342
if (ImGui::Button("Submit##submitInvoke"))
343343
{
344344
const std::string req = std::format("https://127.0.0.1/lol-login/v1/session/invoke?destination={0}&method={1}&args=[{2}]",
345-
destination, method, args);
345+
destination, method, args);
346346
result = LCU::Request("POST", req, "");
347347
}
348348

KBotExt/DirectX.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ bool Direct3D11Render::DirectXInit(const HWND hWnd)
3131

3232
//createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
3333
D3D_FEATURE_LEVEL featureLevel;
34-
constexpr D3D_FEATURE_LEVEL featureLevelArray[2] = {D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0,};
34+
constexpr D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, };
3535
if (constexpr UINT createDeviceFlags = 0; D3D11CreateDeviceAndSwapChain(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags,
36-
featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain,
37-
&g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK)
36+
featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain,
37+
&g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK)
3838
return false;
3939

4040
if (!CreateRenderTarget())
@@ -46,7 +46,7 @@ bool Direct3D11Render::DirectXInit(const HWND hWnd)
4646

4747
gamePatch = Misc::GetCurrentPatch();
4848

49-
std::thread t{Misc::GetAllChampionSkins};
49+
std::thread t{ Misc::GetAllChampionSkins };
5050
t.detach();
5151

5252
std::thread AutoAcceptThread(&GameTab::AutoAccept);
@@ -198,7 +198,7 @@ void Direct3D11Render::InitializeFonts()
198198
const ImGuiIO& io = ImGui::GetIO();
199199
(void)io;
200200

201-
static constexpr ImWchar ranges[] = {0x1, 0x1FFFF, 0};
201+
static constexpr ImWchar ranges[] = { 0x1, 0x1FFFF, 0 };
202202
static ImFontConfig cfg;
203203
cfg.OversampleH = cfg.OversampleV = 1;
204204

@@ -219,14 +219,14 @@ void Direct3D11Render::InitializeFonts()
219219
if (is_directory(fontsPath))
220220
{
221221
for (const std::vector<std::string> fonts = {
222-
"seguiemj.ttf", // emojis
223-
"segoeuib.ttf", // cyrillic
224-
"malgunbd.ttf", // korean
225-
"YuGothB.ttc", // japanese
226-
"simsun.ttc", // simplified chinese
227-
"msjh.ttc", // traditional chinese
228-
"seguisym.ttf", // symbols
229-
}; const auto& f : fonts)
222+
"seguiemj.ttf", // emojis
223+
"segoeuib.ttf", // cyrillic
224+
"malgunbd.ttf", // korean
225+
"YuGothB.ttc", // japanese
226+
"simsun.ttc", // simplified chinese
227+
"msjh.ttc", // traditional chinese
228+
"seguisym.ttf", // symbols
229+
}; const auto & f : fonts)
230230
{
231231
if (const std::filesystem::path path = fontsPath / f; exists(path))
232232
{
@@ -332,4 +332,4 @@ void Direct3D11Render::MenuInit()
332332
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
333333
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
334334
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
335-
}
335+
}

0 commit comments

Comments
 (0)