From 729c3973b8d7471cde4968c14117451b731a958f Mon Sep 17 00:00:00 2001 From: rjindael Date: Sat, 29 Jul 2023 15:49:52 -0700 Subject: [PATCH] chore: merge 8e673e1 -> 5bde979 from prod --- Kiseki.Patcher/Source/Hooks/CRoblox.cpp | 32 ++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Kiseki.Patcher/Source/Hooks/CRoblox.cpp b/Kiseki.Patcher/Source/Hooks/CRoblox.cpp index c3ebc6d..6729493 100644 --- a/Kiseki.Patcher/Source/Hooks/CRoblox.cpp +++ b/Kiseki.Patcher/Source/Hooks/CRoblox.cpp @@ -20,10 +20,32 @@ CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam = (CRobl BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this) { + if (!CRobloxApp__InitInstance(_this)) + { + return FALSE; + } + #ifdef PLAYER +#ifdef _DEBUG + if (!hasAuthenticationUrl) + { + MessageBoxA(nullptr, "Missing authentication URL", "Kiseki", MB_OK | MB_ICONERROR); + } + + if (!hasAuthenticationTicket) + { + MessageBoxA(nullptr, "Missing authentication ticket", "Kiseki", MB_OK | MB_ICONERROR); + } + + if (!hasJoinScriptUrl) + { + MessageBoxA(nullptr, "Missing join script URL", "Kiseki", MB_OK | MB_ICONERROR); + } +#endif + if (!hasAuthenticationUrl || !hasAuthenticationTicket || !hasJoinScriptUrl) { - ShellExecute(0, 0, L"https://kiseki.lol/games", 0, 0, SW_SHOW); + ShellExecuteW(0, 0, L"https://kiseki.lol/games", 0, 0, SW_SHOW); return FALSE; } #endif @@ -31,15 +53,13 @@ BOOL __fastcall CRobloxApp__InitInstance_hook(CRobloxApp* _this) #ifdef SERVER if (!hasJobId) { +#ifdef _DEBUG + MessageBoxA(nullptr, "Missing job ID", "Kiseki", MB_OK | MB_ICONERROR); +#endif return FALSE; } #endif - if (!CRobloxApp__InitInstance(_this)) - { - return FALSE; - } - CApp* app = reinterpret_cast(CLASSLOCATION_CAPP); if (hasAuthenticationUrl && hasAuthenticationTicket && !authenticationUrl.empty() && !authenticationTicket.empty())