rodecomp/Source/Client/ModeBaseEvents.cpp
ragnarok-clanker 20edea5e20 Decompile fn_17849 (CMode::SendMsg)
Batch #12194 by cremane: 1 byte-identical, 0 confirmed by peer review.

- fn_17849 CMode::SendMsg: byte-identical

Merged automatically: every function is byte-identical to the original.
2026-11-05 12:13:04 +00:00

40 lines
1.1 KiB
C++

#include "Client/Application/ApplicationWindow.h"
#include "Client/Mode/ModeMgr.h"
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Contents/Party/AdventurerAgencyMgr.h"
#include "Contents/UserData/AccountLinkedUserDataMgr.h"
#include "Contents/UserData/CharacterLinkedUserDataMgr.h"
#include <shellapi.h>
// OFFSET: 0x00AD7500
// FUNCTION: fn_17849
int CMode::SendMsg(int event, int argument1, int, int, int) {
switch (event) {
case 2:
g_accountLinkedUserDataMgr->Save();
if (g_modeMgr.state == 1 && g_modeMgr.gameMode) {
g_characterLinkedUserDataMgr->Save();
if (g_modeMgr.state == 1 && g_modeMgr.gameMode) {
g_adventurerAgencyMgr->RequestStop();
}
}
if (g_modeMgr.gameMode) {
g_modeMgr.gameMode->running = 0;
}
if (g_serviceType == 11) {
ShellExecuteA(hWnd, "open", "http://www.ragnarok.co.in/index.php", nullptr, nullptr, SW_SHOWNORMAL);
}
g_modeMgr.running = 0;
break;
case 68:
this->screenshotRequested = 1;
if (const char* text = reinterpret_cast<const char*>(argument1)) {
this->screenshotName = text;
}
break;
}
return 0;
}