Skip to content

Commit

Permalink
wow pr #100 merged
Browse files Browse the repository at this point in the history
offsets auto update
  • Loading branch information
ByteCorum authored Aug 23, 2024
2 parents 12aa2c0 + 6110bc5 commit e9a7fe4
Show file tree
Hide file tree
Showing 42 changed files with 8,575 additions and 7,035 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ DragonBurn/OS-ImGui/* linguist-vendored
DragonBurn/OS-ImGui/imgui/* linguist-vendored
DragonBurn/OS-ImGui/stb/* linguist-vendored
DragonBurn/Libs/* linguist-vendored
DragonBurn/Libs/json/* linguist-vendored
DragonBurn/Libs/json/* linguist-vendored
DragonBurn/Libs/curl/include/curl/* linguist-vendored
DragonBurn/Libs/zlib/include/* linguist-vendored
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,4 @@ FodyWeavers.xsd
*.sln.iml
DragonBurn/imgui.ini
DragonBurn/settings.yml
DragonBurn/prefs.ini
38 changes: 28 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ set_target_properties(DragonBurn PROPERTIES
OUTPUT_NAME "DragonBurn"
RUNTIME_OUTPUT_DIRECTORY "built")

# Include Directories
set(INCLUDE_DIRS
Config
Core
Features
Game
Helpers
Offsets
OS-ImGui/imgui
OS-ImGui
Resources
Libs/json
)

# Add an executable from source files
add_executable(DragonBurn
DragonBurn/main.cpp
Expand Down Expand Up @@ -66,9 +80,8 @@ add_executable(DragonBurn
DragonBurn/Helpers/Mouse.h
DragonBurn/Helpers/Random.h
DragonBurn/Libs/json.hpp
DragonBurn/Offsets/Client.hpp
DragonBurn/Offsets/Offsets.h
DragonBurn/Offsets/Offsets.hpp
DragonBurn/Offsets/Offsets.cpp
DragonBurn/OS-ImGui/OS-ImGui.cpp
DragonBurn/OS-ImGui/OS-ImGui.h
DragonBurn/OS-ImGui/OS-ImGui_Base.cpp
Expand Down Expand Up @@ -100,11 +113,19 @@ add_executable(DragonBurn
DragonBurn/Resources/WeaponIcon.h
)

# Additional configuration
target_include_directories(DragonBurn
PRIVATE
DragonBurn/Libs
DragonBurn/OS-ImGui)
# Linking with Curl
find_package(CURL REQUIRED)
target_link_libraries(DragonBurn ${CURL_LIBRARIES})
include_directories(${CURL_INCLUDE_DIRS})

# Include OS-ImGui headers
include_directories(${OS-ImGui_INCLUDE_DIRS})

# Linking with JSON
include_directories(${json_INCLUDE_DIRS})

# Target Executable
add_executable(DragonBurn ${SOURCE_FILES})

target_sources(DragonBurn
PRIVATE
Expand All @@ -115,6 +136,3 @@ add_custom_command(
COMMAND windres DragonBurn/AssemblyInfo.rc
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
link_directories(${CMAKE_CURRENT_BINARY_DIR})


target_link_libraries(DragonBurn AssemblyInfo.res)
Binary file modified DragonBurn/AssemblyInfo.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion DragonBurn/Config/ConfigSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace MyConfigSaver
json ConfigData;

ConfigData["0"]["Name"] = "DragonBurn";
ConfigData["0"]["Version"] = "1.0.2.1";
ConfigData["0"]["Version"] = "1.0.3.0";
ConfigData["0"]["Author"] = author;


Expand Down
2 changes: 1 addition & 1 deletion DragonBurn/Core/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void Cheats::Run()
{
bool HasHelmet;
ImVec2 ArmorBarPos;
ProcessMgr.ReadMemory(Entity.Controller.Address + Offset::PlayerController.HasHelmet, HasHelmet);
ProcessMgr.ReadMemory(Entity.Controller.Address + Offset.PlayerController.HasHelmet, HasHelmet);
if (ESPConfig::ShowHealthBar)
ArmorBarPos = { Rect.x - 10.f,Rect.y };
else
Expand Down
22 changes: 11 additions & 11 deletions DragonBurn/Core/GlobalVars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,55 +36,55 @@ bool globalvars::UpdateGlobalvars()

bool globalvars::GetRealTime()
{
return GetDataAddressWithOffset<float>(this->address, Offset::GlobalVar.RealTime, this->g_fRealTime);
return GetDataAddressWithOffset<float>(this->address, Offset.GlobalVar.RealTime, this->g_fRealTime);
}

bool globalvars::GetFrameCount()
{
return GetDataAddressWithOffset<int>(this->address, Offset::GlobalVar.FrameCount, this->g_iFrameCount);
return GetDataAddressWithOffset<int>(this->address, Offset.GlobalVar.FrameCount, this->g_iFrameCount);
}

bool globalvars::GetMaxClients()
{
return GetDataAddressWithOffset<int>(this->address, Offset::GlobalVar.MaxClients, this->g_iMaxClients);
return GetDataAddressWithOffset<int>(this->address, Offset.GlobalVar.MaxClients, this->g_iMaxClients);
}

bool globalvars::GetTickCount()
{
return GetDataAddressWithOffset<int>(this->address, Offset::GlobalVar.TickCount, this->g_iTickCount);
return GetDataAddressWithOffset<int>(this->address, Offset.GlobalVar.TickCount, this->g_iTickCount);
}

bool globalvars::GetIntervalPerTick()
{
return GetDataAddressWithOffset<float>(this->address, Offset::GlobalVar.IntervalPerTick, this->g_fIntervalPerTick);
return GetDataAddressWithOffset<float>(this->address, Offset.GlobalVar.IntervalPerTick, this->g_fIntervalPerTick);
}

bool globalvars::GetIntervalPerTick2()
{
return GetDataAddressWithOffset<float>(this->address, Offset::GlobalVar.IntervalPerTick2, this->g_fIntervalPerTick2);
return GetDataAddressWithOffset<float>(this->address, Offset.GlobalVar.IntervalPerTick2, this->g_fIntervalPerTick2);
}

bool globalvars::GetcurrentTime()
{
return GetDataAddressWithOffset<float>(this->address, Offset::GlobalVar.CurrentTime, this->g_fCurrentTime);
return GetDataAddressWithOffset<float>(this->address, Offset.GlobalVar.CurrentTime, this->g_fCurrentTime);
}

bool globalvars::GetcurrentTime2()
{
return GetDataAddressWithOffset<float>(this->address, Offset::GlobalVar.CurrentTime2, this->g_fCurrentTime2);
return GetDataAddressWithOffset<float>(this->address, Offset.GlobalVar.CurrentTime2, this->g_fCurrentTime2);
}

bool globalvars::GetCurrentNetchan()
{
return GetDataAddressWithOffset<void*>(this->address, Offset::GlobalVar.CurrentNetchan, this->g_vCurrentNetchan);
return GetDataAddressWithOffset<void*>(this->address, Offset.GlobalVar.CurrentNetchan, this->g_vCurrentNetchan);
}

bool globalvars::GetCurrentMap()
{
return GetDataAddressWithOffset<char*>(this->address, Offset::GlobalVar.CurrentMap, this->g_cCurrentMap);
return GetDataAddressWithOffset<char*>(this->address, Offset.GlobalVar.CurrentMap, this->g_cCurrentMap);
}

bool globalvars::GetCurrentMapName()
{
return GetDataAddressWithOffset<char*>(this->address, Offset::GlobalVar.CurrentMapName, this->g_cCurrentMapName);
return GetDataAddressWithOffset<char*>(this->address, Offset.GlobalVar.CurrentMapName, this->g_cCurrentMapName);
}
86 changes: 43 additions & 43 deletions DragonBurn/Core/Init.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,49 +70,49 @@ namespace Init
}

// Checks cs2 version
static int CheckCS2Version()
{
DWORD pid = ProcessMgr.GetProcessID("cs2.exe");
long long curVer = -1;
std::string processPath;
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
if (hProcess)
{
wchar_t buffer[MAX_PATH];
if (GetModuleFileNameEx(hProcess, NULL, buffer, MAX_PATH))
processPath = WStringToString(buffer);
else
return 0;
CloseHandle(hProcess);
}
else
return 0;

int pos = processPath.rfind("bin");
if (pos != std::string::npos)
processPath = processPath.substr(0, pos + 3);
else
return 0;
processPath += "\\built_from_cl.txt";

std::ifstream file(processPath);
if (file.is_open())
{
std::string line;
if (std::getline(file, line))
curVer = stoi(line);
else
return 0;
file.close();
}
else
return 0;

if (Offset::CS2ver == curVer)
return 2;
else
return 1;
}
//static int CheckCS2Version()
//{
// DWORD pid = ProcessMgr.GetProcessID("cs2.exe");
// long long curVer = -1;
// std::string processPath;
// HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
// if (hProcess)
// {
// wchar_t buffer[MAX_PATH];
// if (GetModuleFileNameEx(hProcess, NULL, buffer, MAX_PATH))
// processPath = WStringToString(buffer);
// else
// return 0;
// CloseHandle(hProcess);
// }
// else
// return 0;

// int pos = processPath.rfind("bin");
// if (pos != std::string::npos)
// processPath = processPath.substr(0, pos + 3);
// else
// return 0;
// processPath += "\\built_from_cl.txt";

// std::ifstream file(processPath);
// if (file.is_open())
// {
// std::string line;
// if (std::getline(file, line))
// curVer = stoi(line);
// else
// return 0;
// file.close();
// }
// else
// return 0;

// if (Offset.CS2ver == curVer)
// return 2;
// else
// return 1;
//}

// Check if the game window is activated
static bool isGameWindowActive() {
Expand Down
19 changes: 11 additions & 8 deletions DragonBurn/DragonBurn.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,19 @@
<OutDir>$(SolutionDir)\built\</OutDir>
<IntDir>built\</IntDir>
<RunCodeAnalysis>false</RunCodeAnalysis>
<IncludePath>Libs\json;$(IncludePath)</IncludePath>
<ExternalIncludePath>Libs\json;$(ExternalIncludePath)</ExternalIncludePath>
<IncludePath>Libs\json;Libs\zlib\include;Libs\curl\include</IncludePath>
<ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
<TargetName>DragonBurn</TargetName>
<LibraryPath>Libs\zlib\lib;Libs\curl\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)\built\</OutDir>
<IntDir>built\</IntDir>
<RunCodeAnalysis>false</RunCodeAnalysis>
<IncludePath>Libs\json;$(IncludePath)</IncludePath>
<ExternalIncludePath>Libs\json;$(ExternalIncludePath)</ExternalIncludePath>
<IncludePath>Libs\json;Libs\zlib\include;Libs\curl\include</IncludePath>
<ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
<TargetName>DragonBurn</TargetName>
<LibraryPath>Libs\zlib\lib;Libs\curl\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down Expand Up @@ -136,13 +138,14 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CURL_STATICLIB;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libcurl.lib;Ws2_32.lib;Crypt32.lib;Wldap32.lib;Normaliz.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -151,7 +154,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>CURL_STATICLIB;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
Expand All @@ -160,6 +163,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libcurl.lib;Ws2_32.lib;Crypt32.lib;Wldap32.lib;Normaliz.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down Expand Up @@ -189,9 +193,7 @@
<ClInclude Include="Helpers\GetWeaponIcon.h" />
<ClInclude Include="Helpers\Mouse.h" />
<ClInclude Include="Helpers\Random.h" />
<ClInclude Include="Offsets\Client.hpp" />
<ClInclude Include="Offsets\Offsets.h" />
<ClInclude Include="Offsets\Offsets.hpp" />
<ClInclude Include="OS-ImGui\imgui\imconfig.h" />
<ClInclude Include="OS-ImGui\imgui\imgui.h" />
<ClInclude Include="OS-ImGui\imgui\imgui_impl_dx11.h" />
Expand Down Expand Up @@ -233,6 +235,7 @@
<ClCompile Include="Game\Game.cpp" />
<ClCompile Include="Helpers\Mouse.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="Offsets\Offsets.cpp" />
<ClCompile Include="OS-ImGui\imgui\imgui.cpp" />
<ClCompile Include="OS-ImGui\imgui\imgui_demo.cpp" />
<ClCompile Include="OS-ImGui\imgui\imgui_draw.cpp" />
Expand Down
9 changes: 3 additions & 6 deletions DragonBurn/DragonBurn.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,9 @@
<ClInclude Include="Config\ConfigMenu.hpp">
<Filter>Config</Filter>
</ClInclude>
<ClInclude Include="Offsets\Offsets.hpp">
<Filter>Offsets</Filter>
</ClInclude>
<ClInclude Include="Offsets\Offsets.h">
<Filter>Offsets</Filter>
</ClInclude>
<ClInclude Include="Offsets\Client.hpp">
<Filter>Offsets</Filter>
</ClInclude>
<ClInclude Include="Features\Aimbot.h">
<Filter>Features\Aim</Filter>
</ClInclude>
Expand Down Expand Up @@ -268,5 +262,8 @@
<ClCompile Include="Features\Aimbot.cpp">
<Filter>Features\Aim</Filter>
</ClCompile>
<ClCompile Include="Offsets\Offsets.cpp">
<Filter>Offsets</Filter>
</ClCompile>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion DragonBurn/Features/Aimbot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void AimControl::AimBot(const CEntity& Local, Vec3 LocalPos, std::vector<Vec3>&
if (AimControl::ScopeOnly)
{
bool isScoped;
ProcessMgr.ReadMemory<bool>(Local.Pawn.Address + Offset::Pawn.isScoped, isScoped);
ProcessMgr.ReadMemory<bool>(Local.Pawn.Address + Offset.Pawn.isScoped, isScoped);
if (!isScoped and TriggerBot::CheckScopeWeapon(Local))
{
HasTarget = false;
Expand Down
Loading

0 comments on commit e9a7fe4

Please sign in to comment.