Batch #15141 by ragnarok-clanker: no function's compiled code changes; checked with 537 compiled unit(s), including every includer of Source/Client/Input/LanguageTC.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Replay.h, Source/Client/Session.h, Source/Contents/AchievementMgr.h, Source/Contents/Actors/CharacterRender.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/EnchantMgr.h, Source/Contents/GuildInfo.h, Source/Contents/Messenger/MessengerWindows.h, Source/Contents/Schedule/TimeScheduler.h, Source/Contents/Sound/SoundMgr.h, Source/Contents/SpriteLayerDrawing.h, Source/Contents/TableMng.h, Source/Contents/World/SkyBox.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Text/CreateLineInfo.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl.
61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
#include "Contents/Schedule/CheckGDISchedule.h"
|
|
#include "Contents/Schedule/TimeScheduler.h"
|
|
|
|
#include "Client/Mode/ModeMgr.h"
|
|
#include "Contents/Configuration/ServiceConfiguration.h"
|
|
#include "Contents/MessageTable.h"
|
|
#include "Contents/ShowRankingScheduler.h"
|
|
#include "Network/Connection/Connection.h"
|
|
#include "Network/Connection/ConnectionRuntime.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
#include "Resource/MSGSTRINGID.h"
|
|
#include <cstdlib>
|
|
#include <windows.h>
|
|
|
|
// OFFSET: 0x00BA7FE0
|
|
// FUNCTION: fn_19716
|
|
CCheckGDISchedule::CCheckGDISchedule(const std::uint64_t& timestamp, const std::int64_t& interval, int scheduleType)
|
|
: CSchedule(timestamp, interval, scheduleType, ++g_schedulerSerial, 4) {
|
|
}
|
|
|
|
// OFFSET: 0x00BA81B0
|
|
// FUNCTION: fn_19718
|
|
void CCheckGDISchedule::Process(const std::uint64_t& now) {
|
|
this->CSchedule::Process(now);
|
|
if (CheckConnectionRuntime()) {
|
|
HMODULE gdi32 = LoadLibraryA("gdi32.dll");
|
|
if (gdi32 != nullptr) {
|
|
FARPROC proc = GetProcAddress(gdi32, "TextOutW");
|
|
if (proc != reinterpret_cast<FARPROC>(TextOutW)) {
|
|
FreeLibrary(gdi32);
|
|
goto perform_check;
|
|
}
|
|
FreeLibrary(gdi32);
|
|
}
|
|
if (!IsDebuggerPresent()) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
perform_check:
|
|
if (g_serviceType != 0) {
|
|
return;
|
|
}
|
|
|
|
const int roll = static_cast<int>((static_cast<double>(std::rand()) / 32767.0) * 5.0 + 1.0);
|
|
if (roll != 2 && roll != 4 && roll != 5) {
|
|
return;
|
|
}
|
|
|
|
g_timeScheduler->m_processingStopped = true;
|
|
|
|
if (roll == 2) {
|
|
g_windowMgr.Confirm(LookupMessage(MSI_NPGAMEMON_XP_COMPATIBILITY), 0, true, false, 0, "Message", 280, 120, 0);
|
|
} else if (roll == 4) {
|
|
g_windowMgr.Confirm(LookupMessage(MSI_NPGAMEMON_ERROR_ILLEGAL_PRG), 0, true, false, 0, "Message", 280, 120, 0);
|
|
}
|
|
|
|
GetRagConnection().Close();
|
|
g_modeMgr.Quit();
|
|
}
|