forked from maikel233/xhook_wowclassic_TBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGInterface.cpp
60 lines (44 loc) · 1.08 KB
/
GInterface.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "GInterface.h"
void GInterface::WaitForReload()
{
if (Globals::Registered && !WoWObjectManager::InGame())
{
Globals::Registered = false;
}
Sleep(100);
if (!Globals::Registered && WoWObjectManager::InGame())
{
Globals::Registered = true;
Sleep(1000);
}
}
void GInterface::Init(HMODULE hModule)
{
// Console
FILE* pFile = nullptr;
AllocConsole();
freopen_s(&pFile, "CONOUT$", "w", stdout);
// Removed IncommingCrashWarning
// Removed AntiCrashHandler
thread(Monitor, hModule).detach();
}
void GInterface::Monitor(HMODULE hModule)
{
while (!Globals::SafeToExit)
WaitForReload();
Sleep(100);
// Removed AntiCrashHandler
FreeConsole();
//menu's
Settings::bot::fishing::Enabled = false;
Settings::bot::Grinding::Enabled = false;
Settings::Drawing::Enabled = false;
Settings::Drawing::Radar::Enabled = false;
Settings::Drawing::EntityViewer::Enabled = false;
Settings::UI::Windows::Menu::GetInvItems = false;
//GameMethods::Cooldowns.clear();
Globals::LocalPlayer = nullptr;
Globals::Objects.clear();
delete Globals::Nav;
FreeLibrary(hModule);
}