├── .clang-format ├── .clang-tidy ├── .editorconfig ├── .github └── workflows │ └── cmake.yml ├── .gitignore ├── AutoitLauncher └── Inject.au3 ├── CMakeLists.txt ├── CMakePresets.json ├── CMakeSettings.json ├── CONTRIBUTING.md ├── Core ├── CMakeLists.txt ├── EmbeddedResource.h ├── Event.cpp ├── Event.h ├── File.cpp ├── File.h ├── Path.cpp ├── Path.h ├── Str.cpp ├── Str.h ├── Thread.cpp ├── Thread.h ├── stdafx.cpp └── stdafx.h ├── Dependencies ├── GWCA │ ├── bin │ │ └── gwca.dll │ ├── include │ │ └── GWCA │ │ │ ├── Constants │ │ │ ├── AgentIDs.h │ │ │ ├── Constants.h │ │ │ ├── ItemIDs.h │ │ │ ├── Maps.h │ │ │ ├── QuestIDs.h │ │ │ └── Skills.h │ │ │ ├── Context │ │ │ ├── AccountContext.h │ │ │ ├── AgentContext.h │ │ │ ├── CharContext.h │ │ │ ├── Cinematic.h │ │ │ ├── GadgetContext.h │ │ │ ├── GameContext.h │ │ │ ├── GameplayContext.h │ │ │ ├── GuildContext.h │ │ │ ├── ItemContext.h │ │ │ ├── MapContext.h │ │ │ ├── PartyContext.h │ │ │ ├── PreGameContext.h │ │ │ ├── TextParser.h │ │ │ ├── TradeContext.h │ │ │ └── WorldContext.h │ │ │ ├── GWCA.h │ │ │ ├── GWCAVersion.h │ │ │ ├── GameContainers │ │ │ ├── Array.h │ │ │ ├── GamePos.h │ │ │ └── List.h │ │ │ ├── GameEntities │ │ │ ├── Agent.h │ │ │ ├── Attribute.h │ │ │ ├── Camera.h │ │ │ ├── Frame.h │ │ │ ├── Friendslist.h │ │ │ ├── Guild.h │ │ │ ├── Hero.h │ │ │ ├── Item.h │ │ │ ├── Map.h │ │ │ ├── Match.h │ │ │ ├── NPC.h │ │ │ ├── Party.h │ │ │ ├── Pathing.h │ │ │ ├── Player.h │ │ │ ├── Quest.h │ │ │ ├── Skill.h │ │ │ └── Title.h │ │ │ ├── Managers │ │ │ ├── AgentMgr.h │ │ │ ├── CameraMgr.h │ │ │ ├── ChatMgr.h │ │ │ ├── EffectMgr.h │ │ │ ├── EventMgr.h │ │ │ ├── FriendListMgr.h │ │ │ ├── GameThreadMgr.h │ │ │ ├── GuildMgr.h │ │ │ ├── ItemMgr.h │ │ │ ├── MapMgr.h │ │ │ ├── MemoryMgr.h │ │ │ ├── MerchantMgr.h │ │ │ ├── Module.h │ │ │ ├── PartyMgr.h │ │ │ ├── PlayerMgr.h │ │ │ ├── QuestMgr.h │ │ │ ├── RenderMgr.h │ │ │ ├── SkillbarMgr.h │ │ │ ├── StoCMgr.h │ │ │ ├── TradeMgr.h │ │ │ └── UIMgr.h │ │ │ ├── Packets │ │ │ ├── Opcodes.h │ │ │ └── StoC.h │ │ │ ├── Utilities │ │ │ ├── Debug.h │ │ │ ├── Export.h │ │ │ ├── FileScanner.h │ │ │ ├── Hook.h │ │ │ ├── Hooker.h │ │ │ ├── Macros.h │ │ │ ├── MemoryPatcher.h │ │ │ └── Scanner.h │ │ │ └── stdafx.h │ └── lib │ │ └── gwca.lib ├── easywsclient │ ├── easywsclient.cpp │ └── easywsclient.hpp ├── nativefiledialog │ ├── LICENSE │ ├── README.md │ ├── common.h │ ├── include │ │ └── nfd.h │ ├── nfd_cocoa.m │ ├── nfd_common.c │ ├── nfd_common.h │ ├── nfd_gtk.c │ ├── nfd_win.cpp │ ├── nfd_zenity.c │ └── simple_exec.h └── wintoast │ ├── wintoastlib.cpp │ └── wintoastlib.h ├── GWToolbox ├── CMakeLists.txt ├── Download.cpp ├── Download.h ├── GWToolbox.rc ├── Inject.cpp ├── Inject.h ├── Install.cpp ├── Install.h ├── Process.cpp ├── Process.h ├── Registry.cpp ├── Registry.h ├── Settings.cpp ├── Settings.h ├── Window.cpp ├── Window.h ├── main.cpp ├── resource.h ├── stdafx.cpp └── stdafx.h ├── GWToolboxdll ├── CMakeLists.txt ├── CircurlarBuffer.h ├── Color.h ├── Constants │ └── EncStrings.h ├── Defines.h ├── GWToolbox.cpp ├── GWToolbox.h ├── GWToolbox.rc ├── IRC.cpp ├── IRC.h ├── ImGuiAddons.cpp ├── ImGuiAddons.h ├── Keys.h ├── Logger.cpp ├── Logger.h ├── Modules │ ├── AprilFools.cpp │ ├── AprilFools.h │ ├── AudioSettings.cpp │ ├── AudioSettings.h │ ├── ChatCommands.cpp │ ├── ChatCommands.h │ ├── ChatFilter.cpp │ ├── ChatFilter.h │ ├── ChatSettings.cpp │ ├── ChatSettings.h │ ├── CodeOptimiserModule.cpp │ ├── CodeOptimiserModule.h │ ├── CrashHandler.cpp │ ├── CrashHandler.h │ ├── DialogModule.cpp │ ├── DialogModule.h │ ├── DiscordModule.cpp │ ├── DiscordModule.h │ ├── ExtraWeaponSets.cpp │ ├── ExtraWeaponSets.h │ ├── GameSettings.cpp │ ├── GameSettings.h │ ├── GuildWarsSettingsModule.cpp │ ├── GuildWarsSettingsModule.h │ ├── GwDatTextureModule.cpp │ ├── GwDatTextureModule.h │ ├── HallOfMonumentsModule.cpp │ ├── HallOfMonumentsModule.h │ ├── HeroEquipmentModule.cpp │ ├── HeroEquipmentModule.h │ ├── HintsModule.cpp │ ├── HintsModule.h │ ├── InventoryManager.cpp │ ├── InventoryManager.h │ ├── ItemDescriptionHandler.cpp │ ├── ItemDescriptionHandler.h │ ├── ItemFilter.cpp │ ├── ItemFilter.h │ ├── KeyboardLanguageFix.cpp │ ├── KeyboardLanguageFix.h │ ├── LoginModule.cpp │ ├── LoginModule.h │ ├── MouseFix.cpp │ ├── MouseFix.h │ ├── MouseWalkingModule.cpp │ ├── MouseWalkingModule.h │ ├── NPCVoiceModule.cpp │ ├── NPCVoiceModule.h │ ├── Obfuscator.cpp │ ├── Obfuscator.h │ ├── ObserverModule.cpp │ ├── ObserverModule.h │ ├── PartyBroadcastModule.cpp │ ├── PartyBroadcastModule.h │ ├── PartyWindowModule.cpp │ ├── PartyWindowModule.h │ ├── PluginModule.cpp │ ├── PluginModule.h │ ├── PriceCheckerModule.cpp │ ├── PriceCheckerModule.h │ ├── QuestModule.cpp │ ├── QuestModule.h │ ├── ResignLogModule.cpp │ ├── ResignLogModule.h │ ├── Resources.cpp │ ├── Resources.h │ ├── SalvageInfoModule.cpp │ ├── SalvageInfoModule.h │ ├── Teamspeak5Module.cpp │ ├── Teamspeak5Module.h │ ├── TeamspeakModule.cpp │ ├── TeamspeakModule.h │ ├── ToastNotifications.cpp │ ├── ToastNotifications.h │ ├── ToolboxSettings.cpp │ ├── ToolboxSettings.h │ ├── ToolboxTheme.cpp │ ├── ToolboxTheme.h │ ├── TwitchModule.cpp │ ├── TwitchModule.h │ ├── Updater.cpp │ ├── Updater.h │ ├── VendorFix.cpp │ └── VendorFix.h ├── Timer.h ├── ToolboxBreakoutWindow.cpp ├── ToolboxBreakoutWindow.h ├── ToolboxIni.cpp ├── ToolboxIni.h ├── ToolboxModule.cpp ├── ToolboxModule.h ├── ToolboxUIElement.cpp ├── ToolboxUIElement.h ├── ToolboxWidget.cpp ├── ToolboxWidget.h ├── ToolboxWindow.cpp ├── ToolboxWindow.h ├── Unused │ ├── ChatLog.cpp │ ├── ChatLog.h │ ├── DialogsWindow.cpp │ ├── DialogsWindow.h │ ├── GWDatBrowser │ │ ├── AtexAsm.cpp │ │ ├── AtexAsm.h │ │ ├── AtexReader.cpp │ │ ├── AtexReader.h │ │ ├── xentax.cpp │ │ └── xentax.h │ ├── GWFileRequester.cpp │ ├── GWFileRequester.h │ ├── InventoryOverlayWidget.cpp │ ├── InventoryOverlayWidget.h │ ├── ZrawDeepModule.cpp │ └── ZrawDeepModule.h ├── Utf8.cpp ├── Utf8.h ├── Utils │ ├── ArenaNetFileParser.cpp │ ├── ArenaNetFileParser.h │ ├── FontLoader.cpp │ ├── FontLoader.h │ ├── GuiUtils.cpp │ ├── GuiUtils.h │ ├── RateLimiter.cpp │ ├── RateLimiter.h │ ├── TextUtils.cpp │ ├── TextUtils.h │ ├── ToolboxUtils.cpp │ ├── ToolboxUtils.h │ └── toolbox_default_font.h ├── Widgets │ ├── ActiveQuestWidget.cpp │ ├── ActiveQuestWidget.h │ ├── AlcoholWidget.cpp │ ├── AlcoholWidget.h │ ├── BondsWidget.cpp │ ├── BondsWidget.h │ ├── ClockWidget.cpp │ ├── ClockWidget.h │ ├── DistanceWidget.cpp │ ├── DistanceWidget.h │ ├── EffectsMonitorWidget.cpp │ ├── EffectsMonitorWidget.h │ ├── HealthWidget.cpp │ ├── HealthWidget.h │ ├── InventoryOverlayWidget.cpp │ ├── InventoryOverlayWidget.h │ ├── LatencyWidget.cpp │ ├── LatencyWidget.h │ ├── Minimap │ │ ├── AgentRenderer.cpp │ │ ├── AgentRenderer.h │ │ ├── CustomRenderer.cpp │ │ ├── CustomRenderer.h │ │ ├── D3DVertex.h │ │ ├── EffectRenderer.cpp │ │ ├── EffectRenderer.h │ │ ├── GameWorldRenderer.cpp │ │ ├── GameWorldRenderer.h │ │ ├── Minimap.cpp │ │ ├── Minimap.h │ │ ├── PingsLinesRenderer.cpp │ │ ├── PingsLinesRenderer.h │ │ ├── PmapRenderer.cpp │ │ ├── PmapRenderer.h │ │ ├── RangeRenderer.cpp │ │ ├── RangeRenderer.h │ │ ├── Shaders │ │ │ ├── constant_colour_ps.hlsl │ │ │ ├── game_world_renderer_dotted_ps.hlsl │ │ │ ├── game_world_renderer_ps.hlsl │ │ │ └── game_world_renderer_vs.hlsl │ │ ├── SymbolsRenderer.cpp │ │ ├── SymbolsRenderer.h │ │ └── VBuffer.h │ ├── MissionMapWidget.cpp │ ├── MissionMapWidget.h │ ├── PartyDamage.cpp │ ├── PartyDamage.h │ ├── ServerInfoWidget.cpp │ ├── ServerInfoWidget.h │ ├── SkillMonitorWidget.cpp │ ├── SkillMonitorWidget.h │ ├── SkillbarWidget.cpp │ ├── SkillbarWidget.h │ ├── SnapsToPartyWindow.cpp │ ├── SnapsToPartyWindow.h │ ├── TimerWidget.cpp │ ├── TimerWidget.h │ ├── VanquishWidget.cpp │ ├── VanquishWidget.h │ ├── WorldMapWidget.cpp │ └── WorldMapWidget.h ├── Windows │ ├── ArmoryWindow.cpp │ ├── ArmoryWindow.h │ ├── ArmoryWindow_Constants.h │ ├── BuildsWindow.cpp │ ├── BuildsWindow.h │ ├── CompletionWindow.cpp │ ├── CompletionWindow.h │ ├── CompletionWindow_Constants.h │ ├── DailyQuestsWindow.cpp │ ├── DailyQuestsWindow.h │ ├── DoorMonitorWindow.cpp │ ├── DoorMonitorWindow.h │ ├── DupingWindow.cpp │ ├── DupingWindow.h │ ├── EnemyWindow.cpp │ ├── EnemyWindow.h │ ├── FactionLeaderboardWindow.cpp │ ├── FactionLeaderboardWindow.h │ ├── FriendListWindow.cpp │ ├── FriendListWindow.h │ ├── GuildWarsPreferencesWindow.cpp │ ├── GuildWarsPreferencesWindow.h │ ├── HeroBuildsWindow.cpp │ ├── HeroBuildsWindow.h │ ├── Hotkeys.cpp │ ├── Hotkeys.h │ ├── HotkeysWindow.cpp │ ├── HotkeysWindow.h │ ├── InfoWindow.cpp │ ├── InfoWindow.h │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── MaterialsWindow.cpp │ ├── MaterialsWindow.h │ ├── NotePadWindow.cpp │ ├── NotePadWindow.h │ ├── ObjectiveTimerWindow.cpp │ ├── ObjectiveTimerWindow.h │ ├── ObserverExportWindow.cpp │ ├── ObserverExportWindow.h │ ├── ObserverPartyWindow.cpp │ ├── ObserverPartyWindow.h │ ├── ObserverPlayerWindow.cpp │ ├── ObserverPlayerWindow.h │ ├── ObserverTargetWindow.cpp │ ├── ObserverTargetWindow.h │ ├── PacketLoggerWindow.cpp │ ├── PacketLoggerWindow.h │ ├── PartySearchWindow.cpp │ ├── PartySearchWindow.h │ ├── PartyStatisticsWindow.cpp │ ├── PartyStatisticsWindow.h │ ├── Pathfinding │ │ ├── MapSpecificData.h │ │ ├── MathUtility.cpp │ │ ├── MathUtility.h │ │ ├── PathfindingWindow.cpp │ │ ├── PathfindingWindow.h │ │ ├── Pathing.cpp │ │ └── Pathing.h │ ├── Pcons.cpp │ ├── Pcons.h │ ├── PconsWindow.cpp │ ├── PconsWindow.h │ ├── RerollWindow.cpp │ ├── RerollWindow.h │ ├── SettingsWindow.cpp │ ├── SettingsWindow.h │ ├── SkillListingWindow.cpp │ ├── SkillListingWindow.h │ ├── StringDecoderWindow.cpp │ ├── StringDecoderWindow.h │ ├── TargetInfoWindow.cpp │ ├── TargetInfoWindow.h │ ├── TradeWindow.cpp │ ├── TradeWindow.h │ ├── TravelWindow.cpp │ ├── TravelWindow.h │ └── TravelWindowConstants.h ├── base64.cpp ├── base64.h ├── imconfig.h ├── imgui_impl_dx9.cpp ├── imgui_impl_dx9.h ├── imgui_impl_win32.cpp ├── imgui_impl_win32.h ├── main.cpp ├── mp3.cpp ├── mp3.h ├── resource.h ├── sha1.cpp ├── sha1.hpp ├── stdafx.cpp └── stdafx.h ├── LICENSE ├── README.md ├── RestClient ├── CMakeLists.txt ├── CurlWrapper.cpp ├── CurlWrapper.h ├── RestClient.cpp ├── RestClient.h ├── stdafx.cpp └── stdafx.h ├── UPDATE.md ├── cmake ├── directxtex.cmake ├── easywsclient.cmake ├── gwca.cmake ├── gwdatbrowser.cmake ├── gwtoolboxdll_plugins.cmake ├── imgui.cmake ├── imgui_fonts.cmake ├── nativefiledialog.cmake ├── patches │ └── imgui_transparent_viewports.patch └── wintoast.cmake ├── docs ├── .travis.yml ├── CNAME ├── Gemfile ├── _config.yml ├── _layouts │ └── default.html ├── _sass │ ├── fonts.scss │ ├── jekyll-theme-midnight.scss │ ├── normalize.scss │ └── rouge-base16-dark.scss ├── armory_window.md ├── assets │ ├── css │ │ ├── ie.scss │ │ └── style.scss │ ├── fonts │ │ ├── OpenSans-Bold-webfont.eot │ │ ├── OpenSans-Bold-webfont.svg │ │ ├── OpenSans-Bold-webfont.ttf │ │ ├── OpenSans-Bold-webfont.woff │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ ├── OpenSans-BoldItalic-webfont.svg │ │ ├── OpenSans-BoldItalic-webfont.ttf │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ ├── OpenSans-Italic-webfont.eot │ │ ├── OpenSans-Italic-webfont.svg │ │ ├── OpenSans-Italic-webfont.ttf │ │ ├── OpenSans-Italic-webfont.woff │ │ ├── OpenSans-Light-webfont.eot │ │ ├── OpenSans-Light-webfont.svg │ │ ├── OpenSans-Light-webfont.ttf │ │ ├── OpenSans-Light-webfont.woff │ │ ├── OpenSans-LightItalic-webfont.eot │ │ ├── OpenSans-LightItalic-webfont.svg │ │ ├── OpenSans-LightItalic-webfont.ttf │ │ ├── OpenSans-LightItalic-webfont.woff │ │ ├── OpenSans-Regular-webfont.eot │ │ ├── OpenSans-Regular-webfont.svg │ │ ├── OpenSans-Regular-webfont.ttf │ │ ├── OpenSans-Regular-webfont.woff │ │ ├── OpenSans-Semibold-webfont.eot │ │ ├── OpenSans-Semibold-webfont.svg │ │ ├── OpenSans-Semibold-webfont.ttf │ │ ├── OpenSans-Semibold-webfont.woff │ │ ├── OpenSans-SemiboldItalic-webfont.eot │ │ ├── OpenSans-SemiboldItalic-webfont.svg │ │ ├── OpenSans-SemiboldItalic-webfont.ttf │ │ └── OpenSans-SemiboldItalic-webfont.woff │ ├── images │ │ ├── bullet.png │ │ ├── hr.gif │ │ └── nav-bg.gif │ └── js │ │ └── respond.js ├── builds.md ├── camera.md ├── chat.md ├── chatfilter.md ├── chatlog.md ├── commands.md ├── completion.md ├── credits.md ├── damage_monitor.md ├── dialogs.md ├── duping_window.md ├── enemy_window.md ├── faq.md ├── favicon.ico ├── hallofmonuments.md ├── herobuilds.md ├── history.md ├── hotkeys.md ├── index.md ├── info.md ├── input_modules.md ├── integrations.md ├── items.md ├── jekyll-theme-midnight.gemspec ├── materials.md ├── minimap.md ├── misc_widgets.md ├── party_window.md ├── pcons.md ├── plugins.md ├── quest.md ├── reroll.md ├── script │ ├── bootstrap │ ├── cibuild │ └── release ├── settings.md ├── target_widgets.md ├── theme.md ├── trade.md ├── travel.md ├── widgets.md └── windows.md ├── plugins ├── Base │ ├── PluginUtils.cpp │ ├── PluginUtils.h │ ├── ToolboxPlugin.cpp │ ├── ToolboxPlugin.h │ ├── ToolboxUIPlugin.cpp │ ├── ToolboxUIPlugin.h │ ├── dllmain.cpp │ └── stl.h └── ExamplePlugin │ ├── ExamplePlugin.cpp │ └── ExamplePlugin.h ├── resources ├── Font.ttf ├── Font_ChineseTraditional.ttf ├── Font_Cyrillic.ttf ├── Font_Japanese.ttf ├── Font_Korean.ttf ├── GWToolbox.ini ├── Markers.ini ├── discord_game_sdk.dll ├── gwtoolbox.ico ├── heros │ ├── hero_1.jpg │ ├── hero_10.jpg │ ├── hero_11.jpg │ ├── hero_12.jpg │ ├── hero_13.jpg │ ├── hero_14.jpg │ ├── hero_15.jpg │ ├── hero_16.jpg │ ├── hero_17.jpg │ ├── hero_18.jpg │ ├── hero_19.jpg │ ├── hero_2.jpg │ ├── hero_20.jpg │ ├── hero_21.jpg │ ├── hero_22.jpg │ ├── hero_23.jpg │ ├── hero_24.jpg │ ├── hero_25.jpg │ ├── hero_26.jpg │ ├── hero_27.jpg │ ├── hero_3.jpg │ ├── hero_36.jpg │ ├── hero_37.jpg │ ├── hero_4.jpg │ ├── hero_5.jpg │ ├── hero_6.jpg │ ├── hero_7.jpg │ ├── hero_8.jpg │ └── hero_9.jpg ├── icons │ ├── airplane.png │ ├── cupcake.png │ ├── dialogue.png │ ├── feather.png │ ├── info.png │ ├── keyboard.png │ ├── list.png │ ├── notepad.png │ ├── party.png │ ├── settings.png │ └── trade.png └── location_logs_to_polygons.py ├── vcpkg-configuration.json ├── vcpkg-overlays ├── ports │ └── wolfssl │ │ ├── portfile.cmake │ │ └── vcpkg.json └── triplets │ └── x86-windows-mixed.cmake └── vcpkg.json /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: '*,-performance-no-int-to-ptr,-misc-unused-parameters,-android*,-readability-non-const-parameter,-modernize-use-trailing-return-type,-bugprone-bool-pointer-implicit-conversion' 2 | WarningsAsErrors: true 3 | CheckOptions: 4 | - key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField 5 | value: '0' 6 | - key: modernize-loop-convert.MaxCopySize 7 | value: '4' 8 | - key: modernize-loop-convert.MinConfidence 9 | value: safe 10 | - key: modernize-use-auto.MinTypeNameLength 11 | value: 0 12 | - key: modernize-use-auto.RemoveStars 13 | value: 1 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ 2 | .idea 3 | 4 | # Build directories 5 | Debug/ 6 | Release/ 7 | RelWithDebInfo/ 8 | ipch/ 9 | Archive/ 10 | vcpkg_installed/ 11 | ./bin/ 12 | 13 | # Cmake generated 14 | _deps/ 15 | *.vcxproj 16 | *.vcxproj.filters 17 | *.sln 18 | *CMakeFiles* 19 | CMakeCache.txt 20 | *cmake_install.cmake 21 | *.tlog 22 | *.recipe 23 | *.res 24 | 25 | # Bloated Windows Databases 26 | *.sdf 27 | *.opensdf 28 | *.suo 29 | *.exp 30 | *.db 31 | *.pdb 32 | *.idb 33 | *.ilk 34 | *.opendb 35 | *.log 36 | *.lastbuildstate 37 | 38 | # Compiled files 39 | *.slo 40 | *.lo 41 | *.o 42 | *.obj 43 | *.exe 44 | *.wxs 45 | *.wixobj 46 | *.msi 47 | *_ps.h 48 | *_vs.h 49 | 50 | # Precompiled Headers 51 | *.gch 52 | *.pch 53 | *.idb 54 | *.pdb 55 | *.opendb 56 | *.wixpdb 57 | 58 | # Visual studio stuff 59 | *.user 60 | 61 | Dependencies/OSHGui/Include 62 | docs/_site/ 63 | Gemfile.lock 64 | GWToolbox/~*.tmp 65 | GWToolbox.aps 66 | 67 | # Sublime Text stuff 68 | *.sublime-project* 69 | *.sublime-workspace* 70 | .vs/ 71 | build/ 72 | 73 | # VSCode stuff 74 | .vscode/ 75 | .aider* 76 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "configurePresets": [ 4 | { 5 | "name": "vcpkg", 6 | "generator": "Visual Studio 17 2022", 7 | "architecture": "Win32", 8 | "binaryDir": "${sourceDir}/build", 9 | "cacheVariables": { 10 | "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", 11 | "VCPKG_OVERLAY_PORTS": "${sourceDir}/vcpkg-overlays/ports", 12 | "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-overlays/triplets", 13 | "VCPKG_TARGET_TRIPLET": "x86-windows-mixed" 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /CMakeSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "x86-Debug", 5 | "generator": "Visual Studio 17 2022", 6 | "configurationType": "Debug", 7 | "inheritEnvironments": [ "msvc_x86" ], 8 | "buildRoot": "${projectDir}\\out\\build\\${name}", 9 | "installRoot": "${projectDir}\\out\\install\\${name}", 10 | "cmakeCommandArgs": "", 11 | "buildCommandArgs": "", 12 | "ctestCommandArgs": "" 13 | }, 14 | { 15 | "name": "x86-Release", 16 | "generator": "Visual Studio 17 2022", 17 | "configurationType": "Release", 18 | "inheritEnvironments": [ "msvc_x86" ], 19 | "buildRoot": "${projectDir}\\out\\build\\${name}", 20 | "installRoot": "${projectDir}\\out\\install\\${name}", 21 | "cmakeCommandArgs": "", 22 | "buildCommandArgs": "", 23 | "ctestCommandArgs": "" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | FILE(GLOB SOURCES 3 | "*.h" 4 | "*.cpp") 5 | 6 | add_library(Core) 7 | target_sources(Core PRIVATE ${SOURCES}) 8 | target_precompile_headers(Core PRIVATE "stdafx.h") 9 | target_include_directories(Core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") 10 | -------------------------------------------------------------------------------- /Core/File.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "File.h" 4 | 5 | bool WriteEntireFile(const wchar_t* FilePath, const void* Content, size_t Length) 6 | { 7 | HANDLE hFile = CreateFileW( 8 | FilePath, 9 | GENERIC_WRITE, 10 | 0, 11 | nullptr, 12 | CREATE_ALWAYS, 13 | 0, 14 | nullptr); 15 | 16 | if (hFile == INVALID_HANDLE_VALUE) { 17 | fprintf(stderr, "Failed open file '%ls' (%lu)\n", FilePath, GetLastError()); 18 | return false; 19 | } 20 | 21 | DWORD BytesWritten; 22 | auto Buffer = reinterpret_cast(Content); 23 | 24 | // 25 | // We don't early quit, because there is a difference between writing a empty 26 | // file and not writing the file at all. The file could already exist, in which 27 | // case it would be "cleared" and if it doesn't exist, it would be created. 28 | // 29 | while (Length != 0) { 30 | const size_t BytesToWrite = std::min(Length, static_cast(-1)); 31 | const DWORD dwBytesToWrite = BytesToWrite; 32 | 33 | const BOOL Success = WriteFile( 34 | hFile, 35 | Buffer, 36 | dwBytesToWrite, 37 | &BytesWritten, 38 | nullptr); 39 | 40 | if (!Success || BytesWritten != dwBytesToWrite) { 41 | fprintf(stderr, "Failed to write %lu bytes to file '%ls' (%lu)\n", 42 | dwBytesToWrite, FilePath, GetLastError()); 43 | CloseHandle(hFile); 44 | return false; 45 | } 46 | 47 | Length -= dwBytesToWrite; 48 | Buffer += dwBytesToWrite; 49 | } 50 | 51 | CloseHandle(hFile); 52 | return true; 53 | } 54 | -------------------------------------------------------------------------------- /Core/File.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool WriteEntireFile(const wchar_t* Path, const void* Content, size_t Length); 4 | -------------------------------------------------------------------------------- /Core/Path.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // is_directory without catch; returns false on failure 6 | bool PathIsDirectorySafe(const std::filesystem::path& path, bool* out); 7 | // directory_iterator without catch; returns false on failure 8 | bool PathDirectoryIteratorSafe(const std::filesystem::path& path, std::filesystem::directory_iterator* out); 9 | // exists without catch; returns false on failure 10 | bool PathExistsSafe(const std::filesystem::path& path, bool* out); 11 | 12 | // Get absolute path of current running executable 13 | bool PathGetExeFullPath(std::filesystem::path& out); 14 | // Get basename of current running executable 15 | bool PathGetExeFileName(std::wstring& out); 16 | 17 | bool PathGetProgramDirectory(std::filesystem::path& out); 18 | 19 | bool PathGetDocumentsPath(std::filesystem::path& out, const wchar_t* suffix); 20 | 21 | // create_directories without catch; returns false on failure 22 | bool PathCreateDirectorySafe(const std::filesystem::path& path); 23 | 24 | // Performs manually recursive copy. Useful for figuring out which file is in use when using std::filesystem::copy on a directory fails. 25 | bool PathSafeCopy(const std::filesystem::path& from, const std::filesystem::path& to, bool copy_if_target_is_newer = false); 26 | 27 | // Performs manually recursive remove. Useful for figuring out which file is in use when std::filesystem::remove_all fails. 28 | // This function will be MUCH slower than doing remove_all 29 | bool PathRecursiveRemove(const std::filesystem::path& from); 30 | 31 | bool PathGetComputerName(std::filesystem::path& out); 32 | -------------------------------------------------------------------------------- /Core/Str.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | int StrSprintf(std::string& out, const char* fmt, ...); 5 | int StrSwprintf(std::wstring& out, const wchar_t* fmt, ...); 6 | int StrVsprintf(std::string& out, const char* fmt, va_list args); 7 | int StrVswprintf(std::wstring& out, const wchar_t* fmt, va_list args); 8 | 9 | void StrCopyA(char* dest, size_t size, const char* src); 10 | void StrCopyW(wchar_t* dest, size_t size, const wchar_t* src); 11 | 12 | void StrAppendA(char* dest, size_t size, const char* src); 13 | void StrAppendW(wchar_t* dest, size_t size, const wchar_t* src); 14 | 15 | size_t StrLenA(const char* str); 16 | size_t StrLenW(const wchar_t* str); 17 | 18 | size_t StrBytesA(const char* str); 19 | size_t StrBytesW(const wchar_t* str); 20 | -------------------------------------------------------------------------------- /Core/Thread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Thread { 4 | public: 5 | Thread(); 6 | Thread(const Thread&) = delete; 7 | Thread& operator=(const Thread&) = delete; 8 | 9 | virtual ~Thread(); 10 | 11 | bool StartThread(); 12 | 13 | void Join(); 14 | bool Join(uint32_t TimeoutMs) const; 15 | 16 | bool Alive() const; 17 | 18 | uint32_t GetExitCode() const; 19 | void SetThreadName(const char* name); 20 | 21 | private: 22 | void* m_Handle; 23 | uint32_t m_ThreadId; 24 | char m_ThreadName[256]; 25 | 26 | private: 27 | virtual void Run() = 0; 28 | 29 | static unsigned long __stdcall ThreadEntry(void* param); 30 | __declspec(noreturn) static void Exit(uint32_t ErrorCode); 31 | }; 32 | -------------------------------------------------------------------------------- /Core/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /Core/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef WIN32_LEAN_AND_MEAN 4 | # define WIN32_LEAN_AND_MEAN 5 | #endif 6 | #ifndef NOMINMAX 7 | # define NOMINMAX 8 | #endif 9 | #ifdef NDEBUG 10 | #define assert(expression) (expression) 11 | #endif 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | -------------------------------------------------------------------------------- /Dependencies/GWCA/bin/gwca.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/Dependencies/GWCA/bin/gwca.dll -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/AccountContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace GW { 7 | struct AccountContext; 8 | GWCA_API AccountContext* GetAccountContext(); 9 | 10 | struct AccountUnlockedCount { 11 | uint32_t id; 12 | uint32_t unk1; 13 | uint32_t unk2; 14 | }; 15 | 16 | struct AccountUnlockedItemInfo { 17 | uint32_t name_id; 18 | uint32_t mod_struct_index; // Used to find mod struct in unlocked_pvp_items_mod_structs... 19 | uint32_t mod_struct_size; 20 | }; 21 | 22 | struct AccountContext { 23 | /* +h0000 */ Array account_unlocked_counts; // e.g. number of unlocked storage panes 24 | /* +h0010 */ uint8_t h0010[0xA4]; 25 | /* +h00b4 */ Array unlocked_pvp_heros; // Unused, hero battles is no more :( 26 | /* +h00c4 */ Array h00c4;// If an item is unlocked, the mod struct is stored here. Use unlocked_pvp_items_info to find the index. Idk why, chaos reigns I guess 27 | /* +h00e4 */ Array unlocked_pvp_item_info; // If an item is unlocked, the details are stored here 28 | /* +h00f4 */ Array unlocked_pvp_items; // Bitwise array of which pvp items are unlocked 29 | /* +h0104 */ uint8_t h0104[0x30]; // Some arrays, some linked lists, meh 30 | /* +h0124 */ Array unlocked_account_skills; // List of skills unlocked (but not learnt) for this account, i.e. skills that heros can use, tomes can unlock 31 | /* +h0134 */ uint32_t account_flags; 32 | }; 33 | static_assert(sizeof(AccountContext) == 0x138); 34 | } 35 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/Cinematic.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace GW { 4 | struct Cinematic { 5 | /* +h0000 */ uint32_t h0000; 6 | /* +h0004 */ uint32_t h0004; // pointer to data 7 | // ... 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/GadgetContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | struct GadgetInfo { 7 | /* +h0000 */ uint32_t h0000; 8 | /* +h0004 */ uint32_t h0004; 9 | /* +h0008 */ uint32_t h0008; 10 | /* +h000C */ wchar_t *name_enc; 11 | }; 12 | 13 | struct GadgetContext { 14 | /* +h0000 */ Array GadgetInfo; 15 | // ... 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/GameContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace GW { 5 | struct GameContext; 6 | GWCA_API GameContext* GetGameContext(); 7 | 8 | struct Cinematic; 9 | struct MapContext; 10 | struct TextParser; 11 | struct CharContext; 12 | struct ItemContext; 13 | struct AgentContext; 14 | struct GuildContext; 15 | struct PartyContext; 16 | struct TradeContext; 17 | struct WorldContext; 18 | struct GadgetContext; 19 | struct AccountContext; 20 | 21 | struct GameContext { 22 | /* +h0000 */ void* h0000; 23 | /* +h0004 */ void* h0004; 24 | /* +h0008 */ AgentContext* agent; // Most functions that access are prefixed with Agent. 25 | /* +h000C */ void* h000C; 26 | /* +h0010 */ void* h0010; 27 | /* +h0014 */ MapContext* map; // Static object/collision data 28 | /* +h0018 */ TextParser *text_parser; 29 | /* +h001C */ void* h001C; 30 | /* +h0020 */ uint32_t some_number; // 0x30 for me at the moment. 31 | /* +h0024 */ void* h0024; 32 | /* +h0028 */ AccountContext* account; 33 | /* +h002C */ WorldContext* world; // Best name to fit it that I can think of. 34 | /* +h0030 */ Cinematic *cinematic; 35 | /* +h0034 */ void* h0034; 36 | /* +h0038 */ GadgetContext* gadget; 37 | /* +h003C */ GuildContext* guild; 38 | /* +h0040 */ ItemContext* items; 39 | /* +h0044 */ CharContext* character; 40 | /* +h0048 */ void* h0048; 41 | /* +h004C */ PartyContext* party; 42 | /* +h0050 */ void* h0050; 43 | /* +h0054 */ void* h0054; 44 | /* +h0058 */ TradeContext* trade; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/GameplayContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | struct GameplayContext; 7 | GWCA_API GameplayContext* GetGameplayContext(); 8 | 9 | // Static stuff used at runtime 10 | struct GameplayContext { 11 | /* +h0000 */ uint32_t h0000[0x13]; 12 | float mission_map_zoom; 13 | uint32_t unk[10]; 14 | }; 15 | static_assert(sizeof(GameplayContext) == 0x78); 16 | } 17 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/ItemContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace GW { 7 | struct ItemContext; 8 | GWCA_API ItemContext* GetItemContext(); 9 | 10 | struct Bag; 11 | struct Item; 12 | struct Inventory; 13 | 14 | struct ItemContext { // total: 0x10C/268 BYTEs 15 | /* +h0000 */ Array h0000; 16 | /* +h0010 */ Array h0010; 17 | /* +h0020 */ DWORD h0020; 18 | /* +h0024 */ Array bags_array; 19 | /* +h0034 */ char h0034[12]; 20 | /* +h0040 */ Array h0040; 21 | /* +h0050 */ Array h0050; 22 | /* +h0060 */ char h0060[88]; 23 | /* +h00B8 */ Array item_array; 24 | /* +h00C8 */ char h00C8[48]; 25 | /* +h00F8 */ Inventory *inventory; 26 | /* +h00FC */ Array h00FC; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/PartyContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace GW { 8 | struct PartyContext; 9 | GWCA_API PartyContext* GetPartyContext(); 10 | 11 | struct PartyInfo; 12 | struct PartySearch; 13 | 14 | struct PartyContext { // total: 0x58/88 15 | /* +h0000 */ uint32_t h0000; 16 | /* +h0004 */ Array h0004; 17 | /* +h0014 */ uint32_t flag; 18 | /* +h0018 */ uint32_t h0018; 19 | /* +h001C */ TList requests; 20 | /* +h0028 */ uint32_t requests_count; 21 | /* +h002C */ TList sending; 22 | /* +h0038 */ uint32_t sending_count; 23 | /* +h003C */ uint32_t h003C; 24 | /* +h0040 */ Array parties; 25 | /* +h0050 */ uint32_t h0050; 26 | /* +h0054 */ PartyInfo *player_party; // Players party 27 | /* +h0058 */ uint8_t h0058[104]; 28 | /* +h00C0 */ Array party_search; 29 | 30 | bool InHardMode() const { return (flag & 0x10) > 0; } 31 | bool IsDefeated() const { return (flag & 0x20) > 0; } 32 | bool IsPartyLeader() const { return (flag >> 0x7) & 1; } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/PreGameContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace GW { 7 | struct PreGameContext; 8 | GWCA_API PreGameContext* GetPreGameContext(); 9 | 10 | struct LoginCharacter { 11 | uint32_t unk0; // Some kind of function call 12 | wchar_t character_name[20]; 13 | }; 14 | struct PreGameContext { 15 | /* +h0000 */ uint32_t frame_id; 16 | /* +h0004 */ uint32_t h0004[72]; 17 | /* +h0124 */ uint32_t chosen_character_index; 18 | /* +h0128 */ uint32_t h0128[6]; 19 | /* +h0140 */ uint32_t index_1; 20 | /* +h0144 */ uint32_t index_2; 21 | /* +h0148 */ GW::Array chars; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/TextParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | namespace Constants { 7 | enum class Language; 8 | } 9 | struct TextCache { 10 | /* +h0000 */ uint32_t h0000; 11 | }; 12 | 13 | struct SubStruct1 { 14 | /* +h0000 */ uint32_t h0000; 15 | }; 16 | 17 | // Allocated @0078C243 18 | struct SubStructUnk { // total: 0x54/84 19 | /* +h0000 */ uint32_t AsyncDecodeStr_Callback; 20 | /* +h0004 */ uint32_t AsyncDecodeStr_Param; 21 | /* +h0008 */ uint32_t buffer_used; // if it's 1 then uses s1 & if it's 0 uses s2. 22 | /* +h000C */ Array s1; 23 | /* +h001C */ Array s2; 24 | /* +h002C */ uint32_t h002C; 25 | /* +h0030 */ uint32_t h0030; // tell us how many string will be enqueue before decoding. 26 | /* +h0034 */ uint32_t h0034; // @0078B990 27 | /* +h0038 */ uint8_t h0038[28]; 28 | }; 29 | 30 | struct TextParser { 31 | /* +h0000 */ uint32_t h0000[8]; 32 | /* +h0020 */ wchar_t *dec_start; 33 | /* +h0024 */ wchar_t *dec_end; 34 | /* +h0028 */ uint32_t substitute_1; // related to h0020 & h0024 35 | /* +h002C */ uint32_t substitute_2; // related to h0020 & h0024 36 | /* +h0030 */ TextCache *cache; 37 | /* +h0034 */ uint32_t h0034[75]; 38 | /* +h0160 */ uint32_t h0160; // @0078BEF5 39 | /* +h0164 */ uint32_t h0164; 40 | /* +h0168 */ uint32_t h0168; // set to 0 @0078BF34 41 | /* +h016C */ uint32_t h016C[5]; 42 | /* +h0180 */ SubStruct1 *sub_struct; 43 | /* +h0184 */ uint32_t h0184[19]; 44 | /* +h01d0 */ GW::Constants::Language language_id; 45 | }; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Context/TradeContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | 8 | namespace GW { 9 | 10 | struct TradeItem { 11 | uint32_t item_id; 12 | uint32_t quantity; 13 | }; 14 | struct TradePlayer { 15 | uint32_t gold; 16 | Array items; 17 | }; 18 | 19 | struct TradeContext { 20 | static constexpr uint32_t TRADE_CLOSED = 0; 21 | static constexpr uint32_t TRADE_INITIATED = 1; 22 | static constexpr uint32_t TRADE_OFFER_SEND = 2; 23 | static constexpr uint32_t TRADE_ACCEPTED = 4; 24 | 25 | /* +h0000 */ uint32_t flags; // this is actually a flags 26 | /* +h0004 */ uint32_t h0004[3]; // Seemingly 3 null dwords 27 | /* +h0010 */ TradePlayer player; 28 | /* +h0024 */ TradePlayer partner; 29 | 30 | // bool GetPartnerAccepted(); 31 | // bool GetPartnerOfferSent(); 32 | 33 | bool GetIsTradeOffered() const { return (flags & TRADE_OFFER_SEND) != 0; } 34 | bool GetIsTradeInitiated() const { return (flags & TRADE_INITIATED) != 0; } 35 | bool GetIsTradeAccepted() const { return (flags & TRADE_ACCEPTED) != 0; } 36 | }; 37 | 38 | GWCA_API TradeContext* GetTradeContext(); 39 | } 40 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GWCA.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Utilities/Export.h" 3 | 4 | /**********************************************************************************\ 5 | 6 | _____ _ _ _____ ___ 7 | | __ \ | | / __ \ / _ \ _ _ 8 | | | \/ | | | / \// /_\ \_| |_ _| |_ 9 | | | __| |/\| | | | _ |_ _|_ _| 10 | | |_\ \ /\ / \__/\| | | | |_| |_| 11 | \____/\/ \/ \____/\_| |_/ 12 | 13 | 14 | Created by KAOS (a.k.a. 4D 1) and HasKha for use in GWToolbox++ 15 | 16 | Credits to: 17 | 18 | Sune C (a.k.a. Harboe) and ACB - 19 | Most low level ground work of API via the GWCA and GWLP:R 20 | projects as well as getting the gamerevision community rolling. 21 | Much help from following these two gentlemen's breadcrumbs. 22 | 23 | Miracle444 - 24 | GWA2, as well as helping me really understand how the game handles 25 | its memory information. 26 | 27 | d8rken - 28 | Zraw menu/api which acted as a gateway to get a grasp of cpp as well 29 | as directx. 30 | 31 | HasKha - 32 | For getting me to not make everything singletons :P 33 | 34 | Jon - 35 | Current maintainer of the project, rework and rewrite since 2022 36 | 37 | Dubble - 38 | Packaging for distribution, cmake 39 | \**********************************************************************************/ 40 | 41 | namespace GW { 42 | GWCA_API bool Initialize(); 43 | GWCA_API void DisableHooks(); 44 | GWCA_API void EnableHooks(); 45 | GWCA_API void Terminate(); 46 | } 47 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GWCAVersion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define GWCA_VERSION_MAJOR 1 4 | #define GWCA_VERSION_MINOR 1 5 | #define GWCA_VERSION_PATCH 9 6 | #define GWCA_VERSION_BUILD 0 7 | #define GWCA_VERSION "1.1.9.0" 8 | 9 | namespace GWCA { 10 | constexpr int VersionMajor = GWCA_VERSION_MAJOR; 11 | constexpr int VersionMinor = GWCA_VERSION_MINOR; 12 | constexpr int VersionPatch = GWCA_VERSION_PATCH; 13 | constexpr int VersionBuild = GWCA_VERSION_BUILD; 14 | constexpr const char* Version = GWCA_VERSION; 15 | } 16 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Attribute.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | namespace Constants { 7 | enum class Attribute : uint32_t; 8 | enum class Profession : uint32_t; 9 | } 10 | 11 | struct Attribute { // total: 0x14/20 12 | /* +h0000 */ Constants::Attribute id; // ID of attribute 13 | /* +h0004 */ uint32_t level_base; // Level of attribute without modifiers (runes,pcons,etc) 14 | /* +h0008 */ uint32_t level; // Level with modifiers 15 | /* +h000C */ uint32_t decrement_points; // Points that you will receive back if you decrement level. 16 | /* +h0010 */ uint32_t increment_points; // Points you will need to increment level. 17 | }; 18 | 19 | struct AttributeInfo { 20 | Constants::Profession profession_id; 21 | Constants::Attribute attribute_id; 22 | uint32_t name_id; 23 | uint32_t desc_id; 24 | uint32_t is_pve; 25 | }; 26 | static_assert(sizeof(AttributeInfo) == 0x14); 27 | 28 | 29 | struct PartyAttribute { 30 | uint32_t agent_id; 31 | Attribute attribute[54]; 32 | }; 33 | static_assert(sizeof(PartyAttribute) == 0x43c); 34 | 35 | typedef Array PartyAttributeArray; 36 | } 37 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Friendslist.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | enum class FriendType : uint32_t { 7 | Unknow = 0, 8 | Friend = 1, 9 | Ignore = 2, 10 | Player = 3, 11 | Trade = 4, 12 | }; 13 | 14 | enum class FriendStatus : uint32_t { 15 | Offline = 0, 16 | Online = 1, 17 | DND = 2, 18 | Away = 3, 19 | Unknown = 4 20 | }; 21 | 22 | struct Friend { 23 | /* +h0000 */ FriendType type; 24 | /* +h0004 */ FriendStatus status; 25 | /* +h0008 */ uint8_t uuid[16]; 26 | /* +h0018 */ wchar_t alias[20]; 27 | /* +h002C */ wchar_t charname[20]; 28 | /* +h0040 */ uint32_t friend_id; 29 | /* +h0044 */ uint32_t zone_id; 30 | }; 31 | 32 | typedef Array FriendsListArray; 33 | 34 | struct FriendList { 35 | /* +h0000 */ FriendsListArray friends; 36 | /* +h0010 */ uint8_t h0010[20]; 37 | /* +h0024 */ uint32_t number_of_friend; 38 | /* +h0028 */ uint32_t number_of_ignore; 39 | /* +h002C */ uint32_t number_of_partner; 40 | /* +h0030 */ uint32_t number_of_trade; 41 | /* +h0034 */ uint8_t h0034[108]; 42 | /* +h00A0 */ FriendStatus player_status; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Hero.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace GW { 7 | typedef uint32_t AgentID; 8 | 9 | enum class HeroBehavior : uint32_t { 10 | Fight, Guard, AvoidCombat 11 | }; 12 | 13 | struct HeroFlag { // total: 0x20/36 14 | /* +h0000 */ uint32_t hero_id; 15 | /* +h0004 */ AgentID agent_id; 16 | /* +h0008 */ uint32_t level; 17 | /* +h000C */ HeroBehavior hero_behavior; 18 | /* +h0010 */ Vec2f flag; 19 | /* +h0018 */ uint32_t h0018; 20 | /* +h001C */ uint32_t h001c; 21 | /* +h0020 */ AgentID locked_target_id; 22 | }; 23 | static_assert(sizeof(HeroFlag) == 0x24, "struct HeroFlag has incorrect size"); 24 | 25 | struct HeroInfo { // total: 0x78/120 26 | /* +h0000 */ uint32_t hero_id; 27 | /* +h0004 */ uint32_t agent_id; 28 | /* +h0008 */ uint32_t level; 29 | /* +h000C */ uint32_t primary; // Primary profession 0-10 (None,W,R,Mo,N,Me,E,A,Rt,P,D) 30 | /* +h0010 */ uint32_t secondary; // Primary profession 0-10 (None,W,R,Mo,N,Me,E,A,Rt,P,D) 31 | /* +h0014 */ uint32_t hero_file_id; 32 | /* +h0018 */ uint32_t model_file_id; 33 | /* +h001C */ uint8_t h001C[52]; 34 | /* +h0050 */ wchar_t name[20]; 35 | }; 36 | static_assert(sizeof(HeroInfo) == 120, "struct HeroInfo has incorrect size"); 37 | 38 | typedef Array HeroFlagArray; 39 | typedef Array HeroInfoArray; 40 | } 41 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/NPC.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | 7 | namespace Constants { 8 | enum class Profession : uint32_t; 9 | } 10 | 11 | struct CharAdjustment { 12 | char hue; 13 | char saturation; 14 | char lightness; 15 | char scale; // percent 16 | }; 17 | 18 | struct NPC { // total: 0x30/48 19 | /* +h0000 */ uint32_t model_file_id; 20 | /* +h0004 */ uint32_t skin_file_id; 21 | /* +h0008 */ CharAdjustment visual_adjustment; // may be overridden 22 | /* +h000C */ uint32_t appearance; 23 | /* +h0010 */ uint32_t npc_flags; // uses CHAR_CLASS_FLAG_* constants 24 | /* +h0014 */ GW::Constants::Profession primary; 25 | /* +h0018 */ GW::Constants::Profession secondary; 26 | /* +h001C */ uint8_t default_level; 27 | // +h001D uint8_t padding; 28 | // +h001E uint16_t padding; 29 | /* +h0020 */ wchar_t *name_enc; 30 | /* +h0024 */ uint32_t *model_files; 31 | /* +h0028 */ uint32_t files_count; // length of ModelFile 32 | /* +h002C */ uint32_t files_capacity; // capacity of ModelFile 33 | 34 | inline bool IsHenchman() { return (npc_flags & 0x10) != 0; } 35 | inline bool IsHero() { return (npc_flags & 0x20) != 0; } 36 | inline bool IsSpirit() { return (npc_flags & 0x4000) != 0; } 37 | inline bool IsMinion() { return (npc_flags & 0x100) != 0; } 38 | inline bool IsPet() { return (npc_flags & 0xD) != 0; } 39 | }; 40 | static_assert(sizeof(NPC) == 0x30, "struct NPC has incorrect size"); 41 | 42 | typedef Array NPCArray; 43 | } 44 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace GW { 6 | typedef uint32_t PlayerID; 7 | 8 | struct Player { // total: 0x4C/76 9 | /* +h0000 */ uint32_t agent_id; 10 | /* +h0004 */ uint32_t h0004[3]; 11 | /* +h0010 */ uint32_t appearance_bitmap; 12 | /* +h0014 */ uint32_t flags; // Bitwise field 13 | /* +h0018 */ uint32_t primary; 14 | /* +h001C */ uint32_t secondary; 15 | /* +h0020 */ uint32_t h0020; 16 | /* +h0024 */ wchar_t *name_enc; 17 | /* +h0028 */ wchar_t *name; 18 | /* +h002C */ uint32_t party_leader_player_number; 19 | /* +h0030 */ uint32_t active_title_tier; 20 | /* +h0034 */ uint32_t player_number; 21 | /* +h0038 */ uint32_t party_size; 22 | /* +h003C */ Array h003C; 23 | 24 | inline bool IsPvP() { 25 | return (flags & 0x800) != 0; 26 | } 27 | 28 | }; 29 | static_assert(sizeof(Player) == 0x4c, "struct Player has incorrect size"); 30 | 31 | typedef Array PlayerArray; 32 | } 33 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Quest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace GW { 7 | namespace Constants { 8 | enum class QuestID : uint32_t; 9 | enum class MapID : uint32_t; 10 | } 11 | 12 | struct Quest { // total: 0x34/52 13 | /* +h0000 */ GW::Constants::QuestID quest_id; 14 | /* +h0004 */ uint32_t log_state; 15 | /* +h0008 */ wchar_t* location; // quest category 16 | /* +h000C */ wchar_t* name; // quest name 17 | /* +h0010 */ wchar_t* npc; // 18 | /* +h0014 */ GW::Constants::MapID map_from; 19 | /* +h0018 */ GamePos marker; 20 | /* +h0024 */ uint32_t h0024; 21 | /* +h0028 */ GW::Constants::MapID map_to; 22 | /* +h002C */ wchar_t* description; // namestring reward 23 | /* +h0030 */ wchar_t* objectives; // namestring objective 24 | 25 | inline bool IsCompleted() { return (log_state & 0x2) != 0; } 26 | inline bool IsCurrentMissionQuest() { return (log_state & 0x10) != 0; } 27 | inline bool IsAreaPrimary() { return (log_state & 0x40) != 0; } // e.g. "Primary Echovald Forest Quests" 28 | inline bool IsPrimary() { return (log_state & 0x20) != 0; } // e.g. "Primary Quests" 29 | }; 30 | static_assert(sizeof(Quest) == 52, "struct Quest has incorrect size"); 31 | 32 | struct MissionObjective { // total: 0xC/12 33 | /* +h0000 */ uint32_t objective_id; 34 | /* +h0004 */ wchar_t *enc_str; 35 | /* +h0008 */ uint32_t type; // completed, bullet, etc... 36 | }; 37 | static_assert(sizeof(MissionObjective) == 12, "struct MissionObjective has incorrect size"); 38 | 39 | typedef Array QuestLog; 40 | } 41 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/GameEntities/Title.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace GW { 8 | namespace Constants { 9 | enum class TitleID : uint32_t; 10 | } 11 | struct Title { // total: 0x28/40 12 | /* +h0000 */ uint32_t props; 13 | /* +h0004 */ uint32_t current_points; 14 | /* +h0008 */ uint32_t current_title_tier_index; 15 | /* +h000C */ uint32_t points_needed_current_rank; 16 | /* +h0010 */ uint32_t next_title_tier_index; 17 | /* +h0014 */ uint32_t points_needed_next_rank; 18 | /* +h0018 */ uint32_t max_title_rank; 19 | /* +h001C */ uint32_t max_title_tier_index; 20 | /* +h0020 */ wchar_t* h0020; // Pretty sure these are ptrs to title hash strings 21 | /* +h0024 */ wchar_t* h0024; // Pretty sure these are ptrs to title hash strings 22 | 23 | inline bool is_percentage_based() { return (props & 1) != 0; }; 24 | inline bool has_tiers() { return (props & 3) == 2; }; 25 | 26 | }; 27 | static_assert(sizeof(Title) == 40, "struct Title has incorrect size"); 28 | 29 | struct TitleTier { 30 | uint32_t props; 31 | uint32_t tier_number; 32 | wchar_t* tier_name_enc; 33 | inline bool is_percentage_based() { return (props & 1) != 0; }; 34 | }; 35 | static_assert(sizeof(TitleTier) == 0xc, "struct TitleTier has incorrect size"); 36 | 37 | struct TitleClientData { 38 | uint32_t title_id; 39 | uint32_t name_id; 40 | }; 41 | typedef Array TitleArray; 42 | } 43 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/CameraMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | 5 | namespace GW { 6 | struct Vec3f; 7 | struct Camera; 8 | struct Module; 9 | 10 | extern Module CameraModule; 11 | 12 | namespace CameraMgr { 13 | // ==== Camera ==== 14 | GWCA_API Camera *GetCamera(); 15 | 16 | GWCA_API bool ForwardMovement(float amount, bool true_forward); 17 | GWCA_API bool VerticalMovement(float amount); 18 | GWCA_API bool RotateMovement(float angle); 19 | GWCA_API bool SideMovement(float amount); 20 | 21 | // Change max zoom dist 22 | GWCA_API bool SetMaxDist(float dist = 900.0f); 23 | 24 | GWCA_API bool SetFieldOfView(float fov); 25 | 26 | // Manual computation of the position of the Camera. (As close as possible to the original) 27 | GWCA_API Vec3f ComputeCamPos(float dist = 0); // 2.f is the first person dist (const by gw) 28 | GWCA_API bool UpdateCameraPos(); 29 | 30 | GWCA_API float GetFieldOfView(); 31 | GWCA_API float GetYaw(); 32 | GWCA_API float GetCurrentYaw(); 33 | 34 | // ==== Camera patches ==== 35 | // Unlock camera & return the new state of it 36 | GWCA_API bool UnlockCam(bool flag); 37 | GWCA_API bool GetCameraUnlock(); 38 | 39 | // Enable or Disable the fog & return the state of it 40 | GWCA_API bool SetFog(bool flag); 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/EventMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | #include <GWCA/Utilities/Export.h> 5 | 6 | namespace GW { 7 | 8 | struct Module; 9 | extern Module EventMgrModule; 10 | 11 | namespace EventMgr { 12 | enum class EventID { 13 | kRecvPing = 0x8, 14 | kSendFriendState = 0x26, 15 | kRecvFriendState = 0x2c 16 | 17 | }; 18 | 19 | typedef HookCallback<EventID, void*, uint32_t> EventCallback; 20 | GWCA_API void RegisterEventCallback( 21 | HookEntry *entry, 22 | EventID event_id, 23 | const EventCallback& callback, 24 | int altitude = -0x8000); 25 | 26 | GWCA_API void RemoveEventCallback( 27 | HookEntry *entry); 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/FriendListMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | #include <GWCA/Utilities/Export.h> 5 | 6 | namespace GW { 7 | 8 | struct Friend; 9 | struct FriendList; 10 | 11 | enum class FriendStatus : uint32_t; 12 | enum class FriendType : uint32_t; 13 | 14 | struct Module; 15 | extern Module FriendListModule; 16 | 17 | namespace FriendListMgr { 18 | 19 | GWCA_API FriendList *GetFriendList(); 20 | 21 | GWCA_API Friend *GetFriend(const wchar_t *alias, const wchar_t *charname, FriendType type = (FriendType)1); 22 | GWCA_API Friend *GetFriend(uint32_t index); 23 | GWCA_API Friend *GetFriend(const uint8_t *uuid); 24 | 25 | GWCA_API uint32_t GetNumberOfFriends(FriendType = (FriendType)1); 26 | GWCA_API uint32_t GetNumberOfIgnores(); 27 | GWCA_API uint32_t GetNumberOfPartners(); 28 | GWCA_API uint32_t GetNumberOfTraders(); 29 | 30 | GWCA_API FriendStatus GetMyStatus(); 31 | 32 | GWCA_API bool SetFriendListStatus(FriendStatus status); 33 | 34 | typedef HookCallback<const Friend*, const Friend*> FriendStatusCallback; 35 | GWCA_API void RegisterFriendStatusCallback( 36 | HookEntry *entry, 37 | const FriendStatusCallback& callback); 38 | 39 | GWCA_API void RemoveFriendStatusCallback( 40 | HookEntry *entry); 41 | 42 | GWCA_API bool AddFriend(const wchar_t *name, const wchar_t *alias = nullptr); 43 | GWCA_API bool AddIgnore(const wchar_t *name, const wchar_t *alias = nullptr); 44 | GWCA_API bool RemoveFriend(Friend *_friend); 45 | GWCA_API bool ChangeFriendType(Friend* _friend, FriendType type); 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/GameThreadMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | #include <GWCA/Utilities/Export.h> 5 | 6 | #ifndef EXCEPT_EXPRESSION_LOOP 7 | #define EXCEPT_EXPRESSION_LOOP EXCEPTION_CONTINUE_SEARCH 8 | #endif 9 | namespace GW { 10 | 11 | struct Module; 12 | extern Module GameThreadModule; 13 | 14 | namespace GameThread { 15 | GWCA_API void EnableHooks(); 16 | 17 | GWCA_API void ClearCalls(); 18 | 19 | GWCA_API void Enqueue(std::function<void ()> f); 20 | 21 | typedef HookCallback<> GameThreadCallback; 22 | GWCA_API void RegisterGameThreadCallback( 23 | HookEntry *entry, 24 | const GameThreadCallback& callback, 25 | int altitude = 0x4000); 26 | 27 | GWCA_API void RemoveGameThreadCallback(HookEntry *entry); 28 | 29 | GWCA_API bool IsInGameThread(); 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/GuildMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | 5 | namespace GW { 6 | struct Guild; 7 | struct GuildContext; 8 | 9 | typedef Array<Guild *> GuildArray; 10 | 11 | // @Cleanup: @Fix: This should be replaced by an UUID type 12 | struct GHKey; 13 | 14 | struct Module; 15 | extern Module GuildModule; 16 | 17 | namespace GuildMgr { 18 | 19 | // Array of guilds, holds basically everything about a guild. Can get structs of all players in outpost ;) 20 | GWCA_API GuildArray* GetGuildArray(); 21 | 22 | GWCA_API Guild* GetPlayerGuild(); 23 | 24 | // Get the guild that owns the current Guild Hall that the player is in 25 | GWCA_API Guild* GetCurrentGH(); 26 | 27 | GWCA_API Guild* GetGuildInfo(uint32_t guild_id); 28 | 29 | // Index in guild array of player guild. 30 | GWCA_API uint32_t GetPlayerGuildIndex(); 31 | 32 | // Announcement in guild at the moment. 33 | GWCA_API wchar_t *GetPlayerGuildAnnouncement(); 34 | 35 | // Name of player who last edited the announcement. 36 | GWCA_API wchar_t *GetPlayerGuildAnnouncer(); 37 | 38 | GWCA_API bool TravelGH(); 39 | 40 | GWCA_API bool TravelGH(GHKey key); 41 | 42 | GWCA_API bool LeaveGH(); 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/MemoryMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace GW { 4 | 5 | struct HookEntry; 6 | struct Module; 7 | extern Module MemoryMgrModule; 8 | 9 | namespace MemoryMgr { 10 | 11 | GWCA_API uint32_t GetGWVersion(); 12 | 13 | GWCA_API DWORD GetSkillTimer(); 14 | 15 | GWCA_API bool GetPersonalDir(size_t buf_len, wchar_t* buf); 16 | 17 | GWCA_API HWND GetGWWindowHandle(); 18 | 19 | // You probably don't want to use these functions. These are for allocating 20 | // memory on the Guild Wars game heap, rather than your own heap. Memory allocated with 21 | // these functions cannot be used with RAII and must be manually freed. USE AT YOUR OWN RISK. 22 | GWCA_API void* MemAlloc(size_t size); 23 | GWCA_API void* MemRealloc(void* buf, size_t newSize); 24 | GWCA_API void MemFree(void* buf); 25 | 26 | HMODULE GetModuleForPointer(void* ptr, bool refresh = false); 27 | 28 | void RemoveFreeLibraryCallback(GW::HookEntry*); 29 | void RegisterFreeLibraryCallback(GW::HookEntry*, std::function<void(HMODULE)>); 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/MerchantMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | #include <GWCA/GameContainers/Array.h> 5 | 6 | namespace GW { 7 | 8 | struct Module; 9 | extern Module MerchantModule; 10 | 11 | typedef uint32_t ItemID; 12 | typedef Array<ItemID> MerchItemArray; 13 | 14 | namespace Merchant { 15 | 16 | struct TransactionInfo { 17 | uint32_t item_count = 0; 18 | uint32_t *item_ids = nullptr; 19 | uint32_t *item_quantities = nullptr; 20 | }; 21 | 22 | struct QuoteInfo { 23 | uint32_t unknown = 0; 24 | uint32_t item_count = 0; 25 | uint32_t *item_ids = nullptr; 26 | }; 27 | 28 | enum class TransactionType : uint32_t { 29 | MerchantBuy = 0x1, 30 | CollectorBuy, 31 | CrafterBuy, 32 | WeaponsmithCustomize, 33 | DonateFaction = 0x6, 34 | SkillTrainer = 0xA, 35 | MerchantSell, 36 | TraderBuy, 37 | TraderSell, 38 | 39 | UnlockRunePriestOfBalth = 0xF 40 | }; 41 | GWCA_API bool TransactItems(); 42 | 43 | GWCA_API bool RequestQuote(TransactionType type, uint32_t item_id); 44 | 45 | // note: can contain pointers to random items from your inventory 46 | GWCA_API MerchItemArray* GetMerchantItemsArray(); 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/Module.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace GW { 4 | struct Module { 5 | const char *name; 6 | void *param; 7 | 8 | void (*init_module)(); 9 | void (*exit_module)(); 10 | 11 | // Call those from game thread to be safe 12 | // Do not free trampoline 13 | void (*enable_hooks)(); 14 | void (*disable_hooks)(); 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/QuestMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | 5 | namespace GW { 6 | 7 | struct Quest; 8 | typedef Array<Quest> QuestLog; 9 | 10 | namespace Constants { 11 | enum class QuestID : uint32_t; 12 | enum class Profession: uint32_t; 13 | } 14 | 15 | struct Module; 16 | extern Module QuestModule; 17 | 18 | namespace QuestMgr { 19 | 20 | GWCA_API GW::Constants::QuestID GetActiveQuestId(); 21 | 22 | GWCA_API bool SetActiveQuestId(Constants::QuestID quest_id); 23 | 24 | GWCA_API Quest* GetActiveQuest(); 25 | 26 | GWCA_API bool SetActiveQuest(Quest* quest); 27 | 28 | GWCA_API bool AbandonQuest(Quest* quest); 29 | 30 | GWCA_API bool AbandonQuestId(Constants::QuestID quest_id); 31 | 32 | GWCA_API QuestLog* GetQuestLog(); 33 | 34 | GWCA_API Quest* GetQuest(GW::Constants::QuestID); 35 | 36 | // Find and populate a wchar_t* buffer with the encoded name of the category the quest belongs to in the quest log. Returns false on failure. 37 | GWCA_API bool GetQuestEntryGroupName(GW::Constants::QuestID quest_id, wchar_t* out, size_t out_len); 38 | 39 | GWCA_API bool RequestQuestInfo(const Quest* quest, bool update_markers=false); 40 | 41 | GWCA_API bool RequestQuestInfoId(Constants::QuestID quest_id, bool update_markers=false); 42 | 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Managers/TradeMgr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | 5 | namespace GW { 6 | struct Module; 7 | extern Module TradeModule; 8 | struct TradeItem; 9 | 10 | namespace Trade { 11 | 12 | GWCA_API bool OpenTradeWindow(uint32_t agent_id); 13 | GWCA_API bool AcceptTrade(); 14 | GWCA_API bool CancelTrade(); 15 | GWCA_API bool ChangeOffer(); 16 | GWCA_API bool SubmitOffer(uint32_t gold); 17 | GWCA_API bool RemoveItem(uint32_t slot); 18 | GWCA_API TradeItem* IsItemOffered(uint32_t item_id); 19 | 20 | // Passing quantity = 0 will prompt the player for the amount 21 | GWCA_API bool OfferItem(uint32_t item_id, uint32_t quantity = 0); 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/Export.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(__clang__) || defined(__GNUC__) 4 | # define DllExport __attribute__((dllexport)) 5 | # define DllImport __attribute__((dllimport)) 6 | #elif defined(_MSC_VER) 7 | # define DllExport __declspec(dllexport) 8 | # define DllImport __declspec(dllimport) 9 | #endif 10 | #ifndef GWCA_API 11 | #ifdef GWCA_BUILD_EXPORTS 12 | # define GWCA_API DllExport 13 | #else 14 | #ifdef GWCA_IMPORT 15 | # define GWCA_API DllImport 16 | #else 17 | # define GWCA_API 18 | #endif 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/FileScanner.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Windows.h> 4 | #include <stdint.h> 5 | #include <GWCA\Utilities\Scanner.h> 6 | 7 | class FileScanner 8 | { 9 | public: 10 | static bool CreateFromPath(const wchar_t *path, FileScanner *result); 11 | 12 | FileScanner(); 13 | FileScanner(const void *FileMapping, uintptr_t ImageBase, PIMAGE_SECTION_HEADER Sections, size_t Count); 14 | FileScanner& operator=(FileScanner&& other) noexcept; 15 | FileScanner& operator=(const FileScanner& other) noexcept; 16 | ~FileScanner(); 17 | 18 | void GetSectionAddressRange(GW::ScannerSection section, uintptr_t* start, uintptr_t* end) const; 19 | uintptr_t FindAssertion(const char* assertion_file, const char* assertion_msg, uint32_t line_number, int offset); 20 | uintptr_t FindInRange(const char* pattern, const char* mask, int offset, uint32_t start, uint32_t end); 21 | uintptr_t Find(const char* pattern, const char* mask, int offset, GW::ScannerSection section = GW::ScannerSection::Section_TEXT); 22 | 23 | 24 | GW::ScannerSectionOffset sections[GW::ScannerSection::Section_Count] = {}; 25 | private: 26 | const void *FileMapping = nullptr; 27 | uintptr_t ImageBase = 0; 28 | }; 29 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/Hook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <functional> 4 | 5 | namespace GW 6 | { 7 | struct HookEntry {}; 8 | 9 | struct HookStatus { 10 | bool blocked = false; 11 | unsigned int altitude = 0; 12 | }; 13 | 14 | template <typename... Ts> 15 | using HookCallback = std::function<void (HookStatus* status, Ts...)>; 16 | } // namespace GW 17 | 18 | 19 | // Usage: bind_member(this, &Class::member_function) 20 | template <class C, typename Ret, typename... Ts> 21 | std::function<Ret(Ts...)> bind_member(C* c, Ret (C::*m)(Ts...)) 22 | { 23 | return [=]<typename... Args>(Args&&... args) { return (c->*m)(std::forward<Args>(args)...); }; 24 | } 25 | 26 | // Usage: bind_member(this, &Class::member_function) 27 | template <class C, typename Ret, typename... Ts> 28 | std::function<Ret(Ts...)> bind_member(const C* c, Ret (C::*m)(Ts...) const) 29 | { 30 | return [=]<typename... Args>(Args&&... args) { return (c->*m)(std::forward<Args>(args)...); }; 31 | } 32 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/Hooker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Export.h> 4 | 5 | namespace GW { 6 | namespace Hook { 7 | GWCA_API void Initialize(); 8 | GWCA_API void Deinitialize(); 9 | 10 | // static void EnqueueHook(HookBase* base); 11 | // static void RemoveHook(HookBase* base); 12 | 13 | GWCA_API void EnableHooks(void* target = NULL); 14 | GWCA_API void DisableHooks(void* target = NULL); 15 | 16 | GWCA_API int CreateHook(void** target, void* detour, void** trampoline); 17 | GWCA_API void RemoveHook(void* target); 18 | 19 | GWCA_API void EnterHook(); 20 | GWCA_API void LeaveHook(); 21 | GWCA_API int GetInHookCount(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/Macros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define Verify(expr) (expr) 4 | -------------------------------------------------------------------------------- /Dependencies/GWCA/include/GWCA/Utilities/MemoryPatcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace GW { 4 | 5 | class MemoryPatcher { 6 | public: 7 | MemoryPatcher() = default; 8 | MemoryPatcher(const MemoryPatcher&) = delete; 9 | ~MemoryPatcher() { 10 | if (GetIsActive()) 11 | Reset(); 12 | }; 13 | 14 | GWCA_API void Reset(); 15 | bool IsValid() { return m_addr != nullptr; } 16 | GWCA_API void SetPatch(uintptr_t addr, const char* patch, size_t size); 17 | 18 | const void* GetAddress() { return m_addr; } 19 | 20 | // Use to redirect a CALL or JMP instruction to call a different function instead. 21 | GWCA_API bool SetRedirect(uintptr_t call_instruction_address, void* redirect_func); 22 | 23 | GWCA_API bool TogglePatch(bool flag); 24 | bool TogglePatch() { return TogglePatch(!m_active); }; 25 | 26 | bool GetIsActive() { return m_active; }; 27 | 28 | // Disconnect all patches from memory, restoring original values if applicable 29 | GWCA_API static void DisableHooks(); 30 | // Connect any applicable patches that have been disconnected. 31 | GWCA_API static void EnableHooks(); 32 | private: 33 | void *m_addr = nullptr; 34 | uint8_t *m_patch = nullptr; 35 | uint8_t *m_backup = nullptr; 36 | size_t m_size = 0; 37 | bool m_active = false; 38 | 39 | void PatchActual(bool patch); 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /Dependencies/GWCA/lib/gwca.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/Dependencies/GWCA/lib/gwca.lib -------------------------------------------------------------------------------- /Dependencies/nativefiledialog/LICENSE: -------------------------------------------------------------------------------- 1 | This software is provided 'as-is', without any express or implied 2 | warranty. In no event will the authors be held liable for any damages 3 | arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, 6 | including commercial applications, and to alter it and redistribute it 7 | freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not 10 | claim that you wrote the original software. If you use this software 11 | in a product, an acknowledgment in the product documentation would be 12 | appreciated but is not required. 13 | 2. Altered source versions must be plainly marked as such, and must not be 14 | misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | 17 | -------------------------------------------------------------------------------- /Dependencies/nativefiledialog/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Native File Dialog 3 | 4 | Internal, common across platforms 5 | 6 | http://www.frogtoss.com/labs 7 | */ 8 | 9 | 10 | #ifndef _NFD_COMMON_H 11 | #define _NFD_COMMON_H 12 | 13 | #define NFD_MAX_STRLEN 256 14 | #define _NFD_UNUSED(x) ((void)x) 15 | 16 | void *NFDi_Malloc( size_t bytes ); 17 | void NFDi_Free( void *ptr ); 18 | void NFDi_SetError( const char *msg ); 19 | void NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Dependencies/nativefiledialog/nfd_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Native File Dialog 3 | 4 | Internal, common across platforms 5 | 6 | http://www.frogtoss.com/labs 7 | */ 8 | 9 | 10 | #ifndef _NFD_COMMON_H 11 | #define _NFD_COMMON_H 12 | 13 | #include "include/nfd.h" 14 | 15 | #include <stdint.h> 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define NFD_MAX_STRLEN 256 22 | #define _NFD_UNUSED(x) ((void)x) 23 | 24 | #define NFD_UTF8_BOM "\xEF\xBB\xBF" 25 | 26 | 27 | void *NFDi_Malloc( size_t bytes ); 28 | void NFDi_Free( void *ptr ); 29 | void NFDi_SetError( const char *msg ); 30 | int NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy ); 31 | int32_t NFDi_UTF8_Strlen( const nfdchar_t *str ); 32 | int NFDi_IsFilterSegmentChar( char ch ); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GWToolbox/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | FILE(GLOB SOURCES 3 | "*.h" 4 | "*.cpp" 5 | "GWToolbox.rc") 6 | 7 | add_executable(GWToolbox) 8 | target_sources(GWToolbox PRIVATE ${SOURCES}) 9 | target_precompile_headers(GWToolbox PRIVATE "stdafx.h") 10 | 11 | set_target_properties(GWToolbox PROPERTIES 12 | LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS" 13 | LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:WINDOWS" 14 | LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS" 15 | VS_GLOBAL_RunCodeAnalysis false 16 | VS_GLOBAL_EnableMicrosoftCodeAnalysis true 17 | VS_GLOBAL_EnableClangTidyCodeAnalysis true 18 | ) 19 | 20 | target_link_libraries(GWToolbox PRIVATE 21 | # cmake dependencies: 22 | GWToolboxdll 23 | Core 24 | RestClient 25 | directxtex 26 | nlohmann_json::nlohmann_json 27 | 28 | version.lib # for GetFileVersionInfo 29 | ) 30 | -------------------------------------------------------------------------------- /GWToolbox/Download.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Window.h" 4 | 5 | bool Download(std::string& content, const wchar_t* url); 6 | bool Download(const wchar_t* path_to_file, const wchar_t* url); 7 | 8 | class DownloadWindow : public Window { 9 | public: 10 | DownloadWindow() = default; 11 | DownloadWindow(const DownloadWindow&) = delete; 12 | ~DownloadWindow() override = default; 13 | 14 | DownloadWindow& operator=(const DownloadWindow&) = delete; 15 | 16 | bool Create() override; 17 | static bool DownloadAllFiles(); 18 | void SetChangelog(const char* str, size_t length) const; 19 | 20 | private: 21 | LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) override; 22 | 23 | void OnCreate(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 24 | 25 | private: 26 | HWND m_hProgressBar = nullptr; 27 | HWND m_hCloseButton = nullptr; 28 | HWND m_hChangelog = nullptr; 29 | }; 30 | -------------------------------------------------------------------------------- /GWToolbox/GWToolbox.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/GWToolbox/GWToolbox.rc -------------------------------------------------------------------------------- /GWToolbox/Inject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Process.h" 4 | #include "Settings.h" 5 | #include "Window.h" 6 | 7 | enum InjectReply { 8 | InjectReply_Inject, 9 | InjectReply_Cancel, 10 | InjectReply_NoProcess, 11 | InjectReply_PatternError, 12 | InjectReply_NoValidProcess 13 | }; 14 | 15 | class InjectWindow : public Window { 16 | public: 17 | static InjectReply AskInjectProcess(Process* target_process); 18 | 19 | public: 20 | InjectWindow(); 21 | InjectWindow(const InjectWindow&) = delete; 22 | InjectWindow(InjectWindow&&) = delete; 23 | ~InjectWindow() override; 24 | 25 | InjectWindow& operator=(const InjectWindow&) = delete; 26 | 27 | bool Create() override; 28 | 29 | // Returns false if no options were selected, typically when the window was closed. 30 | bool GetSelected(size_t* index) const; 31 | 32 | private: 33 | LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) override; 34 | 35 | void OnCreate(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 36 | void OnCommand(HWND hwnd, LONG ControlId, LONG NotificateCode); 37 | 38 | private: 39 | HWND m_hCharacters; 40 | HWND m_hLaunchButton; 41 | HWND m_hRestartAsAdmin; 42 | HWND m_hSettings; 43 | SettingsWindow m_SettingsWindow; 44 | 45 | int m_Selected; 46 | }; 47 | 48 | bool InjectRemoteThread(const Process* process, LPCWSTR ImagePath, LPDWORD lpExitCode); 49 | -------------------------------------------------------------------------------- /GWToolbox/Install.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool Install(bool quiet); 4 | bool Uninstall(bool quiet); 5 | 6 | bool IsInstalled(); 7 | -------------------------------------------------------------------------------- /GWToolbox/Registry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | bool OpenSettingsKey(PHKEY phkResult); 4 | bool DeleteSettingsKey(); 5 | 6 | bool RegWriteStr(HKEY hKey, LPCWSTR KeyName, LPCWSTR Value); 7 | bool RegWriteDWORD(HKEY hKey, LPCWSTR KeyName, DWORD Value); 8 | 9 | bool RegReadStr(HKEY hKey, LPCWSTR KeyName, LPWSTR Buffer, size_t BufferLength); 10 | bool RegReadDWORD(HKEY hKey, LPCWSTR KeyName, PDWORD dwDword); 11 | -------------------------------------------------------------------------------- /GWToolbox/Settings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Window.h" 4 | 5 | struct Settings { 6 | bool help = false; 7 | bool version = false; 8 | bool quiet = false; 9 | bool install = false; 10 | bool uninstall = false; 11 | bool reinstall = false; 12 | bool asadmin = false; 13 | bool noupdate = false; 14 | bool noinstall = false; 15 | bool localdll = false; 16 | uint32_t pid; 17 | }; 18 | 19 | extern Settings settings; 20 | 21 | void PrintUsage(bool terminate); 22 | 23 | void ParseRegSettings(); 24 | void ParseCommandLine(); 25 | 26 | bool IsRunningAsAdmin(); 27 | bool CreateProcessInt(const wchar_t* path, const wchar_t* args, const wchar_t* workdir, bool as_admin = false); 28 | bool Restart(const wchar_t* args, bool force_admin = false); 29 | bool RestartAsAdmin(const wchar_t* args); 30 | void RestartWithSameArgs(bool force_admin = false); 31 | bool EnableDebugPrivilege(); 32 | 33 | class SettingsWindow : public Window { 34 | public: 35 | SettingsWindow() = default; 36 | SettingsWindow(const SettingsWindow&) = delete; 37 | SettingsWindow(SettingsWindow&&) = delete; 38 | ~SettingsWindow() override = default; 39 | 40 | SettingsWindow& operator=(const SettingsWindow&) = delete; 41 | 42 | bool Create() override; 43 | 44 | private: 45 | LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) override; 46 | 47 | void OnCreate(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 48 | void OnCommand(HWND hwnd, LONG ControlId, LONG NotificateCode) const; 49 | 50 | private: 51 | HWND m_hNoUpdate = nullptr; 52 | HWND m_hStartAsAdmin = nullptr; 53 | }; 54 | -------------------------------------------------------------------------------- /GWToolbox/Window.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Window { 4 | static LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 5 | 6 | public: 7 | Window(); 8 | Window(const Window&) = delete; 9 | Window(Window&&) = delete; 10 | virtual ~Window(); 11 | 12 | Window& operator=(const Window&) = delete; 13 | Window& operator=(Window&&) = delete; 14 | 15 | virtual bool Create(); 16 | bool WaitMessages() const; 17 | bool PollMessages(uint32_t TimeoutMs) const; 18 | static bool ProcessMessages(); 19 | 20 | void SignalStop() const; 21 | bool ShouldClose() const; 22 | 23 | void SetWindowName(LPCWSTR lpName); 24 | void SetWindowPosition(int X, int Y); 25 | void SetWindowDimension(int Width, int Height); 26 | 27 | // void SetMaximizeButton(bool Enable); 28 | // void SetMinimizeButton(bool Enable); 29 | 30 | private: 31 | virtual LRESULT WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) = 0; 32 | 33 | protected: 34 | HWND m_hWnd; 35 | HFONT m_hFont; 36 | HICON m_hIcon; 37 | HINSTANCE m_hInstance; 38 | 39 | private: 40 | HANDLE m_hEvent; 41 | 42 | LPCWSTR m_WindowName; 43 | int m_X; 44 | int m_Y; 45 | int m_Width; 46 | int m_Height; 47 | }; 48 | -------------------------------------------------------------------------------- /GWToolbox/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by GWToolbox.rc 4 | // 5 | #define IDI_ICON1 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 103 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /GWToolbox/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/AprilFools.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | namespace GW { 6 | struct Agent; 7 | } 8 | 9 | class AprilFools : public ToolboxModule { 10 | AprilFools() = default; 11 | ~AprilFools() override = default; 12 | 13 | public: 14 | static AprilFools& Instance() 15 | { 16 | static AprilFools instance; 17 | return instance; 18 | } 19 | 20 | [[nodiscard]] const char* Name() const override { return "April Fools"; } 21 | bool HasSettings() override { return false; } 22 | 23 | void Initialize() override; 24 | void Terminate() override; 25 | void Update(float delta) override; 26 | static void SetInfected(GW::Agent* agent, bool is_infected); 27 | static void SetEnabled(bool is_enabled); 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/AudioSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | namespace GW { 6 | struct GamePos; 7 | struct HookStatus; 8 | struct Vec3f; 9 | } // namespace GW 10 | 11 | struct SoundProps { 12 | uint32_t flags; 13 | uint32_t h0004[4]; 14 | uint32_t h0014; 15 | uint32_t h0018; 16 | uint32_t h001c; 17 | GW::Vec3f position; 18 | uint32_t h002c; 19 | void* h0030; 20 | uint32_t h0034[5]; 21 | void* h0048; 22 | uint32_t h004c[5]; 23 | void* h0060; 24 | uint32_t h0064[5]; 25 | ~SoundProps(); 26 | }; 27 | using PlaySoundCallback = void(__cdecl*)(GW::HookStatus*, const wchar_t* filename, struct SoundProps* props); 28 | 29 | class AudioSettings : public ToolboxModule { 30 | AudioSettings() = default; 31 | ~AudioSettings() override = default; 32 | 33 | public: 34 | static AudioSettings& Instance() 35 | { 36 | static AudioSettings instance; 37 | return instance; 38 | } 39 | 40 | [[nodiscard]] const char* Name() const override { return "Audio Settings"; } 41 | [[nodiscard]] const char* Icon() const override { return ICON_FA_MUSIC; } 42 | 43 | static bool PlaySound(const wchar_t* filename, const GW::Vec3f* position = nullptr, uint32_t flags = 0, void** handle_out = nullptr); 44 | static bool StopSound(void* handle); 45 | static void RegisterPlaySoundCallback(GW::HookEntry* hook_entry, PlaySoundCallback callback); 46 | static void RemovePlaySoundCallback(GW::HookEntry* hook_entry); 47 | void Initialize() override; 48 | void Terminate() override; 49 | void LoadSettings(ToolboxIni*) override; 50 | void SaveSettings(ToolboxIni*) override; 51 | void DrawSettingsInternal() override; 52 | }; 53 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ChatFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class ChatFilter : public ToolboxModule { 6 | ChatFilter() = default; 7 | 8 | ~ChatFilter() override = default; 9 | 10 | public: 11 | static ChatFilter& Instance() 12 | { 13 | static ChatFilter instance; 14 | return instance; 15 | } 16 | 17 | [[nodiscard]] const char* Name() const override { return "Chat Filter"; } 18 | [[nodiscard]] const char* SettingsName() const override { return "Chat Settings"; } 19 | 20 | void Initialize() override; 21 | void Terminate() override; 22 | void LoadSettings(ToolboxIni* ini) override; 23 | void SaveSettings(ToolboxIni* ini) override; 24 | void DrawSettingsInternal() override; 25 | 26 | void Update(float delta) override; 27 | }; 28 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/CodeOptimiserModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | 6 | class CodeOptimiserModule : public ToolboxModule { 7 | CodeOptimiserModule() = default; 8 | ~CodeOptimiserModule() override = default; 9 | 10 | public: 11 | static CodeOptimiserModule& Instance() 12 | { 13 | static CodeOptimiserModule instance; 14 | return instance; 15 | } 16 | 17 | [[nodiscard]] const char* Name() const override { return "Code Optimiser"; } 18 | bool HasSettings() override { return false; } 19 | 20 | 21 | const char* Description() const override { return "Optimises some internal GW functions to improve in-game performance"; } 22 | void Initialize() override; 23 | void SignalTerminate() override; 24 | }; 25 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/CrashHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class CrashHandler : public ToolboxModule { 6 | CrashHandler() = default; 7 | ~CrashHandler() = default; 8 | public: 9 | static CrashHandler& Instance() 10 | { 11 | static CrashHandler instance; 12 | return instance; 13 | } 14 | 15 | [[nodiscard]] const char* Name() const override { return "Crash Handler"; } 16 | bool HasSettings() override { return false; } 17 | 18 | void Initialize() override; 19 | 20 | void Terminate() override; 21 | 22 | static void GWCAPanicHandler( 23 | void*, 24 | const char* expr, 25 | const char* file, 26 | unsigned int line, 27 | const char* function); 28 | static void FatalAssert(const char* expr, const char* file, const unsigned line); 29 | 30 | static LONG WINAPI Crash(EXCEPTION_POINTERS* pExceptionPointers); 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/DiscordModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | 6 | class DiscordModule : public ToolboxModule { 7 | DiscordModule() = default; 8 | 9 | ~DiscordModule() override = default; 10 | 11 | public: 12 | static DiscordModule& Instance() 13 | { 14 | static DiscordModule instance; 15 | return instance; 16 | } 17 | 18 | [[nodiscard]] const char* Name() const override { return "Discord"; } 19 | [[nodiscard]] const char* Description() const override { return "Show better 'Now Playing' info in Discord from Guild Wars"; } 20 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HEADSET; } 21 | 22 | [[nodiscard]] const char* SettingsName() const override { return "Third Party Integration"; } 23 | 24 | void Initialize() override; 25 | void Terminate() override; 26 | void Update(float delta) override; 27 | void LoadSettings(ToolboxIni* ini) override; 28 | void SaveSettings(ToolboxIni* ini) override; 29 | void DrawSettingsInternal() override; 30 | }; 31 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ExtraWeaponSets.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class ExtraWeaponSets : public ToolboxModule { 6 | ExtraWeaponSets() = default; 7 | ~ExtraWeaponSets() override = default; 8 | 9 | public: 10 | static ExtraWeaponSets& Instance() 11 | { 12 | static ExtraWeaponSets instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Extra Weapon Sets"; } 17 | 18 | void Initialize() override; 19 | void Terminate() override; 20 | void SignalTerminate() override; 21 | bool CanTerminate() override; 22 | }; 23 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/GuildWarsSettingsModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class GuildWarsSettingsModule : public ToolboxModule { 6 | GuildWarsSettingsModule() = default; 7 | ~GuildWarsSettingsModule() override = default; 8 | 9 | public: 10 | static GuildWarsSettingsModule& Instance() 11 | { 12 | static GuildWarsSettingsModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Icon() const override { return ICON_FA_CHECK_SQUARE; } 17 | [[nodiscard]] const char* Name() const override { return "Guild Wars Settings"; } 18 | [[nodiscard]] const char* Description() const override { return "Ability to save or load Guild Wars settings to a file on disk"; } 19 | 20 | void Initialize() override; 21 | void Update(float) override; 22 | void LoadSettings(ToolboxIni* ini) override; 23 | void SaveSettings(ToolboxIni* ini) override; 24 | void Terminate() override; 25 | void DrawSettingsInternal() override; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/GwDatTextureModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class GwDatTextureModule : public ToolboxModule { 6 | GwDatTextureModule() = default; 7 | ~GwDatTextureModule() override = default; 8 | 9 | public: 10 | static GwDatTextureModule& Instance() 11 | { 12 | static GwDatTextureModule instance; 13 | return instance; 14 | } 15 | 16 | const char* Name() const override { return "GW Dat Texture Module"; }; 17 | 18 | bool HasSettings() override { return false; } 19 | 20 | void Initialize() override; 21 | 22 | void Terminate() override; 23 | 24 | static bool CloseHandle(void* handle); 25 | static bool ReadDatFile(const wchar_t* fileHash, std::vector<uint8_t>* bytes_out); 26 | 27 | static IDirect3DTexture9** LoadTextureFromFileId(uint32_t file_id); 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/HeroEquipmentModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class HeroEquipmentModule : public ToolboxWidget { 6 | HeroEquipmentModule() = default; 7 | ~HeroEquipmentModule() override = default; 8 | 9 | public: 10 | static HeroEquipmentModule& Instance() 11 | { 12 | static HeroEquipmentModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Hero Equipment"; } 17 | [[nodiscard]] const char* Description() const override { return "Allows ability for hero equipment to be viewed separately from the in-game Inventory window.\nAdds an inventory icon to title bar of hero panels."; } 18 | 19 | bool HasSettings() override { return false; } 20 | void Initialize() override; 21 | void Terminate() override; 22 | void SignalTerminate() override; 23 | bool CanTerminate() override; 24 | void Update(float) override; 25 | void SaveSettings(ToolboxIni*) override; 26 | void LoadSettings(ToolboxIni*) override; 27 | void Draw(IDirect3DDevice9*) override; 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/HintsModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class HintsModule : public ToolboxModule { 6 | public: 7 | static HintsModule& Instance() 8 | { 9 | static HintsModule instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Icon() const override { return ICON_FA_LIGHTBULB; } 14 | [[nodiscard]] const char* Name() const override { return "Hints"; } 15 | [[nodiscard]] const char* SettingsName() const override { return "In-Game Hints"; } 16 | 17 | void Initialize() override; 18 | void Update(float) override; 19 | void DrawSettingsInternal() override; 20 | void LoadSettings(ToolboxIni* ini) override; 21 | void SaveSettings(ToolboxIni* ini) override; 22 | }; 23 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ItemDescriptionHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | typedef void (__cdecl *GetItemDescriptionCallback)(uint32_t item_id, uint32_t flags, uint32_t quantity, uint32_t unk, wchar_t** out_name, wchar_t** out_desc); 6 | 7 | namespace GW { 8 | struct Item; 9 | } 10 | 11 | class ItemDescriptionHandler final : public ToolboxModule { 12 | public: 13 | static ItemDescriptionHandler& Instance() { 14 | static ItemDescriptionHandler instance; 15 | 16 | return instance; 17 | } 18 | 19 | [[nodiscard]] const char* Name() const override { return "Item Description Handler"; } 20 | [[nodiscard]] const char* Description() const override { return "Allows dynamic modification of inventory item descriptions"; } 21 | 22 | void Initialize() override; 23 | void SignalTerminate() override; 24 | 25 | static std::wstring GetItemEncNameWithoutMods(const GW::Item* item); 26 | 27 | static std::wstring GetItemDescription(const GW::Item* item); 28 | 29 | static void RegisterDescriptionCallback(GetItemDescriptionCallback callback, int altitude = 0); 30 | static void UnregisterDescriptionCallback(GetItemDescriptionCallback callback); 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ItemFilter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | 6 | class ItemFilter : public ToolboxModule { 7 | public: 8 | static ItemFilter& Instance() 9 | { 10 | static ItemFilter instance; 11 | return instance; 12 | } 13 | 14 | [[nodiscard]] const char* Name() const override { return "Item Filter"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_COINS; } 16 | [[nodiscard]] const char* SettingsName() const override { return "Item Settings"; } 17 | 18 | void Initialize() override; 19 | void SignalTerminate() override; 20 | bool CanTerminate() override; 21 | void LoadSettings(ToolboxIni* ini) override; 22 | void SaveSettings(ToolboxIni* ini) override; 23 | void DrawSettingsInternal() override; 24 | 25 | private: 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/KeyboardLanguageFix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class KeyboardLanguageFix : public ToolboxModule { 6 | public: 7 | static KeyboardLanguageFix& Instance() 8 | { 9 | static KeyboardLanguageFix instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Keyboard Layout Fix"; } 14 | [[nodiscard]] const char* Description() const override { return "Prevents Guild Wars from adding en-US keyboard language to Windows > 8 without your permission"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_MOUSE_POINTER; } 16 | 17 | bool HasSettings() override { return false; } 18 | 19 | void Initialize() override; 20 | }; 21 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/LoginModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class LoginModule : public ToolboxModule { 6 | LoginModule() = default; 7 | ~LoginModule() override = default; 8 | 9 | public: 10 | static LoginModule& Instance() 11 | { 12 | static LoginModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Login Module"; } 17 | [[nodiscard]] const char* Description() const override { return "Allows fix to allow reconnect when starting GW with charname argument.\nAdds feature to choose login scene"; } 18 | [[nodiscard]] const char* Icon() const override { return ICON_FA_DOOR_OPEN; } 19 | 20 | bool HasSettings() override; 21 | 22 | void Initialize() override; 23 | void Terminate() override; 24 | void Update(float) override; 25 | void DrawSettingsInternal() override; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/MouseFix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class MouseFix : public ToolboxModule { 6 | MouseFix() = default; 7 | ~MouseFix() override = default; 8 | 9 | public: 10 | static MouseFix& Instance() 11 | { 12 | static MouseFix instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Mouse Settings"; } 17 | [[nodiscard]] const char* Description() const override { return " - Fixes occasional camera glitch when looking around in-game\n - Adds option to scale cursor size"; } 18 | [[nodiscard]] const char* Icon() const override { return ICON_FA_MOUSE_POINTER; } 19 | 20 | void LoadSettings(ToolboxIni*) override; 21 | void SaveSettings(ToolboxIni*) override; 22 | void Initialize() override; 23 | void Terminate() override; 24 | bool WndProc(UINT, WPARAM, LPARAM) override; 25 | void DrawSettingsInternal() override; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/MouseWalkingModule.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include <Modules/MouseWalkingModule.h> 4 | #include <Defines.h> 5 | #include <Logger.h> 6 | #include <ctime> 7 | #include <GWCA/Managers/UIMgr.h> 8 | 9 | namespace { 10 | } 11 | 12 | void MouseWalkingModule::DrawSettingsInternal() 13 | { 14 | } 15 | 16 | void MouseWalkingModule::Initialize() { 17 | 18 | } 19 | 20 | void MouseWalkingModule::Terminate() { 21 | 22 | } 23 | 24 | void MouseWalkingModule::Update(float) 25 | { 26 | if (!ImGui::IsKeyDown(ImGuiKey_LeftAlt)) 27 | { 28 | if (GW::UI::GetPreference(GW::UI::FlagPreference::DisableMouseWalking)) { 29 | GW::UI::SetPreference(GW::UI::FlagPreference::DisableMouseWalking, false); 30 | } 31 | } 32 | else 33 | { 34 | if (!GW::UI::GetPreference(GW::UI::FlagPreference::DisableMouseWalking)) { 35 | GW::UI::SetPreference(GW::UI::FlagPreference::DisableMouseWalking, true); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/MouseWalkingModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class MouseWalkingModule : public ToolboxModule { 6 | MouseWalkingModule() = default; 7 | ~MouseWalkingModule() override = default; 8 | 9 | public: 10 | static MouseWalkingModule& Instance() 11 | { 12 | static MouseWalkingModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Auto Mouse Walking"; } 17 | [[nodiscard]] const char* Description() const override { return "Enables mouse-walking only when LeftAlt key is pressed"; } 18 | bool HasSettings() override { return true; } 19 | [[nodiscard]] const char* SettingsName() const override { return "Inventory Settings"; } 20 | 21 | void Update(float) override; 22 | void DrawSettingsInternal() override; 23 | void Terminate() override; 24 | void Initialize() override; 25 | }; 26 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/NPCVoiceModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/GameEntities/Agent.h> 4 | #include <GWCA/Managers/AgentMgr.h> 5 | #include <GWCA/Managers/MapMgr.h> 6 | #include <GWCA/Managers/UIMgr.h> 7 | #include <GWCA/Utilities/Hook.h> 8 | #include <ToolboxModule.h> 9 | #include <ToolboxUIElement.h> 10 | 11 | #include <chrono> 12 | #include <future> 13 | #include <map> 14 | #include <memory> 15 | #include <set> 16 | #include <string> 17 | #include <tuple> 18 | #include <unordered_map> 19 | #include <vector> 20 | 21 | enum class TTSProvider : uint32_t { ElevenLabs, OpenAI, Google, PlayHT }; 22 | 23 | class NPCVoiceModule : public ToolboxModule { 24 | public: 25 | static NPCVoiceModule& Instance() 26 | { 27 | static NPCVoiceModule instance; 28 | return instance; 29 | } 30 | 31 | const char* Name() const override { return "NPC Voice"; } 32 | const char* Description() const override { return "AI-generated voices for NPCs using ElevenLabs or OpenAI TTS with cost optimization"; } 33 | const char* Icon() const override { return ICON_FA_VOLUME_UP; } 34 | 35 | void Initialize() override; 36 | void Terminate() override; 37 | void LoadSettings(ToolboxIni* ini) override; 38 | void SaveSettings(ToolboxIni* ini) override; 39 | void DrawSettingsInternal() override; 40 | }; 41 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/Obfuscator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class Obfuscator : public ToolboxModule { 6 | public: 7 | static Obfuscator& Instance() 8 | { 9 | static Obfuscator instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Obfuscator"; } 14 | [[nodiscard]] const char* Icon() const override { return ICON_FA_USER_SECRET; } 15 | 16 | void Initialize() override; 17 | void Update(float) override; 18 | void SignalTerminate() override; 19 | bool CanTerminate() override; 20 | void DrawSettingsInternal() override; 21 | void SaveSettings(ToolboxIni* ini) override; 22 | void LoadSettings(ToolboxIni* ini) override; 23 | 24 | static void Obfuscate(bool obfuscate); 25 | static bool IsObfuscatedName(const std::wstring&); 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/PartyBroadcastModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | 5 | #include <ToolboxModule.h> 6 | #include <minwindef.h> 7 | #include <ToolboxIni.h> 8 | 9 | class PartyBroadcast : public ToolboxModule { 10 | PartyBroadcast() = default; 11 | public: 12 | static PartyBroadcast& Instance() 13 | { 14 | static PartyBroadcast instance; 15 | return instance; 16 | } 17 | 18 | [[nodiscard]] const char* Name() const override { return "Party Broadcast"; } 19 | [[nodiscard]] const char* Description() const override { return "Broadcast party searches to https://party.gwtoolbox.com"; } 20 | [[nodiscard]] const char* SettingsName() const override { return "Game Settings"; } 21 | 22 | void Initialize() override; 23 | void Terminate() override; 24 | void SignalTerminate() override; 25 | bool CanTerminate() override; 26 | void Update(float) override; 27 | bool HasSettings() override { return false; } 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/PartyWindowModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | #include <GWCA/Packets/StoC.h> 5 | 6 | class PartyWindowModule : public ToolboxModule { 7 | PartyWindowModule() = default; 8 | 9 | public: 10 | static PartyWindowModule& Instance() 11 | { 12 | static PartyWindowModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Party Window"; } 17 | [[nodiscard]] const char* Description() const override { return "Includes features to:\nAdd player numbers to party window in explorable area\nAbility to add other NPCs to the party window"; } 18 | [[nodiscard]] const char* SettingsName() const override { return "Party Settings"; } 19 | void Initialize() override; 20 | void Terminate() override; 21 | void Update(float) override; 22 | void SignalTerminate() override; 23 | bool CanTerminate() override; 24 | void LoadSettings(ToolboxIni* ini) override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | void DrawSettingsInternal() override; 27 | const std::map<std::wstring, std::wstring>& GetAliasedPlayerNames(); 28 | 29 | private: 30 | static void LoadDefaults(); 31 | void SetAliasedPlayerName(GW::Packet::StoC::PlayerJoinInstance* pak); 32 | std::map<std::wstring, std::wstring> aliased_player_names{}; 33 | }; 34 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/PluginModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIElement.h> 4 | #include <../plugins/Base/ToolboxPlugin.h> 5 | 6 | class PluginModule final : public ToolboxUIElement { 7 | PluginModule() = default; 8 | ~PluginModule() override = default; 9 | 10 | public: 11 | struct Plugin { 12 | Plugin(std::filesystem::path _path) 13 | : path(std::move(_path)) { } 14 | 15 | std::filesystem::path path; 16 | HMODULE dll = nullptr; 17 | ToolboxPlugin* instance = nullptr; 18 | bool initialized = false; 19 | bool terminating = false; 20 | bool visible = false; 21 | }; 22 | 23 | static PluginModule& Instance() 24 | { 25 | static PluginModule instance; 26 | return instance; 27 | } 28 | 29 | [[nodiscard]] const char* Name() const override { return "Plugins"; } 30 | [[nodiscard]] const char* Icon() const override { return ICON_FA_PUZZLE_PIECE; } 31 | 32 | [[nodiscard]] bool ShowOnWorldMap() const override { return true; } 33 | 34 | void Draw(IDirect3DDevice9*) override; 35 | void DrawSettingsInternal() override; 36 | void LoadSettings(ToolboxIni*) override; 37 | void SaveSettings(ToolboxIni*) override; 38 | void Update(float) override; 39 | void Initialize() override; 40 | void SignalTerminate() override; 41 | void Terminate() override; 42 | bool CanTerminate() override; 43 | bool WndProc(UINT, WPARAM, LPARAM) override; 44 | 45 | static std::vector<ToolboxPlugin*> GetPlugins(); 46 | 47 | void ShowVisibleRadio() override { } 48 | void DrawSizeAndPositionSettings() override { } 49 | }; 50 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/PriceCheckerModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class PriceCheckerModule : public ToolboxModule { 6 | PriceCheckerModule() = default; 7 | ~PriceCheckerModule() override = default; 8 | 9 | public: 10 | static PriceCheckerModule& Instance() 11 | { 12 | static PriceCheckerModule instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Price Checker"; } 17 | [[nodiscard]] const char* Description() const override { return "Adds extra information to the hover description of an item"; } 18 | bool HasSettings() override { return true; } 19 | [[nodiscard]] const char* SettingsName() const override { return "Inventory Settings"; } 20 | 21 | void Initialize() override; 22 | void Terminate() override; 23 | void LoadSettings(ToolboxIni* ini) override; 24 | void DrawSettingsInternal() override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | 27 | // Returns a list of prices by identifier. Materials have identifiers are "model_id", but runes and mods are "model_id-mod_struct" 28 | static const std::unordered_map<std::string,uint32_t>& FetchPrices(); 29 | }; 30 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ResignLogModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | 6 | class ResignLogModule : public ToolboxModule { 7 | ResignLogModule() = default; 8 | ~ResignLogModule() override = default; 9 | 10 | public: 11 | static ResignLogModule& Instance() 12 | { 13 | static ResignLogModule instance; 14 | return instance; 15 | } 16 | 17 | [[nodiscard]] const char* Name() const override { return "Resign Log"; } 18 | [[nodiscard]] const char* Description() const override { return "Tracks player resign state in an explorable area, adds /resignlog command"; } 19 | bool HasSettings() override { return false; } 20 | 21 | void Initialize() override; 22 | void SignalTerminate() override; 23 | void Update(float) override; 24 | void LoadSettings(ToolboxIni* ini) override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | 27 | void RegisterSettingsContent() override; 28 | 29 | static bool PrintResignStatus(const uint32_t player_number, std::wstring& out, bool include_timestamp = false); 30 | }; 31 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/SalvageInfoModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | #include <GWCA/GameEntities/Item.h> 5 | #include <string.h> 6 | 7 | class SalvageInfoModule : public ToolboxModule { 8 | SalvageInfoModule() = default; 9 | ~SalvageInfoModule() override = default; 10 | 11 | public: 12 | static SalvageInfoModule& Instance() 13 | { 14 | static SalvageInfoModule instance; 15 | return instance; 16 | } 17 | 18 | [[nodiscard]] const char* Name() const override { return "Salvage Info"; } 19 | [[nodiscard]] const char* Description() const override { return "Adds salvage information into crafting materials to the hover description of an item"; } 20 | bool HasSettings() override { return true; } 21 | [[nodiscard]] const char* SettingsName() const override { return "Inventory Settings"; } 22 | 23 | void Initialize() override; 24 | void Terminate() override; 25 | void LoadSettings(ToolboxIni* ini) override; 26 | void RegisterSettingsContent() override; 27 | void SaveSettings(ToolboxIni* ini) override; 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/Teamspeak5Module.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class Teamspeak5Module : public ToolboxModule { 6 | public: 7 | static Teamspeak5Module& Instance() 8 | { 9 | static Teamspeak5Module instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Teamspeak 5"; } 14 | [[nodiscard]] const char* Description() const override { return "Enables /teamspeak command to send current teamspeak 5 server info to chat"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HEADSET; } 16 | 17 | [[nodiscard]] const char* SettingsName() const override { return "Third Party Integration"; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | void Update(float) override; 22 | void DrawSettingsInternal() override; 23 | 24 | void LoadSettings(ToolboxIni* ini) override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/TeamspeakModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class TeamspeakModule : public ToolboxModule { 6 | public: 7 | static TeamspeakModule& Instance() 8 | { 9 | static TeamspeakModule instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Teamspeak 3"; } 14 | [[nodiscard]] const char* Description() const override { return "Enables /teamspeak command to send current teamspeak 3 server info to chat"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HEADSET; } 16 | 17 | [[nodiscard]] const char* SettingsName() const override { return "Third Party Integration"; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | void Update(float) override; 22 | void DrawSettingsInternal() override; 23 | 24 | void LoadSettings(ToolboxIni* ini) override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ToolboxSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIElement.h> 4 | 5 | namespace GW::Constants { 6 | enum class MapID : uint32_t; 7 | } 8 | 9 | class ToolboxSettings : public ToolboxUIElement { 10 | ToolboxSettings() = default; 11 | ~ToolboxSettings() override = default; 12 | 13 | public: 14 | static ToolboxSettings& Instance() 15 | { 16 | static ToolboxSettings instance; 17 | return instance; 18 | } 19 | 20 | [[nodiscard]] const char* Name() const override { return "Toolbox Settings"; } 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_TOOLBOX; } 22 | 23 | static void LoadModules(ToolboxIni* ini); 24 | 25 | void Update(float delta) override; 26 | 27 | void LoadSettings(ToolboxIni* ini) override; 28 | void SaveSettings(ToolboxIni* ini) override; 29 | void DrawSettingsInternal() override; 30 | void Draw(IDirect3DDevice9*) override; 31 | 32 | void ShowVisibleRadio() override { }; 33 | 34 | static void DrawFreezeSetting(); 35 | 36 | void DrawSizeAndPositionSettings() override { } 37 | 38 | static inline bool move_all = false; 39 | static inline bool clamp_windows_to_screen = false; 40 | static inline bool hide_on_loading_screen = false; 41 | static inline bool send_anonymous_gameplay_info = true; 42 | private: 43 | // === location stuff === 44 | clock_t location_timer = 0; 45 | GW::Constants::MapID location_current_map = static_cast<GW::Constants::MapID>(0); 46 | std::wofstream location_file; 47 | bool save_location_data = false; 48 | }; 49 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/ToolboxTheme.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIElement.h> 4 | 5 | class ToolboxTheme : public ToolboxUIElement { 6 | ToolboxTheme(); 7 | 8 | public: 9 | static ToolboxTheme& Instance() 10 | { 11 | static ToolboxTheme instance; 12 | return instance; 13 | } 14 | 15 | [[nodiscard]] const char* Name() const override { return "Theme"; } 16 | [[nodiscard]] const char* Icon() const override { return ICON_FA_PALETTE; } 17 | 18 | void Terminate() override; 19 | void LoadSettings(ToolboxIni* ini) override; 20 | void SaveSettings(ToolboxIni* ini) override; 21 | void Draw(IDirect3DDevice9* device) override; 22 | 23 | void ShowVisibleRadio() override { } 24 | 25 | void DrawSizeAndPositionSettings() override { } 26 | 27 | void SaveUILayout(); 28 | void LoadUILayout(); 29 | 30 | void DrawSettingsInternal() override; 31 | 32 | ToolboxIni* GetLayoutIni(bool reload = true); 33 | ToolboxIni* GetThemeIni(bool reload = true); 34 | 35 | private: 36 | static ImGuiStyle DefaultTheme(); 37 | 38 | float font_global_scale = 1.0; 39 | ImGuiStyle ini_style; 40 | bool layout_dirty = false; 41 | bool imgui_style_loaded = false; 42 | 43 | ToolboxIni* theme_ini = nullptr; 44 | ToolboxIni* layout_ini = nullptr; 45 | }; 46 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/TwitchModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "IRC.h" 4 | #include <ToolboxModule.h> 5 | 6 | class TwitchModule : public ToolboxModule { 7 | TwitchModule() = default; 8 | TwitchModule(const TwitchModule&) = delete; 9 | 10 | ~TwitchModule() override = default; 11 | 12 | public: 13 | static TwitchModule& Instance() 14 | { 15 | static TwitchModule instance; 16 | return instance; 17 | } 18 | 19 | [[nodiscard]] const char* Name() const override { return "Twitch"; } 20 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HEADSET; } 21 | [[nodiscard]] const char* Description() const override { return " - Show the live chat from a running Twitch stream directly in chat.\n - Send a whisper to 'Twitch' to send a message to Twitch from GW"; } 22 | [[nodiscard]] const char* SettingsName() const override { return "Third Party Integration"; } 23 | 24 | void Initialize() override; 25 | void SignalTerminate() override; 26 | bool CanTerminate() override; 27 | void Update(float delta) override; 28 | void LoadSettings(ToolboxIni* ini) override; 29 | void SaveSettings(ToolboxIni* ini) override; 30 | void DrawSettingsInternal() override; 31 | 32 | static bool Connect(); 33 | static void Disconnect(); 34 | static bool IsConnected(); 35 | static IRC* irc(); 36 | }; 37 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/Updater.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIElement.h> 4 | 5 | struct GWToolboxRelease { 6 | std::string body; 7 | std::string version; 8 | std::string download_url; 9 | uintmax_t size = 0; 10 | }; 11 | 12 | class Updater : public ToolboxUIElement { 13 | Updater() { can_show_in_main_window = false; }; 14 | ~Updater() override = default; 15 | 16 | public: 17 | static Updater& Instance() 18 | { 19 | static Updater instance; 20 | return instance; 21 | } 22 | 23 | [[nodiscard]] const char* Name() const override { return "Updater"; } 24 | // DrawSettingInternal() called via ToolboxSettings; don't draw it again 25 | bool HasSettings() override { return false; } 26 | 27 | void RegisterSettingsContent() override 28 | { 29 | ToolboxModule::RegisterSettingsContent(); 30 | } 31 | 32 | static void CheckForUpdate(bool forced = false); 33 | static bool IsLatestVersion(); 34 | 35 | static const GWToolboxRelease* GetCurrentVersionInfo(GWToolboxRelease* out); 36 | 37 | void Draw(IDirect3DDevice9* device) override; 38 | 39 | void LoadSettings(ToolboxIni* ini) override; 40 | void SaveSettings(ToolboxIni* ini) override; 41 | void DrawSettingsInternal() override; 42 | 43 | static const std::string& GetServerVersion(); 44 | }; 45 | -------------------------------------------------------------------------------- /GWToolboxdll/Modules/VendorFix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxModule.h> 4 | 5 | class VendorFix : public ToolboxModule { 6 | VendorFix() = default; 7 | ~VendorFix() override = default; 8 | 9 | public: 10 | static VendorFix& Instance() 11 | { 12 | static VendorFix instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Vendor Fix"; } 17 | [[nodiscard]] const char* Description() const override { return "Fixes bug preventing collectable items in latter inventory slots not being recognised by a vendor"; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | bool HasSettings() override { return false; } 22 | }; 23 | -------------------------------------------------------------------------------- /GWToolboxdll/Timer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ctime> 4 | 5 | /* 6 | This class makes using timers easier 7 | 8 | clock type is clock_t 9 | 10 | create a timer with TIMER_INIT() 11 | 12 | find the difference in milliseconds with TIMER_DIFF(clock_t timer) 13 | */ 14 | 15 | inline clock_t TIMER_INIT() 16 | { 17 | return clock(); 18 | } 19 | 20 | inline clock_t TIMER_DIFF(const clock_t t) 21 | { 22 | return TIMER_INIT() - t; 23 | } 24 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxBreakoutWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include <thread> 3 | #include <d3d9.h> 4 | 5 | class ToolboxBreakoutWindow { 6 | protected: 7 | 8 | std::thread OSWindowThread; 9 | D3DPRESENT_PARAMETERS g_d3dpp = { 0 }; 10 | LPDIRECT3DDEVICE9 g_pd3dDevice = nullptr; 11 | bool g_DeviceLost = false; 12 | LPDIRECT3D9 g_pD3D = nullptr; 13 | UINT g_ResizeWidth = 0, g_ResizeHeight = 0; 14 | HWND window_handle = 0; 15 | const wchar_t* window_name = L"Another ToolboxBreakoutWindow"; 16 | 17 | std::recursive_mutex window_mutex; 18 | 19 | // Forward declarations of helper functions 20 | bool CreateDeviceD3D(); 21 | void CleanupDeviceD3D(); 22 | void ResetDevice(); 23 | int CreateOSWindow(); 24 | LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 25 | 26 | public: 27 | void Resize(uint32_t width, uint32_t height); 28 | void Initialize(); 29 | void Terminate(); 30 | }; 31 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxIni.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include <ToolboxIni.h> 4 | 5 | SI_Error ToolboxIni::LoadFile(const wchar_t* a_pwszFile) 6 | { 7 | const std::filesystem::path pFile = a_pwszFile; 8 | return LoadFile(pFile); 9 | } 10 | 11 | SI_Error ToolboxIni::LoadIfExists(const std::filesystem::path& a_pwszFile) 12 | { 13 | if (!exists(a_pwszFile)) { 14 | Log::LogW(L"[ToolboxIni] %s doesn't exist", a_pwszFile.wstring().c_str()); 15 | return SI_OK; 16 | } 17 | return LoadFile(a_pwszFile); 18 | } 19 | 20 | SI_Error ToolboxIni::LoadFile(const std::filesystem::path& a_pwszFile) 21 | { 22 | int res = -1; 23 | 24 | Reset(); 25 | // 3 tries to load from disk 26 | for (auto i = 0; i < 3 && res != SI_OK; i++) { 27 | res = CSimpleIni::LoadFile(a_pwszFile.wstring().c_str()); 28 | } 29 | if (res == SI_OK) { 30 | Log::LogW(L"[ToolboxIni] LoadFile successful for %s", a_pwszFile.wstring().c_str()); 31 | // Store location on disk on successful load 32 | location_on_disk = a_pwszFile; 33 | } 34 | else { 35 | Log::LogW(L"[ToolboxIni] LoadFile failed for %s", a_pwszFile.wstring().c_str()); 36 | } 37 | return res; 38 | } 39 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxIni.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <SimpleIni.h> 4 | 5 | class ToolboxIni : public CSimpleIni { 6 | public: 7 | ToolboxIni( 8 | const bool a_bIsUtf8 = false, 9 | const bool a_bMultiKey = false, 10 | const bool a_bMultiLine = false 11 | ) 12 | : CSimpleIni(a_bIsUtf8, a_bMultiKey, a_bMultiLine) { } 13 | 14 | // Returns SI_OK if file doesn't exist or was read successfully. 15 | SI_Error LoadIfExists(const std::filesystem::path& a_pwszFile); 16 | // Returns SI_OK if file exists and was read successfully 17 | SI_Error LoadFile(const std::filesystem::path& a_pwszFile); 18 | SI_Error LoadFile(const wchar_t* a_pwszFile); 19 | std::filesystem::path location_on_disk; 20 | }; 21 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include <ToolboxWidget.h> 4 | #include <Modules/ToolboxSettings.h> 5 | 6 | ImGuiWindowFlags ToolboxWidget::GetWinFlags(ImGuiWindowFlags flags) const 7 | { 8 | return GetWinFlags(flags, false); 9 | } 10 | 11 | ImGuiWindowFlags ToolboxWidget::GetWinFlags(ImGuiWindowFlags flags, const bool noinput_if_frozen) const 12 | { 13 | flags = ToolboxUIElement::GetWinFlags(flags); 14 | flags |= ImGuiWindowFlags_NoTitleBar; 15 | flags |= ImGuiWindowFlags_NoScrollbar; 16 | if (noinput_if_frozen && lock_move && lock_size && !ToolboxSettings::move_all) { 17 | flags |= ImGuiWindowFlags_NoInputs; 18 | } 19 | return flags; 20 | } 21 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIElement.h> 4 | 5 | class ToolboxWidget : public ToolboxUIElement { 6 | public: 7 | ToolboxWidget() { lock_move = lock_size = true; } 8 | ~ToolboxWidget() override = default; 9 | 10 | [[nodiscard]] bool IsWidget() const override { return true; } 11 | [[nodiscard]] const char* TypeName() const override { return "widget"; } 12 | 13 | [[nodiscard]] virtual ImGuiWindowFlags GetWinFlags(ImGuiWindowFlags flags = 0) const override; 14 | 15 | [[nodiscard]] virtual ImGuiWindowFlags GetWinFlags(ImGuiWindowFlags flags, bool noinput_if_frozen) const; 16 | }; 17 | -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxWindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/GWToolboxdll/ToolboxWindow.cpp -------------------------------------------------------------------------------- /GWToolboxdll/ToolboxWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Defines.h> 4 | #include <ToolboxUIElement.h> 5 | 6 | /* 7 | A ToolboxWindow is a module which also has an interface 8 | */ 9 | class ToolboxWindow : public ToolboxUIElement { 10 | public: 11 | [[nodiscard]] bool IsWindow() const override { return true; } 12 | [[nodiscard]] const char* TypeName() const override { return "window"; } 13 | 14 | void Initialize() override 15 | { 16 | ToolboxUIElement::Initialize(); 17 | has_closebutton = true; 18 | } 19 | 20 | void LoadSettings(ToolboxIni* ini) override 21 | { 22 | ToolboxUIElement::LoadSettings(ini); 23 | LOAD_BOOL(show_closebutton); 24 | } 25 | 26 | void SaveSettings(ToolboxIni* ini) override 27 | { 28 | ToolboxUIElement::SaveSettings(ini); 29 | SAVE_BOOL(show_closebutton); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/ChatLog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | 5 | #include <ToolboxModule.h> 6 | #include <minwindef.h> 7 | 8 | namespace GW::Chat { 9 | struct ChatMessage; 10 | } 11 | 12 | class ChatLog : public ToolboxModule { 13 | ChatLog() = default; 14 | public: 15 | static ChatLog& Instance() 16 | { 17 | static ChatLog instance; 18 | return instance; 19 | } 20 | 21 | [[nodiscard]] const char* Name() const override { return "Chat Log"; } 22 | [[nodiscard]] const char* Description() const override { return "Guild Wars doesn't save your chat history or sent messages if you log out of the game.\nTurn this feature on to let GWToolbox keep better track of your chat history between logins"; } 23 | [[nodiscard]] const char* SettingsName() const override { return "Chat Settings"; } 24 | 25 | void Initialize() override; 26 | void Terminate() override; 27 | void DrawSettingsInternal() override; 28 | void Update(float) override; 29 | void LoadSettings(ToolboxIni* ini) override; 30 | void SaveSettings(ToolboxIni* ini) override; 31 | void SetEnabled(bool _enabled); 32 | 33 | }; 34 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/DialogsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class DialogsWindow : public ToolboxWindow { 6 | DialogsWindow() = default; 7 | ~DialogsWindow() = default; 8 | 9 | public: 10 | static DialogsWindow& Instance() { 11 | static DialogsWindow instance; 12 | return instance; 13 | } 14 | 15 | const char* Name() const override { return "Dialogs"; } 16 | const char* Icon() const override { return ICON_FA_COMMENT_DOTS; } 17 | 18 | void Draw(IDirect3DDevice9* pDevice) override; 19 | 20 | void LoadSettings(CSimpleIni* ini) override; 21 | void SaveSettings(CSimpleIni* ini) override; 22 | void DrawSettingInternal() override; 23 | }; 24 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/GWDatBrowser/AtexAsm.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct SImageDescriptor { 4 | int xres, yres; 5 | unsigned char *Data; 6 | int a; 7 | int b; 8 | unsigned char *image; 9 | int imageformat; 10 | int c; 11 | }; 12 | 13 | int DecompressAtex( int a, int b, int imageformat, int d, int e, int f, int g ); 14 | void AtexDecompress( unsigned int *input, unsigned int unknown, unsigned int imageformat, SImageDescriptor ImageDescriptor, unsigned int *output ); 15 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/GWDatBrowser/AtexReader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <gdiplus.h> 4 | #include "AtexReader.h" 5 | 6 | union RGBA 7 | { 8 | unsigned char c[4]; 9 | struct { unsigned char r, g, b, a; }; 10 | unsigned int dw; 11 | }; 12 | bool ProcessImageFile(unsigned char* img, int size, Gdiplus::Bitmap* image); 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/GWDatBrowser/xentax.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void UnpackGWDat( unsigned char *input, int insize, unsigned char *&output, int &outsize ); 4 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/InventoryOverlayWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class InventoryOverlayWidget : public ToolboxWidget { 6 | InventoryOverlayWidget() 7 | { 8 | is_movable = is_resizable = has_closebutton = false; 9 | } 10 | ~InventoryOverlayWidget() override = default; 11 | 12 | public: 13 | static InventoryOverlayWidget& Instance() 14 | { 15 | static InventoryOverlayWidget instance; 16 | return instance; 17 | } 18 | 19 | [[nodiscard]] const char* Name() const override { return "Inventory Overlay"; } 20 | [[nodiscard]] const char* Icon() const override { return ICON_FA_SQUARE; } 21 | 22 | void Initialize() override; 23 | void Terminate() override; 24 | void Draw(IDirect3DDevice9*) override; 25 | void DrawSettingsInternal() override; 26 | void LoadSettings(ToolboxIni* ini) override; 27 | void SaveSettings(ToolboxIni* ini) override; 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Unused/ZrawDeepModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | 5 | #include <GWCA/Packets/StoC.h> 6 | 7 | #include <ToolboxModule.h> 8 | 9 | class ZrawDeepModule : public ToolboxModule { 10 | public: 11 | static ZrawDeepModule& Instance() 12 | { 13 | static ZrawDeepModule instance; 14 | return instance; 15 | } 16 | 17 | [[nodiscard]] const char* Name() const override { return "24h Deep Mode"; } 18 | void Initialize() override; 19 | void Terminate() override; 20 | void SignalTerminate() override; 21 | bool CanTerminate() override; 22 | void SetEnabled(bool enabled); 23 | void Update(float delta) override; 24 | void DrawSettingsInternal() override; 25 | static void DisplayDialogue(GW::Packet::StoC::DisplayDialogue*); 26 | static void PlayKanaxaiDialog(uint8_t idx); 27 | void SaveSettings(ToolboxIni* ini) override; 28 | void LoadSettings(ToolboxIni* ini) override; 29 | 30 | void SetTransmogs() const; 31 | static bool IsEnabled(); 32 | 33 | GW::HookEntry ZrawDeepModule_StoCs; 34 | }; 35 | -------------------------------------------------------------------------------- /GWToolboxdll/Utf8.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace utf8 { 4 | struct string { 5 | char* bytes = nullptr; 6 | size_t count = 0; 7 | bool allocated = false; 8 | 9 | string() = default; 10 | 11 | ~string() 12 | { 13 | if (allocated) { 14 | free(bytes); 15 | } 16 | bytes = nullptr; 17 | count = 0; 18 | } 19 | 20 | string(const string& s) = delete; 21 | string& operator=(const string& s) = delete; 22 | 23 | string(string&& s) noexcept 24 | { 25 | bytes = s.bytes; 26 | count = s.count; 27 | s.bytes = nullptr; 28 | s.count = 0; 29 | } 30 | 31 | string& operator=(string&& s) noexcept 32 | { 33 | bytes = s.bytes; 34 | count = s.count; 35 | s.bytes = nullptr; 36 | s.count = 0; 37 | return *this; 38 | } 39 | }; 40 | } 41 | 42 | // encode a unicode16 to utf8 using a allocated buffer (malloc). 43 | utf8::string Unicode16ToUtf8(const wchar_t* str); 44 | utf8::string Unicode16ToUtf8(const wchar_t* start, const wchar_t* end); 45 | 46 | // encode a unicode16 to utf8 using the provided buffer. 47 | utf8::string Unicode16ToUtf8(char* buffer, size_t n_buffer, const wchar_t* start, const wchar_t* end); 48 | 49 | size_t Utf8ToUnicode(const char* str, wchar_t* buffer, size_t count); 50 | -------------------------------------------------------------------------------- /GWToolboxdll/Utils/FontLoader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef DLLAPI 4 | #ifdef GWCA_IMPORT 5 | #define DLLAPI 6 | #else 7 | #define DLLAPI extern "C" __declspec(dllexport) 8 | #endif 9 | #endif 10 | 11 | namespace FontLoader { 12 | enum class FontSize { 13 | text = 16, 14 | header2 = 18, 15 | header1 = 20, 16 | widget_label = 24, 17 | widget_small = 40, 18 | widget_large = 48 19 | }; 20 | 21 | constexpr float text_size_min = 0.f; 22 | constexpr float text_size_max = static_cast<float>(FontSize::widget_large); 23 | 24 | constexpr std::array font_sizes = { 25 | FontSize::text, 26 | FontSize::header2, 27 | FontSize::header1, 28 | FontSize::widget_label, 29 | FontSize::widget_small, 30 | FontSize::widget_large 31 | }; 32 | constexpr std::array font_size_names = {"16", "18", "20", "24", "40", "48"}; 33 | 34 | // Cycle through our own fonts, release any valid textures 35 | bool ReleaseFontTextures(); 36 | // Cycle through our own fonts, create any missing textures 37 | bool CreateFontTextures(); 38 | bool FontsLoaded(); 39 | void LoadFonts(bool force = false); 40 | DLLAPI ImFont* GetFont(FontSize size); 41 | 42 | // Given an ideal font size in px, return the best fit font. 43 | // NOTE: This font will NOT be automatically resized to the desired scale. 44 | DLLAPI ImFont* GetFontByPx(float size_in_px, bool include_global_font_scale = true); 45 | 46 | void Terminate(); 47 | } 48 | -------------------------------------------------------------------------------- /GWToolboxdll/Utils/RateLimiter.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "RateLimiter.h" 4 | 5 | // Get more information here: https://www.codeofhonor.com/blog/using-transaction-rate-limiting-to-improve-service-reliability 6 | 7 | RateLimiter::RateLimiter() 8 | { 9 | m_time = GetTickCount(); 10 | } 11 | 12 | bool RateLimiter::AddTime(const uint32_t cost_ms, const uint32_t max_cost_ms) 13 | { 14 | const uint64_t current_time = GetTickCount(); 15 | if (current_time > m_time) { 16 | m_time = current_time; 17 | } 18 | 19 | const uint64_t new_time = m_time + cost_ms; 20 | if (current_time >= new_time || 21 | new_time - current_time >= max_cost_ms) { 22 | return false; 23 | } 24 | 25 | m_time = new_time; 26 | return true; 27 | } 28 | -------------------------------------------------------------------------------- /GWToolboxdll/Utils/RateLimiter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class RateLimiter { 4 | public: 5 | RateLimiter(); 6 | 7 | bool AddTime(uint32_t cost_ms, uint32_t max_cost_ms); 8 | 9 | private: 10 | uint64_t m_time; 11 | }; 12 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/ActiveQuestWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class ActiveQuestWidget : public ToolboxWidget { 6 | ActiveQuestWidget() = default; 7 | ~ActiveQuestWidget() override = default; 8 | 9 | public: 10 | static ActiveQuestWidget& Instance() 11 | { 12 | static ActiveQuestWidget instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Active Quest Info"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_BAHAI; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | void Update(float) override; 22 | void Draw(IDirect3DDevice9*) override; 23 | }; 24 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/BondsWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Widgets/SnapsToPartyWindow.h> 4 | 5 | namespace GW { 6 | namespace Constants { 7 | enum class SkillID : uint32_t; 8 | } 9 | } 10 | 11 | class BondsWidget : public SnapsToPartyWindow { 12 | protected: 13 | bool DrawBondImage(uint32_t agent_id, GW::Constants::SkillID skill_id, ImVec2* top_left_out, ImVec2* bottom_right_out); 14 | bool GetBondPosition(uint32_t agent_id, GW::Constants::SkillID skill_id, ImVec2* top_left_out, ImVec2* bottom_right_out); 15 | public: 16 | static BondsWidget& Instance() 17 | { 18 | static BondsWidget instance; 19 | return instance; 20 | } 21 | 22 | [[nodiscard]] const char* Name() const override { return "Bonds"; } 23 | [[nodiscard]] const char* Icon() const override { return ICON_FA_BARS; } 24 | 25 | void Initialize() override; 26 | void Terminate() override; 27 | 28 | // Draw user interface. Will be called every frame if the element is visible 29 | void Draw(IDirect3DDevice9* device) override; 30 | 31 | void LoadSettings(ToolboxIni* ini) override; 32 | void SaveSettings(ToolboxIni* ini) override; 33 | void DrawSettingsInternal() override; 34 | 35 | static bool IsBondLikeSkill(GW::Constants::SkillID skill_id); 36 | }; 37 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/ClockWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class ClockWidget : public ToolboxWidget { 6 | ClockWidget() = default; 7 | ~ClockWidget() override = default; 8 | 9 | public: 10 | static ClockWidget& Instance() 11 | { 12 | static ClockWidget instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Clock"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_CLOCK; } 18 | 19 | // Draw user interface. Will be called every frame if the element is visible 20 | void Draw(IDirect3DDevice9* pDevice) override; 21 | 22 | void LoadSettings(ToolboxIni* ini) override; 23 | void SaveSettings(ToolboxIni* ini) override; 24 | void DrawSettingsInternal() override; 25 | 26 | private: 27 | bool use_24h_clock = true; 28 | bool show_seconds = false; 29 | }; 30 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/DistanceWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class DistanceWidget : public ToolboxWidget { 6 | DistanceWidget() 7 | { 8 | is_resizable = false; 9 | auto_size = true; 10 | } 11 | ~DistanceWidget() override = default; 12 | 13 | public: 14 | static DistanceWidget& Instance() 15 | { 16 | static DistanceWidget instance; 17 | return instance; 18 | } 19 | 20 | [[nodiscard]] const char* Name() const override { return "Distance"; } 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_RULER; } 22 | 23 | // Draw user interface. Will be called every frame if the element is visible 24 | void Draw(IDirect3DDevice9* pDevice) override; 25 | void DrawSettingsInternal() override; 26 | void LoadSettings(ToolboxIni* ini) override; 27 | void SaveSettings(ToolboxIni* ini) override; 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/EffectsMonitorWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class EffectsMonitorWidget : public ToolboxWidget { 6 | EffectsMonitorWidget() { is_movable = is_resizable = false; } 7 | ~EffectsMonitorWidget() override = default; 8 | 9 | public: 10 | static EffectsMonitorWidget& Instance() 11 | { 12 | static EffectsMonitorWidget instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override 17 | { 18 | return "Effect Durations"; 19 | } 20 | 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HISTORY; } 22 | 23 | void Initialize() override; 24 | void Terminate() override; 25 | void Update(float) override; 26 | 27 | void LoadSettings(ToolboxIni* ini) override; 28 | void SaveSettings(ToolboxIni* ini) override; 29 | void DrawSettingsInternal() override; 30 | void Draw(IDirect3DDevice9* pDevice) override; 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/InventoryOverlayWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class InventoryOverlayWidget : public ToolboxWidget { 6 | public: 7 | static InventoryOverlayWidget& Instance() 8 | { 9 | static InventoryOverlayWidget instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Inventory Overlay"; } 14 | [[nodiscard]] const char* Description() const override { return "Draws over the top of inventory slots in-game to better identify items"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_TH; } 16 | 17 | void LoadSettings(ToolboxIni* ini) override; 18 | void SaveSettings(ToolboxIni* ini) override; 19 | void DrawSettingsInternal() override; 20 | void Initialize() override; 21 | void SignalTerminate() override; 22 | 23 | // Draw user interface. Will be called every frame if the element is visible 24 | void Draw(IDirect3DDevice9* pDevice) override; 25 | }; 26 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/LatencyWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class LatencyWidget : public ToolboxWidget { 6 | LatencyWidget() = default; 7 | ~LatencyWidget() override = default; 8 | 9 | 10 | public: 11 | static LatencyWidget& Instance() 12 | { 13 | static LatencyWidget instance; 14 | return instance; 15 | } 16 | 17 | 18 | [[nodiscard]] const char* Name() const override { return "Latency"; } 19 | [[nodiscard]] const char* Icon() const override { return ICON_FA_STOPWATCH; } 20 | 21 | void Initialize() override; 22 | void Terminate() override; 23 | void Update(float delta) override; 24 | 25 | static void SendPing(); 26 | static uint32_t GetPing(); 27 | static uint32_t GetAveragePing(); 28 | 29 | // Draw user interface. Will be called every frame if the element is visible 30 | void Draw(IDirect3DDevice9* pDevice) override; 31 | 32 | void LoadSettings(ToolboxIni* ini) override; 33 | 34 | void SaveSettings(ToolboxIni* ini) override; 35 | 36 | void DrawSettingsInternal() override; 37 | 38 | static ImColor GetColorForPing(uint32_t ping); 39 | }; 40 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/D3DVertex.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct D3DVertex { 4 | float x; 5 | float y; 6 | float z; 7 | D3DCOLOR color; 8 | }; 9 | 10 | constexpr auto D3DFVF_CUSTOMVERTEX = D3DFVF_XYZ | D3DFVF_DIFFUSE; 11 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/EffectRenderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/GameContainers/GamePos.h> 4 | 5 | #include <GWCA/Packets/StoC.h> 6 | 7 | #include <Widgets/Minimap/VBuffer.h> 8 | 9 | class EffectRenderer : public VBuffer { 10 | friend class Minimap; 11 | 12 | public: 13 | void Render(IDirect3DDevice9* device) override; 14 | 15 | void Invalidate() override; 16 | void Terminate() override; 17 | void PacketCallback(const GW::Packet::StoC::GenericValue* pak) const; 18 | void PacketCallback(const GW::Packet::StoC::GenericValueTarget* pak) const; 19 | void PacketCallback(GW::Packet::StoC::PlayEffect* pak) const; 20 | 21 | static void LoadDefaults(); 22 | static void DrawSettings(); 23 | void LoadSettings(const ToolboxIni* ini, const char* section); 24 | static void SaveSettings(ToolboxIni* ini, const char* section); 25 | 26 | private: 27 | void Initialize(IDirect3DDevice9* device) override; 28 | 29 | static void RemoveTriggeredEffect(uint32_t effect_id, GW::Vec2f* pos); 30 | void DrawAoeEffects(IDirect3DDevice9* device); 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/PmapRenderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Color.h> 4 | #include <Widgets/Minimap/VBuffer.h> 5 | 6 | class PmapRenderer : public VBuffer { 7 | public: 8 | // Triangle 1: (XTL, YT) (XTR, YT), (XBL, YB) 9 | // Triangle 2: (XBL, YB), (XTR, YT), (XBR, YB) 10 | void Render(IDirect3DDevice9* device) override; 11 | 12 | void DrawSettings(); 13 | void LoadSettings(const ToolboxIni* ini, const char* section); 14 | void SaveSettings(ToolboxIni* ini, const char* section) const; 15 | Color GetBackgroundColor() const { return color_mapbackground; } 16 | 17 | protected: 18 | void Initialize(IDirect3DDevice9* device) override; 19 | 20 | private: 21 | Color color_map = 0; 22 | Color color_mapshadow = 0; 23 | Color color_mapbackground = 0; 24 | 25 | size_t trapez_count_ = 0; 26 | size_t tri_count_ = 0; // of just 1 batch (map) 27 | size_t total_tri_count_ = 0; // including shadow 28 | size_t vert_count_ = 0; 29 | size_t total_vert_count_ = 0; // including shadow 30 | }; 31 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/RangeRenderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Color.h> 4 | #include <Widgets/Minimap/VBuffer.h> 5 | 6 | class RangeRenderer : public VBuffer { 7 | static constexpr size_t num_circles = 8; 8 | static constexpr size_t circle_points = 192; 9 | static constexpr size_t circle_triangles = circle_points - 2; 10 | 11 | public: 12 | void Render(IDirect3DDevice9* device) override; 13 | void SetDrawCenter(const bool b) { draw_center_ = b; } 14 | 15 | void DrawSettings(); 16 | void LoadSettings(const ToolboxIni* ini, const char* section); 17 | void SaveSettings(ToolboxIni* ini, const char* section) const; 18 | void LoadDefaults(); 19 | // Returns number of vertices used. 20 | size_t CreateCircle(D3DVertex* vertices, float radius, DWORD color) const; 21 | 22 | private: 23 | void Initialize(IDirect3DDevice9* device) override; 24 | 25 | bool HaveHos(); 26 | 27 | bool checkforhos_ = true; 28 | bool havehos_ = false; 29 | 30 | bool draw_center_ = false; 31 | 32 | float line_thickness = 1.f; 33 | 34 | Color color_range_chain_aggro = 0; 35 | Color color_range_res_aggro = 0; 36 | 37 | Color color_range_hos = 0; 38 | Color color_range_aggro = 0; 39 | Color color_range_cast = 0; 40 | Color color_range_spirit = 0; 41 | Color color_range_compass = 0; 42 | Color color_range_shadowstep_aggro = 0; 43 | }; 44 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/Shaders/constant_colour_ps.hlsl: -------------------------------------------------------------------------------- 1 | cbuffer cbPerFrame : register(c0) 2 | { 3 | float4 color : register(c0); 4 | } 5 | 6 | float4 main() : SV_TARGET 7 | { 8 | return color; 9 | } 10 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/Shaders/game_world_renderer_dotted_ps.hlsl: -------------------------------------------------------------------------------- 1 | // Two attributes to this shader (provided once per frame): 2 | float4 cur_pos : register(c0); // only xyz components are used 3 | float4 max_dist : register(c1); // only x component is used 4 | float4 fog_starts_at : register(c2); // only x component is used 5 | bool use_dotted_effect : register(b0); 6 | 7 | // Compute the euclidean distance between two 3D points. 8 | float euclidean(float3 p1, float3 p2) { 9 | float delta1 = (p1.x - p2.x); 10 | float delta2 = (p1.y - p2.y); 11 | float delta3 = (p1.z - p2.z); 12 | return sqrt(delta1 * delta1 + delta2 * delta2 + delta3 * delta3); 13 | } 14 | 15 | // The pixel shader takes, for each pixel, a position, a color value, and a world coordinate. 16 | struct PS_INPUT { 17 | float4 position : SV_POSITION; 18 | float4 color : COLOR; 19 | float4 position_for_dist_check : TEXCOORD0; 20 | }; 21 | 22 | // Main entry point for this shader. 23 | float4 main(PS_INPUT input) : COLOR { 24 | // If this pixel is >= max_dist away, discard it. 25 | float pixel_dist = euclidean(cur_pos.xyz, input.position_for_dist_check.xyz); 26 | if (pixel_dist >= max_dist.x) { // completely removed 27 | discard; 28 | } 29 | 30 | if (use_dotted_effect) { 31 | // Calculate the modulo to create the dotted effect 32 | float pattern = fmod(pixel_dist, 200.0); 33 | if (pattern > 100.0) { 34 | discard; 35 | } 36 | } 37 | 38 | float4 output = input.color; 39 | if (pixel_dist > fog_starts_at.x) { // fog is applied 40 | output.rgba = lerp(output.rgba, float4(0.0, 0.0, 0.0, 0.0), (pixel_dist - fog_starts_at.x) / (max_dist.x - fog_starts_at.x)); 41 | } 42 | 43 | return output; 44 | } 45 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/Shaders/game_world_renderer_ps.hlsl: -------------------------------------------------------------------------------- 1 | // Two attributes to this shader (provided once per frame): 2 | float4 cur_pos : register(c0); // only xyz components are used 3 | float4 max_dist : register(c1); // only x component is used 4 | float4 fog_starts_at : register(c2); // only x component is used 5 | 6 | 7 | // Compute the euclidean distance between two 3D points. 8 | float euclidean(float3 p1, float3 p2) { 9 | float delta1 = (p1.x - p2.x); 10 | float delta2 = (p1.y - p2.y); 11 | float delta3 = (p1.z - p2.z); 12 | return sqrt(pow(delta1, 2.0) + pow(delta2, 2.0) + pow(delta3, 2.0)); 13 | } 14 | 15 | 16 | // The pixel shader takes, for each pixel, an position, a color value, and a world coordinate. 17 | // All are interoplated by the GPU for the current pixel (fragment). 18 | struct PS_INPUT { 19 | float4 position : SV_POSITION; 20 | float4 color : COLOR; 21 | float4 position_for_dist_check : TEXCOORD0; 22 | }; 23 | 24 | 25 | // Main entrypoint for this shader. 26 | float4 main(PS_INPUT input) : COLOR { 27 | // If this pixel is >= max_dist away, render it fully transparent. 28 | // `clip(-1)` did not work for unknown reasons. 29 | float pixel_dist = euclidean(cur_pos.xyz, input.position_for_dist_check.xyz); 30 | if (pixel_dist >= max_dist.x) { // completely removed 31 | return float4(0.0, 0.0, 0.0, 0.0); 32 | } 33 | float4 output = input.color; 34 | if (pixel_dist > fog_starts_at.x) { // fog is applied 35 | output.rgba = lerp(output.rgba, float4(0.0, 0.0, 0.0, 0.0), (pixel_dist - fog_starts_at.x) / (max_dist.x - fog_starts_at.x)); 36 | } 37 | return output; 38 | } 39 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/Shaders/game_world_renderer_vs.hlsl: -------------------------------------------------------------------------------- 1 | // Note: World matrix is absent - we're dealing with world coords as inputs. 2 | float4x4 view_matrix : register(c0); 3 | float4x4 proj_matrix : register(c4); 4 | 5 | 6 | // The vertex shader takes, for each vertex, a position and color value. 7 | struct VS_INPUT { 8 | float3 position : POSITION; 9 | float4 color : COLOR; 10 | }; 11 | 12 | 13 | // The vertex shader produces, for each vertex, a position, a color value, and a distance check position value. 14 | // The distance check value is in world coords, the `position` (SV_POSITION) is always in clip space. 15 | struct VS_OUTPUT { 16 | float4 position : SV_POSITION; 17 | float4 color : COLOR; 18 | float4 position_for_dist_check : TEXCOORD0; 19 | }; 20 | 21 | 22 | // Main entrypoint for this shader. 23 | VS_OUTPUT main(VS_INPUT input) { 24 | VS_OUTPUT output; 25 | // Pass the vertex color through to the pixel shader untouched. 26 | output.color = input.color; 27 | 28 | // Provide the pixel shader the world coords (input coords) for the vertex. 29 | output.position_for_dist_check = float4(input.position, 1.0); 30 | 31 | // SV_POSITION is then multiplied with the View and Projection matrices. 32 | output.position = float4(input.position, 1.0); 33 | output.position = mul(output.position, view_matrix); 34 | output.position = mul(output.position, proj_matrix); 35 | return output; 36 | } 37 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/SymbolsRenderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Widgets/Minimap/VBuffer.h> 4 | 5 | class SymbolsRenderer : public VBuffer { 6 | friend class QuestModule; 7 | public: 8 | SymbolsRenderer() = default; 9 | 10 | void Invalidate() override; 11 | void Render(IDirect3DDevice9* device) override; 12 | 13 | void DrawSettings(); 14 | void LoadSettings(const ToolboxIni* ini, const char* section); 15 | void SaveSettings(ToolboxIni* ini, const char* section) const; 16 | 17 | private: 18 | void Initialize(IDirect3DDevice9* device) override; 19 | Color color_quest = 0; 20 | Color color_other_quests = 0; 21 | Color color_north = 0; 22 | Color color_modifier = 0; 23 | 24 | const DWORD star_ntriangles = 16; 25 | DWORD star_offset = 0; 26 | 27 | const DWORD arrow_ntriangles = 2; 28 | DWORD arrow_offset = 0; 29 | 30 | const DWORD north_ntriangles = 2; 31 | DWORD north_offset = 0; 32 | 33 | bool initialized = false; 34 | }; 35 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/Minimap/VBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "D3DVertex.h" 4 | 5 | /* 6 | This class is essentially a glorified vertex buffer, containing everything 7 | that is necessary to render the vertex buffer. 8 | 9 | classes implementing this class only need to implement Initialize which 10 | should contain code that: 11 | - populates the vertex buffer "buffer_" 12 | - sets the primitive type "type_" 13 | - sets the primitive count "count_" 14 | 15 | afterward just call Render and the vertex buffer will be rendered 16 | 17 | you can call Invalidate() to have the initialize be called again on render 18 | */ 19 | 20 | class VBuffer { 21 | public: 22 | virtual ~VBuffer() = default; 23 | 24 | virtual void Invalidate() 25 | { 26 | if (buffer) { 27 | buffer->Release(); 28 | } 29 | buffer = nullptr; 30 | initialized = false; 31 | } 32 | 33 | virtual void Render(IDirect3DDevice9* device) 34 | { 35 | if (!initialized) { 36 | initialized = true; 37 | Initialize(device); 38 | } 39 | 40 | device->SetFVF(D3DFVF_CUSTOMVERTEX); 41 | device->SetStreamSource(0, buffer, 0, sizeof(D3DVertex)); 42 | device->DrawPrimitive(type, 0, count); 43 | } 44 | 45 | virtual void Terminate() 46 | { 47 | Invalidate(); 48 | } 49 | 50 | virtual void Initialize(IDirect3DDevice9* device) = 0; 51 | 52 | protected: 53 | IDirect3DVertexBuffer9* buffer = nullptr; 54 | D3DPRIMITIVETYPE type = D3DPT_TRIANGLELIST; 55 | unsigned long count = 0; 56 | bool initialized = false; 57 | }; 58 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/MissionMapWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class MissionMapWidget : public ToolboxWidget { 6 | MissionMapWidget() 7 | { 8 | visible = true; 9 | can_show_in_main_window = false; 10 | has_closebutton = false; 11 | has_titlebar = false; 12 | is_resizable = false; 13 | is_movable = false; 14 | } 15 | ~MissionMapWidget() override = default; 16 | 17 | public: 18 | static MissionMapWidget& Instance() 19 | { 20 | static MissionMapWidget w; 21 | return w; 22 | } 23 | [[nodiscard]] const char* Name() const override { return "Mission Map"; } 24 | [[nodiscard]] const char* Icon() const override { return ICON_FA_GLOBE; } 25 | 26 | void LoadSettings(ToolboxIni*) override; 27 | void SaveSettings(ToolboxIni*) override; 28 | void Draw(IDirect3DDevice9* pDevice) override; 29 | void DrawSettingsInternal() override; 30 | void Terminate() override; 31 | bool WndProc(UINT Message, WPARAM, LPARAM lParam) override; 32 | }; 33 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/PartyDamage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Defines.h> 4 | 5 | #include <GWCA/Packets/StoC.h> 6 | 7 | #include <Widgets/SnapsToPartyWindow.h> 8 | 9 | namespace GW { 10 | namespace Packet { 11 | namespace StoC { 12 | struct MapLoaded; 13 | } 14 | } 15 | struct HookStatus; 16 | } 17 | 18 | class PartyDamage : public SnapsToPartyWindow { 19 | protected: 20 | struct PlayerDamage; 21 | static std::vector<PartyDamage::PlayerDamage> damage; 22 | 23 | static void WriteDamageOf(size_t index, uint32_t rank = 0); 24 | static void WritePartyDamage(); 25 | static void WriteOwnDamage(); 26 | static void ResetDamage(); 27 | 28 | static PlayerDamage* GetDamageByAgentId(uint32_t agent_id, uint32_t* party_index_out = nullptr); 29 | 30 | static void CHAT_CMD_FUNC(CmdDamage); 31 | 32 | static void MapLoadedCallback(GW::HookStatus*, const GW::Packet::StoC::MapLoaded*); 33 | static void DamagePacketCallback(GW::HookStatus*, const GW::Packet::StoC::GenericModifier*); 34 | 35 | public: 36 | static PartyDamage& Instance() 37 | { 38 | static PartyDamage instance; 39 | return instance; 40 | } 41 | 42 | [[nodiscard]] const char* Name() const override { return "Damage"; } 43 | [[nodiscard]] const char* Icon() const override { return ICON_FA_BARS; } 44 | 45 | void Initialize() override; 46 | void Terminate() override; 47 | 48 | // Draw user interface. Will be called every frame if the element is visible 49 | void Draw(IDirect3DDevice9* pDevice) override; 50 | 51 | void Update(float delta) override; 52 | 53 | void LoadSettings(ToolboxIni* ini) override; 54 | void SaveSettings(ToolboxIni* ini) override; 55 | void DrawSettingsInternal() override; 56 | 57 | }; 58 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/ServerInfoWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | 5 | #include <ToolboxWidget.h> 6 | 7 | class ServerInfoWidget : public ToolboxWidget { 8 | ServerInfoWidget() = default; 9 | ServerInfoWidget(const ServerInfoWidget&) = delete; 10 | 11 | ~ServerInfoWidget() override 12 | { 13 | if (server_info_fetcher.joinable()) { 14 | server_info_fetcher.join(); 15 | } 16 | } 17 | 18 | public: 19 | struct ServerInfo { 20 | ServerInfo(const std::string& _ip) 21 | : ip(_ip) { } 22 | 23 | std::string ip; 24 | std::string country; 25 | std::string city; 26 | time_t last_update = 0; 27 | }; 28 | 29 | private: 30 | std::map<std::string, ServerInfo*> servers_by_ip{}; 31 | ServerInfo* current_server_info = nullptr; 32 | std::thread server_info_fetcher; 33 | GW::HookEntry InstanceLoadInfo_HookEntry; 34 | 35 | public: 36 | static ServerInfoWidget& Instance() 37 | { 38 | static ServerInfoWidget instance; 39 | return instance; 40 | } 41 | 42 | ServerInfo* GetServerInfo(); 43 | [[nodiscard]] const char* Name() const override { return "Server Info"; } 44 | 45 | void Initialize() override; 46 | void Update(float delta) override; 47 | void LoadSettings(ToolboxIni* ini) override; 48 | void SaveSettings(ToolboxIni* ini) override; 49 | 50 | void Draw(IDirect3DDevice9* pDevice) override; 51 | void DrawSettingsInternal() override; 52 | }; 53 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/SkillMonitorWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include <GWCA/GameEntities/Agent.h> 3 | 4 | #include <GWCA/Constants/Skills.h> 5 | 6 | #include <GWCA/Managers/UIMgr.h> 7 | 8 | #include <Color.h> 9 | #include <Timer.h> 10 | #include <Widgets/SnapsToPartyWindow.h> 11 | 12 | class SkillMonitorWidget : public SnapsToPartyWindow { 13 | protected: 14 | static void OnStoCPacket(GW::HookStatus* status, GW::Packet::StoC::PacketBase* base); 15 | static void SkillCallback(const uint32_t value_id, const uint32_t caster_id, const uint32_t value); 16 | public: 17 | static SkillMonitorWidget& Instance() 18 | { 19 | static SkillMonitorWidget instance; 20 | return instance; 21 | } 22 | 23 | [[nodiscard]] const char* Name() const override { return "Skill Monitor"; } 24 | [[nodiscard]] const char* Icon() const override { return ICON_FA_HISTORY; } 25 | 26 | void Initialize() override; 27 | void Terminate() override; 28 | 29 | void Draw(IDirect3DDevice9* device) override; 30 | void Update(float delta) override; 31 | 32 | void LoadSettings(ToolboxIni* ini) override; 33 | void SaveSettings(ToolboxIni* ini) override; 34 | void DrawSettingsInternal() override; 35 | }; 36 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/SnapsToPartyWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | #include <Utils/GuiUtils.h> 6 | 7 | class SnapsToPartyWindow : public ToolboxWidget { 8 | protected: 9 | struct PartyFramePosition { 10 | ImVec2 top_left; 11 | ImVec2 bottom_right; 12 | }; 13 | static PartyFramePosition party_health_bars_position; 14 | static std::unordered_map<uint32_t, PartyFramePosition> agent_health_bar_positions; 15 | 16 | static uint32_t henchmen_start_idx; 17 | static uint32_t pets_start_idx; 18 | static uint32_t allies_start_idx; 19 | static std::unordered_map<uint32_t,uint32_t> party_indeces_by_agent_id; 20 | static std::vector<uint32_t> party_agent_ids_by_index; 21 | static std::vector<GuiUtils::EncString*> party_names_by_index; 22 | 23 | static bool RecalculatePartyPositions(); 24 | static bool FetchPartyInfo(); 25 | static PartyFramePosition* GetAgentHealthBarPosition(uint32_t agent_id); 26 | public: 27 | void Initialize() override; 28 | void Terminate() override; 29 | 30 | ImGuiWindowFlags GetWinFlags(ImGuiWindowFlags flags = 0, bool noinput_if_frozen = true) const override; 31 | 32 | void Draw(IDirect3DDevice9* device) override; 33 | }; 34 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/VanquishWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | class VanquishWidget : public ToolboxWidget { 6 | VanquishWidget() = default; 7 | ~VanquishWidget() override = default; 8 | 9 | public: 10 | static VanquishWidget& Instance() 11 | { 12 | static VanquishWidget instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Vanquish"; } 17 | 18 | [[nodiscard]] const char* Icon() const override { return ICON_FA_SKULL; } 19 | 20 | void Draw(IDirect3DDevice9* pDevice) override; 21 | 22 | void DrawSettingsInternal() override; 23 | }; 24 | -------------------------------------------------------------------------------- /GWToolboxdll/Widgets/WorldMapWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWidget.h> 4 | 5 | namespace GW { 6 | struct GamePos; 7 | struct Vec2f; 8 | namespace Constants { 9 | enum class MapID : uint32_t; 10 | } 11 | } 12 | 13 | class WorldMapWidget : public ToolboxWidget { 14 | WorldMapWidget() = default; 15 | ~WorldMapWidget() override = default; 16 | 17 | public: 18 | static WorldMapWidget& Instance() 19 | { 20 | static WorldMapWidget w; 21 | return w; 22 | } 23 | 24 | void Initialize() override; 25 | 26 | void SignalTerminate() override; 27 | 28 | void RegisterSettingsContent() override { }; 29 | 30 | [[nodiscard]] bool ShowOnWorldMap() const override { return true; } 31 | [[nodiscard]] const char* Name() const override { return "World Map"; } 32 | [[nodiscard]] const char* Icon() const override { return ICON_FA_GLOBE; } 33 | 34 | void LoadSettings(ToolboxIni*) override; 35 | void SaveSettings(ToolboxIni*) override; 36 | void Draw(IDirect3DDevice9* pDevice) override; 37 | void DrawSettingsInternal() override; 38 | bool WndProc(UINT, WPARAM, LPARAM) override; 39 | 40 | static void ShowAllOutposts(bool show); 41 | static GW::Constants::MapID GetMapIdForLocation(const GW::Vec2f& world_map_pos, GW::Constants::MapID exclude_map_id = (GW::Constants::MapID)0); 42 | static bool WorldMapToGamePos(const GW::Vec2f& world_map_pos, GW::GamePos& game_map_pos); 43 | static bool GamePosToWorldMap(const GW::GamePos& game_map_pos, GW::Vec2f& world_map_pos); 44 | }; 45 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/ArmoryWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class ArmoryWindow : public ToolboxWindow { 6 | public: 7 | static ArmoryWindow& Instance() 8 | { 9 | static ArmoryWindow instance; 10 | return instance; 11 | } 12 | ArmoryWindow() { 13 | show_menubutton = can_show_in_main_window; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Armory"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_VEST; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | 22 | void Draw(IDirect3DDevice9* pDevice) override; 23 | }; 24 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/DupingWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class DupingWindow : public ToolboxWindow { 6 | DupingWindow() = default; 7 | ~DupingWindow() override = default; 8 | 9 | public: 10 | static DupingWindow& Instance() 11 | { 12 | static DupingWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Duping"; } 17 | [[nodiscard]] const char* Description() const override { return "Keeps track of soul/water/mind tormentor counts in Ravenheart Gloom"; } 18 | [[nodiscard]] const char* Icon() const override { return ICON_FA_COPY; } 19 | 20 | void Terminate() override; 21 | 22 | // Update. Will always be called every frame. 23 | void Update(float) override { } 24 | 25 | // Draw user interface. Will be called every frame if the element is visible 26 | void Draw(IDirect3DDevice9* pDevice) override; 27 | 28 | void DrawSettingsInternal() override; 29 | void LoadSettings(ToolboxIni* ini) override; 30 | void SaveSettings(ToolboxIni* ini) override; 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/EnemyWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class EnemyWindow : public ToolboxWindow { 6 | EnemyWindow() = default; 7 | ~EnemyWindow() override = default; 8 | 9 | public: 10 | static EnemyWindow& Instance() 11 | { 12 | static EnemyWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Enemy Window"; } 17 | [[nodiscard]] const char* Description() const override { return "Keeps track of enemies"; } 18 | [[nodiscard]] const char* Icon() const override { return ICON_FA_COPY; } 19 | 20 | void Terminate() override; 21 | 22 | // Update. Will always be called every frame. 23 | void Update(float) override {} 24 | 25 | // Draw user interface. Will be called every frame if the element is visible 26 | void Draw(IDirect3DDevice9* pDevice) override; 27 | 28 | void DrawSettingsInternal() override; 29 | void LoadSettings(ToolboxIni* ini) override; 30 | void SaveSettings(ToolboxIni* ini) override; 31 | }; 32 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/FactionLeaderboardWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <GWCA/Utilities/Hook.h> 4 | 5 | #include <Utils/GuiUtils.h> 6 | #include <ToolboxWindow.h> 7 | 8 | class FactionLeaderboardWindow : public ToolboxWindow { 9 | FactionLeaderboardWindow() = default; 10 | ~FactionLeaderboardWindow() override = default; 11 | 12 | 13 | public: 14 | static FactionLeaderboardWindow& Instance() 15 | { 16 | static FactionLeaderboardWindow instance; 17 | return instance; 18 | } 19 | 20 | [[nodiscard]] const char* Name() const override { return "Faction Leaderboard"; } 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_GLOBE; } 22 | 23 | // Draw user interface. Will be called every frame if the element is visible 24 | void Draw(IDirect3DDevice9* pDevice) override; 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/GuildWarsPreferencesWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class GuildWarsPreferencesWindow : public ToolboxWindow { 6 | GuildWarsPreferencesWindow() = default; 7 | ~GuildWarsPreferencesWindow() override = default; 8 | 9 | public: 10 | static GuildWarsPreferencesWindow& Instance() 11 | { 12 | static GuildWarsPreferencesWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Guild Wars Preferences"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_COGS; } 18 | 19 | void Initialize() override; 20 | 21 | void Draw(IDirect3DDevice9* pDevice) override; 22 | 23 | private: 24 | }; 25 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/HotkeysWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | #include <Windows/Hotkeys.h> 6 | 7 | // class used to keep a list of hotkeys, capture keyboard event and fire hotkeys as needed 8 | class HotkeysWindow : public ToolboxWindow { 9 | HotkeysWindow() = default; 10 | ~HotkeysWindow() override = default; 11 | 12 | public: 13 | static HotkeysWindow& Instance() 14 | { 15 | static HotkeysWindow instance; 16 | return instance; 17 | } 18 | 19 | [[nodiscard]] const char* Name() const override { return "Hotkeys"; } 20 | [[nodiscard]] const char* Icon() const override { return ICON_FA_KEYBOARD; } 21 | 22 | void Initialize() override; 23 | void Terminate() override; 24 | 25 | static bool ToggleClicker(); 26 | static bool ToggleCoinDrop(); 27 | 28 | static void ChooseKeyCombo(TBHotkey* hotkey); 29 | 30 | static const TBHotkey* CurrentHotkey(); 31 | 32 | // Update. Will always be called every frame. 33 | void Update(float delta) override; 34 | 35 | // Draw user interface. Will be called every frame if the element is visible 36 | void Draw(IDirect3DDevice9* pDevice) override; 37 | 38 | bool WndProc(UINT Message, WPARAM wParam, LPARAM lParam) override; 39 | 40 | void DrawSettingsInternal() override; 41 | void LoadSettings(ToolboxIni* ini) override; 42 | void SaveSettings(ToolboxIni* ini) override; 43 | }; 44 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/InfoWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class InfoWindow : public ToolboxWindow { 6 | InfoWindow() = default; 7 | ~InfoWindow() override = default; 8 | 9 | public: 10 | static InfoWindow& Instance() 11 | { 12 | static InfoWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Info"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_INFO_CIRCLE; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | void SignalTerminate() override; 22 | 23 | void Draw(IDirect3DDevice9* pDevice) override; 24 | 25 | void DrawSettingsInternal() override; 26 | void LoadSettings(ToolboxIni* ini) override; 27 | void SaveSettings(ToolboxIni* ini) override; 28 | }; 29 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/MaterialsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class MaterialsWindow : public ToolboxWindow { 6 | MaterialsWindow() = default; 7 | ~MaterialsWindow() override = default; 8 | 9 | public: 10 | static MaterialsWindow& Instance() 11 | { 12 | static MaterialsWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Materials"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_FEATHER_ALT; } 18 | 19 | void Initialize() override; 20 | void Terminate() override; 21 | 22 | void DrawSettingsInternal() override; 23 | void LoadSettings(ToolboxIni* ini) override; 24 | void SaveSettings(ToolboxIni* ini) override; 25 | 26 | bool GetIsInProgress() const; 27 | 28 | // Update. Will always be called every frame. 29 | void Update(float delta) override; 30 | 31 | // Draw user interface. Will be called every frame if the element is visible 32 | void Draw(IDirect3DDevice9* pDevice) override; 33 | 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/NotePadWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ToolboxWindow.h" 4 | 5 | class NotePadWindow : public ToolboxWindow { 6 | NotePadWindow() = default; 7 | ~NotePadWindow() override = default; 8 | 9 | public: 10 | static NotePadWindow& Instance() 11 | { 12 | static NotePadWindow instance; 13 | return instance; 14 | } 15 | 16 | [[nodiscard]] const char* Name() const override { return "Notepad"; } 17 | [[nodiscard]] const char* Icon() const override { return ICON_FA_CLIPBOARD; } 18 | 19 | // Draw user interface. Will be called every frame if the element is visible 20 | void Draw(IDirect3DDevice9* pDevice) override; 21 | 22 | void Initialize() override; 23 | void Terminate() override; 24 | void LoadSettings(ToolboxIni* ini) override; 25 | void SaveSettings(ToolboxIni* ini) override; 26 | void DrawSettingsInternal() override; 27 | }; 28 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/ObserverExportWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class ObserverExportWindow : public ToolboxWindow { 6 | public: 7 | ObserverExportWindow() = default; 8 | ~ObserverExportWindow() override = default; 9 | 10 | static ObserverExportWindow& Instance() 11 | { 12 | static ObserverExportWindow instance; 13 | return instance; 14 | } 15 | 16 | enum class Version { 17 | V_0_1, 18 | V_1_0 19 | }; 20 | 21 | static std::string PadLeft(std::string input, uint8_t count, char c); 22 | static nlohmann::json ToJSON_V_0_1(); 23 | static nlohmann::json ToJSON_V_1_0(); 24 | static void ExportToJSON(Version version); 25 | 26 | [[nodiscard]] const char* Name() const override { return "Observer Export"; }; 27 | [[nodiscard]] const char* Icon() const override { return ICON_FA_EYE; } 28 | void Draw(IDirect3DDevice9* pDevice) override; 29 | void Initialize() override; 30 | 31 | void LoadSettings(ToolboxIni* ini) override; 32 | void SaveSettings(ToolboxIni* ini) override; 33 | void DrawSettingsInternal() override; 34 | 35 | protected: 36 | float text_long = 0; 37 | float text_medium = 0; 38 | float text_short = 0; 39 | float text_tiny = 0; 40 | }; 41 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/ObserverTargetWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <Windows/ObserverPlayerWindow.h> 4 | 5 | class ObserverTargetWindow : public ObserverPlayerWindow { 6 | ObserverTargetWindow() = default; 7 | ~ObserverTargetWindow() override = default; 8 | 9 | public: 10 | static ObserverTargetWindow& Instance() 11 | { 12 | static ObserverTargetWindow instance; 13 | return instance; 14 | } 15 | 16 | void Prepare() override; 17 | uint32_t GetTracking() override; 18 | uint32_t GetComparison() override; 19 | 20 | [[nodiscard]] const char* Name() const override { return "Observer Target"; } 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_EYE; } 22 | 23 | protected: 24 | uint32_t current_tracked_agent_id = NO_AGENT; 25 | uint32_t current_compared_agent_id = NO_AGENT; 26 | }; 27 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/PartyStatisticsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class PartyStatisticsWindow : public ToolboxWindow { 6 | public: 7 | static PartyStatisticsWindow& Instance() 8 | { 9 | static PartyStatisticsWindow instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Party Statistics"; } 14 | [[nodiscard]] const char* Icon() const override { return ICON_FA_TABLE; } 15 | 16 | void Initialize() override; 17 | void Terminate() override; 18 | 19 | void Draw(IDirect3DDevice9* pDevice) override; 20 | void Update(float delta) override; 21 | 22 | void LoadSettings(ToolboxIni* ini) override; 23 | void SaveSettings(ToolboxIni* ini) override; 24 | void DrawSettingsInternal() override; 25 | }; 26 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/Pathfinding/MathUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include <GWCA/GameContainers/GamePos.h> 3 | 4 | namespace MathUtil { 5 | //Interception on a straight line segment. This function assumes that there are no obstacles for any agent. 6 | GW::Vec2f intercept(const GW::Vec2f &chaser, const float &chaser_vel, 7 | const GW::Vec2f &target, const GW::Vec2f &direction, const float &target_vel, float radius); 8 | 9 | GW::Vec3f GetVec3f(const GW::GamePos &gp); 10 | 11 | float sign(const float &a); 12 | 13 | GW::Vec2f sign(const GW::Vec2f &a); 14 | 15 | GW::Vec2f Hadamard(const GW::Vec2f &lhs, const GW::Vec2f &rhs); 16 | 17 | float Cross(const GW::Vec2f &lhs, const GW::Vec2f &rhs); 18 | 19 | float Dot(const GW::Vec2f& lhs, const GW::Vec2f& rhs); 20 | 21 | // Given three collinear points p, q, r, the function checks if 22 | // point q lies on line segment 'pr' 23 | bool onSegment(const GW::Vec2f &p, const GW::Vec2f &q, const GW::Vec2f &r); 24 | 25 | // The main function that returns true if line segment 'p1q1' 26 | // and 'p2q2' intersect. 27 | bool Intersect(const GW::Vec2f &p1, const GW::Vec2f &q1, const GW::Vec2f &p2, const GW::Vec2f &q2); 28 | 29 | bool between(float x, float min, float max); 30 | 31 | bool collinear(const GW::Vec2f &a1, const GW::Vec2f &a2, const GW::Vec2f &b1, const GW::Vec2f &b2); 32 | } 33 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/Pathfinding/PathfindingWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | #include <Windows/Pathfinding/Pathing.h> 5 | 6 | using CalculatedCallback = std::function<void (std::vector<GW::GamePos>& waypoints, void* args)>; 7 | 8 | /* 9 | This should really have been a module to just manage pathing - its used in a lot of places. 10 | Instead, disable the Draw function in release 11 | */ 12 | class PathfindingWindow : public ToolboxWindow { 13 | PathfindingWindow() = default; 14 | ~PathfindingWindow() = default; 15 | 16 | public: 17 | static PathfindingWindow& Instance() 18 | { 19 | static PathfindingWindow instance; 20 | return instance; 21 | } 22 | 23 | [[nodiscard]] const char* Name() const override { return "Pathfinding Window"; } 24 | [[nodiscard]] const char* Icon() const override { return ICON_FA_DOOR_OPEN; } 25 | 26 | bool HasSettings() { return false; } 27 | 28 | void Draw(IDirect3DDevice9* pDevice) override; 29 | void SignalTerminate() override; 30 | bool CanTerminate() override; 31 | void Initialize() override; 32 | void Terminate() override; 33 | // False if still calculating current map 34 | static bool ReadyForPathing(); 35 | // False if still calculating current map 36 | static bool CalculatePath(const GW::GamePos& from, const GW::GamePos& to, CalculatedCallback callback, void* args = nullptr); 37 | 38 | private: 39 | GW::GamePos m_saved_pos; 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/RerollWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ToolboxWindow.h" 4 | #include <GWCA/GameEntities/Friendslist.h> 5 | #include <GWCA/GameEntities/Guild.h> 6 | 7 | namespace GW::Constants { 8 | enum class MapID : uint32_t; 9 | enum class ServerRegion; 10 | enum class Language; 11 | } 12 | 13 | class RerollWindow : public ToolboxWindow { 14 | RerollWindow() = default; 15 | 16 | public: 17 | static RerollWindow& Instance() 18 | { 19 | static RerollWindow instance; 20 | return instance; 21 | } 22 | 23 | [[nodiscard]] const char* Name() const override { return "Reroll"; } 24 | [[nodiscard]] const char* Icon() const override { return ICON_FA_USERS; } 25 | 26 | // Draw user interface. Will be called every frame if the element is visible 27 | void Draw(IDirect3DDevice9* pDevice) override; 28 | 29 | void Initialize() override; 30 | void Terminate() override; 31 | void Update(float) override; 32 | 33 | void LoadSettings(ToolboxIni* ini) override; 34 | void SaveSettings(ToolboxIni* ini) override; 35 | 36 | bool Reroll(const wchar_t* character_name, bool same_map = true, bool same_party = true); 37 | bool Reroll(const wchar_t* character_name, GW::Constants::MapID _map_id); 38 | }; 39 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/SettingsWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class SettingsWindow : public ToolboxWindow { 6 | SettingsWindow() 7 | { 8 | show_menubutton = true; 9 | } 10 | 11 | ~SettingsWindow() override = default; 12 | 13 | public: 14 | static SettingsWindow& Instance() 15 | { 16 | static SettingsWindow instance; 17 | return instance; 18 | } 19 | 20 | [[nodiscard]] const char* Name() const override { return "Settings"; } 21 | [[nodiscard]] const char* Icon() const override { return ICON_FA_COGS; } 22 | 23 | void LoadSettings(ToolboxIni* ini) override; 24 | void SaveSettings(ToolboxIni* ini) override; 25 | 26 | // Draw user interface. Will be called every frame if the element is visible 27 | void Draw(IDirect3DDevice9* pDevice) override; 28 | 29 | bool DrawSettingsSection(const char* section); 30 | 31 | size_t sep_modules = 0; 32 | size_t sep_windows = 0; 33 | size_t sep_widgets = 0; 34 | 35 | private: 36 | std::map<std::string, bool> drawn_settings{}; 37 | bool hide_when_entering_explorable = false; 38 | }; 39 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/StringDecoderWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class StringDecoderWindow : public ToolboxWindow { 6 | StringDecoderWindow() = default; 7 | 8 | ~StringDecoderWindow() override 9 | { 10 | delete[] encoded; 11 | encoded = nullptr; 12 | } 13 | 14 | public: 15 | static StringDecoderWindow& Instance() 16 | { 17 | static StringDecoderWindow instance; 18 | return instance; 19 | } 20 | 21 | [[nodiscard]] const char* Name() const override { return "String Decoder"; } 22 | [[nodiscard]] const char* Icon() const override { return ICON_FA_LOCK_OPEN; } 23 | 24 | void Draw(IDirect3DDevice9* pDevice) override; 25 | 26 | void Initialize() override; 27 | 28 | void Decode(); 29 | void DecodeFromMapId(); 30 | void Send() const; 31 | std::wstring GetEncodedString() const; 32 | 33 | static void PrintEncStr(const wchar_t* enc_str); 34 | 35 | private: 36 | int encoded_id = 0; 37 | char* encoded = nullptr; 38 | const size_t encoded_size = 8192; 39 | std::wstring decoded; 40 | int map_id = 0; 41 | }; 42 | -------------------------------------------------------------------------------- /GWToolboxdll/Windows/TargetInfoWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxWindow.h> 4 | 5 | class TargetInfoWindow : public ToolboxWindow { 6 | public: 7 | static TargetInfoWindow& Instance() 8 | { 9 | static TargetInfoWindow instance; 10 | return instance; 11 | } 12 | 13 | [[nodiscard]] const char* Name() const override { return "Target Info"; } 14 | [[nodiscard]] const char* Description() const override { return "Displays info about current target including any notes from GWW"; } 15 | [[nodiscard]] const char* Icon() const override { return ICON_FA_CROSSHAIRS; } 16 | 17 | void Initialize() override; 18 | void Terminate() override; 19 | 20 | void LoadSettings(ToolboxIni*) override; 21 | void SaveSettings(ToolboxIni*) override; 22 | void Draw(IDirect3DDevice9* pDevice) override; 23 | void DrawSettingsInternal() override; 24 | void Update(float) override; 25 | }; 26 | -------------------------------------------------------------------------------- /GWToolboxdll/base64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int b64_enc(void* in, unsigned size, char* out); 4 | int b64_dec(const char* in, void* out); 5 | -------------------------------------------------------------------------------- /GWToolboxdll/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX9 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices. 7 | // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'. 8 | 9 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 10 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 11 | // Learn about Dear ImGui: 12 | // - FAQ https://dearimgui.com/faq 13 | // - Getting Started https://dearimgui.com/getting-started 14 | // - Documentation https://dearimgui.com/docs (same as your local docs/ folder). 15 | // - Introduction, links and more at the top of imgui.cpp 16 | 17 | #pragma once 18 | #include "imgui.h" // IMGUI_IMPL_API 19 | #ifndef IMGUI_DISABLE 20 | 21 | struct IDirect3DDevice9; 22 | 23 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 24 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 25 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 26 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 27 | 28 | // Use if you want to reset your rendering device without losing Dear ImGui state. 29 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 30 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 31 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateFontsTexture(); 32 | 33 | #endif // #ifndef IMGUI_DISABLE 34 | -------------------------------------------------------------------------------- /GWToolboxdll/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by GWToolbox.rc 4 | // 5 | 6 | #define IDR_GWCA_DLL 154 7 | 8 | // Next default values for new objects 9 | // 10 | #ifdef APSTUDIO_INVOKED 11 | #ifndef APSTUDIO_READONLY_SYMBOLS 12 | #define _APS_NEXT_RESOURCE_VALUE 155 13 | #define _APS_NEXT_COMMAND_VALUE 40001 14 | #define _APS_NEXT_CONTROL_VALUE 1001 15 | #define _APS_NEXT_SYMED_VALUE 101 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /GWToolboxdll/sha1.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | sha1.hpp - header of 3 | 4 | ============ 5 | SHA-1 in C++ 6 | ============ 7 | 8 | 100% Public Domain. 9 | 10 | Original C Code 11 | -- Steve Reid <steve@edmweb.com> 12 | Small changes to fit into bglibs 13 | -- Bruce Guenter <bruce@untroubled.org> 14 | Translation to simpler C++ Code 15 | -- Volker Diels-Grabsch <v@njh.eu> 16 | Safety fixes 17 | -- Eugene Hopkinson <slowriot at voxelstorm dot com> 18 | */ 19 | 20 | #ifndef SHA1_HPP 21 | #define SHA1_HPP 22 | 23 | 24 | #include <cstdint> 25 | #include <iostream> 26 | #include <string> 27 | 28 | 29 | class SHA1 30 | { 31 | public: 32 | SHA1(); 33 | void update(const std::string &s); 34 | void update(std::istream &is); 35 | std::string final(); 36 | static std::string from_file(const std::string &filename); 37 | 38 | private: 39 | uint32_t digest[5]; 40 | std::string buffer; 41 | uint64_t transforms; 42 | }; 43 | 44 | 45 | #endif /* SHA1_HPP */ 46 | -------------------------------------------------------------------------------- /GWToolboxdll/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Guild Wars Dev Hub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /RestClient/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(CURL REQUIRED) 2 | 3 | FILE(GLOB SOURCES 4 | "*.h" 5 | "*.cpp") 6 | 7 | add_library(RestClient) 8 | target_sources(RestClient PRIVATE ${SOURCES}) 9 | target_precompile_headers(RestClient PRIVATE "stdafx.h") 10 | target_include_directories(RestClient PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") 11 | target_link_libraries(RestClient PUBLIC 12 | CURL::libcurl 13 | Core) 14 | -------------------------------------------------------------------------------- /RestClient/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /RestClient/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <assert.h> 4 | #include <stdint.h> 5 | 6 | #include <algorithm> 7 | #include <atomic> 8 | #include <deque> 9 | #include <mutex> 10 | #include <string> 11 | #include <utility> 12 | 13 | #define CURL_STATICLIB 14 | #include <curl/curl.h> 15 | -------------------------------------------------------------------------------- /UPDATE.md: -------------------------------------------------------------------------------- 1 | # How to update 2 | 1. Update toolbox version in GWToolboxdll/CMakeLists.txt. Set BETA_VERSION to "" 3 | 2. Update toolbox_version in docs/_config.yml 4 | 5. Make patch notes and write in docs/history.md. Do not use " ". 5 | 6. Commit 6 | 7. Make tag as x.x_Release 7 | 8. On github, make new release (x.x_Release) on existing label, attach GWToolboxdll.dll 8 | 9. SAVE GWToolboxdll.dll and GWToolboxdll.pdb - needed for .dmp debugging! 9 | -------------------------------------------------------------------------------- /cmake/directxtex.cmake: -------------------------------------------------------------------------------- 1 | include_guard() 2 | include(FetchContent) 3 | 4 | FetchContent_Declare( 5 | DirectXTex 6 | GIT_REPOSITORY https://github.com/microsoft/DirectXTex 7 | GIT_TAG oct2024) 8 | FetchContent_GetProperties(directxtex) 9 | if (directxtex_POPULATED) 10 | return() 11 | endif() 12 | 13 | #cmake_policy(PUSH) 14 | #cmake_policy(SET CMP0169 OLD) 15 | FetchContent_Populate(directxtex) 16 | #cmake_policy(POP) 17 | 18 | add_library(directxtex) 19 | set(SOURCES 20 | "${directxtex_SOURCE_DIR}/DDSTextureLoader/DDSTextureLoader9.h" 21 | "${directxtex_SOURCE_DIR}/DDSTextureLoader/DDSTextureLoader9.cpp" 22 | "${directxtex_SOURCE_DIR}/WICTextureLoader/WICTextureLoader9.h" 23 | "${directxtex_SOURCE_DIR}/WICTextureLoader/WICTextureLoader9.cpp" 24 | ) 25 | source_group(TREE ${directxtex_SOURCE_DIR} FILES ${SOURCES}) 26 | target_sources(directxtex PRIVATE ${SOURCES}) 27 | target_include_directories(directxtex PUBLIC "${directxtex_SOURCE_DIR}") 28 | 29 | set_target_properties(directxtex PROPERTIES FOLDER "Dependencies/") 30 | -------------------------------------------------------------------------------- /cmake/easywsclient.cmake: -------------------------------------------------------------------------------- 1 | include_guard() 2 | 3 | set(EASYWSCLIENT_FOLDER "${PROJECT_SOURCE_DIR}/Dependencies/easywsclient/") 4 | 5 | set(SOURCES 6 | "${EASYWSCLIENT_FOLDER}/easywsclient.hpp" 7 | "${EASYWSCLIENT_FOLDER}/easywsclient.cpp") 8 | 9 | add_library(easywsclient) 10 | target_sources(easywsclient PRIVATE ${SOURCES}) 11 | target_include_directories(easywsclient PUBLIC "${EASYWSCLIENT_FOLDER}") 12 | 13 | set_target_properties(easywsclient PROPERTIES FOLDER "Dependencies/") 14 | find_package(wolfssl CONFIG REQUIRED) 15 | 16 | target_link_libraries(easywsclient PUBLIC wolfssl::wolfssl) 17 | -------------------------------------------------------------------------------- /cmake/gwca.cmake: -------------------------------------------------------------------------------- 1 | include_guard() 2 | 3 | set(GWCA_FOLDER "${PROJECT_SOURCE_DIR}/Dependencies/GWCA") 4 | 5 | find_package(minhook CONFIG REQUIRED) 6 | 7 | add_library(gwca SHARED IMPORTED GLOBAL) 8 | set_target_properties(gwca PROPERTIES 9 | IMPORTED_IMPLIB "${GWCA_FOLDER}/lib/gwca.lib" 10 | IMPORTED_LOCATION "${GWCA_FOLDER}/bin/gwca.dll" 11 | INTERFACE_INCLUDE_DIRECTORIES "${GWCA_FOLDER}/include") 12 | target_link_libraries(gwca INTERFACE minhook::minhook) 13 | -------------------------------------------------------------------------------- /cmake/gwdatbrowser.cmake: -------------------------------------------------------------------------------- 1 | include_guard() 2 | 3 | set(gwdatbrowser_folder "${PROJECT_SOURCE_DIR}/Dependencies/gwdatbrowser/") 4 | 5 | set(SOURCES 6 | "${gwdatbrowser_folder}/AtexAsm.h" 7 | "${gwdatbrowser_folder}/AtexAsm.cpp" 8 | "${gwdatbrowser_folder}/AtexReader.h" 9 | "${gwdatbrowser_folder}/AtexReader.cpp" 10 | "${gwdatbrowser_folder}/GWUnpacker.h" 11 | "${gwdatbrowser_folder}/xentax.h" 12 | "${gwdatbrowser_folder}/xentax.cpp") 13 | 14 | add_library(gwdatbrowser) 15 | target_sources(gwdatbrowser PRIVATE ${SOURCES}) 16 | target_include_directories(gwdatbrowser PUBLIC "${gwdatbrowser_folder}") 17 | 18 | set_target_properties(gwdatbrowser PROPERTIES FOLDER "Dependencies/") 19 | -------------------------------------------------------------------------------- /cmake/imgui_fonts.cmake: -------------------------------------------------------------------------------- 1 | if(TARGET imgui::fonts) 2 | return() 3 | endif() 4 | 5 | include(FetchContent) 6 | FetchContent_Declare( 7 | imgui_fonts 8 | GIT_REPOSITORY https://github.com/HasKha/imgui-fonts.git 9 | GIT_TAG 51e143ae864d141d919194af74ff916d5e6d383a) 10 | FetchContent_MakeAvailable(imgui_fonts) 11 | -------------------------------------------------------------------------------- /cmake/nativefiledialog.cmake: -------------------------------------------------------------------------------- 1 | include_guard() 2 | 3 | add_library(nativefiledialog INTERFACE) 4 | target_include_directories(nativefiledialog INTERFACE "${PROJECT_SOURCE_DIR}/dependencies/nativefiledialog") -------------------------------------------------------------------------------- /cmake/wintoast.cmake: -------------------------------------------------------------------------------- 1 | set(wintoast_FOLDER "${PROJECT_SOURCE_DIR}/Dependencies/wintoast/") 2 | 3 | add_library(wintoast) 4 | 5 | set(SOURCES 6 | "${wintoast_FOLDER}/wintoastlib.h" 7 | "${wintoast_FOLDER}/wintoastlib.cpp" 8 | ) 9 | 10 | target_sources(wintoast PRIVATE ${SOURCES}) 11 | target_include_directories(wintoast PUBLIC "${wintoast_FOLDER}") 12 | 13 | set_target_properties(wintoast PROPERTIES FOLDER "Dependencies/") -------------------------------------------------------------------------------- /docs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | cache: bundler 3 | sudo: false 4 | rvm: 2.2 5 | 6 | install: script/bootstrap 7 | script: script/cibuild 8 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | www.gwtoolbox.com -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | gem "github-pages", group: :jekyll_plugins 6 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | repository: HasKha/GWToolboxpp 2 | 3 | title: GWToolbox++ 4 | description: Tools for Guild Wars 5 | show_downloads: true 6 | google_analytics: UA-75239620-2 7 | theme: jekyll-theme-midnight 8 | 9 | download_url: https://github.com/gwdevhub/GWToolboxpp/releases/download/7.7_Release/gwtoolbox.exe 10 | discord_url: https://discord.gg/pGS5pFn 11 | toolbox_version: "7.7" 12 | -------------------------------------------------------------------------------- /docs/armory_window.md: -------------------------------------------------------------------------------- 1 | # Armory Window 2 | 3 | The Armory Window is a powerful feature that allows you to preview all armor in the game in all colors on your character. This tool is perfect for planning your character's appearance or simply exploring the vast array of armor options available in Guild Wars. 4 | 5 | ## Features 6 | 7 | - **Preview All Armor**: Browse through every armor set available in the game for your character's profession. 8 | - **Color Customization**: Apply any dye color to each armor piece to see how it looks. 9 | - **Real-time Updates**: Changes are applied to your character in real-time, allowing you to see exactly how the armor will look in-game. 10 | - **Campaign Filter**: Filter armor sets by campaign (Core, Prophecies, Factions, Nightfall, Eye of the North). 11 | - **Costume Preview**: Preview full costumes and festival hats. 12 | 13 | ## How to Use 14 | 15 | 1. Open the Armory Window from the GWToolbox++ menu. 16 | 2. Select the armor slot you want to change (Head, Chest, Hands, Legs, Feet). 17 | 3. Browse through the available armor pieces for that slot. 18 | 4. Click on an armor piece to apply it to your character. 19 | 5. Use the color pickers to change the dye colors for each part of the armor piece. 20 | 6. Use the campaign filter to narrow down the armor options if desired. 21 | 22 | ## Notes 23 | 24 | - The Armory Window only changes the appearance of your character locally. Other players will still see your actual equipped armor. 25 | - Some special armors or costumes may not be available for preview. 26 | - Weapon previews are currently not supported. 27 | 28 | Remember to click the "Reset" button if you want to revert all changes and return to your originally equipped armor. 29 | 30 | Enjoy experimenting with different armor combinations and colors to create your perfect look! 31 | -------------------------------------------------------------------------------- /docs/assets/css/ie.scss: -------------------------------------------------------------------------------- 1 | nav { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /docs/assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "{{ site.theme }}"; 5 | .button-left {float: left; margin-left: 6px;} 6 | #header nav {max-width: 1080px;margin: 0 auto;padding: 0 10px;background: blue;margin: 6px auto;} 7 | .wrapper {max-width: 1080px;margin: 0 auto;position: relative;padding: 0 20px;} 8 | section {max-width: 1080px;padding: 30px 0px 50px 0px;margin: 20px 0;margin-top: 70px;} 9 | code {font-family: 'Lucida Sans', Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, monospace;color: #efefef;font-size: 13px; margin: 0 0px; padding: 0px 0px; border-radius: 2px;} 10 | body {padding: 0px 0 20px 0px;margin: 0px;font: 14px/1.5 "OpenSansRegular", "Helvetica Neue", Helvetica, Arial, sans-serif;color: #f0e7d5;font-weight: normal;background: #0f0f0f;background-attachment: fixed !important;background: linear_gradient(#2a2a29, #1c1c1c);} 11 | #header nav li a { color: white; border: 1px solid #ae480a; background: linear_gradient(#e4741f, #b6550f); border-radius: 2px; box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0px 3px 7px rgba(0, 0, 0, 0.7); background-color: #e4741f; padding: 10px 12px; margin-top: 6px; line-height: 14px; font-size: 14px; display: inline-block; text-align: center; } 12 | #header nav li a:hover { background: linear_gradient(#c54d18, #a3360d); background-color: #b6550f; border: 1px solid #a3360d; box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 1px 0px transparent; } 13 | a {color: #e4741f; font-weight: 400; text-decoration: none;} 14 | a:hover {color: #b6550f;} 15 | blockquote {border-left: 3px solid #e4741f;margin: 0;padding: 0 0 0 20px;font-style: italic;} 16 | figure { float:right; margin:6px; padding: 6px; text-align:center; background-color: #353535; } 17 | -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Bold-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-BoldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-BoldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Italic-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Light-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-LightItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-LightItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Regular-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Semibold-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Semibold-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-Semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-Semibold-webfont.woff -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-SemiboldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-SemiboldItalic-webfont.eot -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-SemiboldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-SemiboldItalic-webfont.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/OpenSans-SemiboldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/fonts/OpenSans-SemiboldItalic-webfont.woff -------------------------------------------------------------------------------- /docs/assets/images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/images/bullet.png -------------------------------------------------------------------------------- /docs/assets/images/hr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/images/hr.gif -------------------------------------------------------------------------------- /docs/assets/images/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/assets/images/nav-bg.gif -------------------------------------------------------------------------------- /docs/camera.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # Camera 6 | Toolbox has several features that interact with the game's camera, allowing you to view the game from different points of view. These can all be accessed via [chat commands](commands). 7 | 8 | ## Camera Unlock 9 | * Typing `/cam unlock` or `/camera unlock` allows you to freely move your point of view around the map, without moving your character. 10 | * Use `W` (forwards), `A` (sidestep left), `S` (backwards), `D` (sidestep right), `X` (upwards), `Z` (downwards) to move. Hold down the right mouse button to turn around. 11 | * `/cam speed [value]` sets the unlocked camera speed. Normal player move speed is 5. 12 | * `/cam lock` or `/camera lock` to lock the camera and return to your character's point of view. 13 | 14 | ## Other features 15 | * `/cam fog on` or `/cam fog off` to enable or disable fog. 16 | * `/cam fov [amount]` to change the Field-of-View, or `/cam fov default` to reset it. 17 | * `/zoom [value]` to change the maximum zoom to the value. Use just `/zoom` to reset to the default value of 750. 18 | All of these reset to default when you zone. 19 | * Under [Chat Commands on the Settings](settings#chat_commands) are options to lock altitude (so you can only move up and down with `X` and `Z`, and to adjust the camera speed. 20 | 21 | [back](./) 22 | -------------------------------------------------------------------------------- /docs/chat.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # Chat Settings 6 | 7 | The Chat Settings module provides various options to customize and enhance the in-game chat experience. 8 | 9 | ## Features 10 | 11 | ### Timestamps 12 | - Show timestamps in chat messages 13 | - Customize timestamp format (24h or 12h) 14 | - Show seconds in timestamps 15 | - Customize timestamp color 16 | 17 | ### Chat Bubbles 18 | - Hide player chat speech bubbles 19 | - Show NPC speech bubbles in emote channel 20 | 21 | ### Message Redirection 22 | - Redirect NPC dialog to emote channel 23 | - Redirect outgoing whispers to whisper channel 24 | 25 | ### Link Handling 26 | - Open web links from templates 27 | - Automatically convert URLs into build templates 28 | 29 | ### Other Features 30 | - Block messages from inactive chat channels 31 | - Customize chat aliases 32 | 33 | ## Usage 34 | 35 | To access Chat Settings, go to the Settings window in GWToolbox++ and navigate to the "Chat Settings" section. 36 | 37 | ## Chat Commands 38 | 39 | - `/afk [message]`: Set your status to Away and optionally set an AFK message 40 | - `/age2`: Display instance time in chat 41 | - `/chat [all|guild|team|trade|alliance|whisper]`: Open or switch to the specified chat channel 42 | 43 | For a full list of chat commands, see the [Chat Commands](commands) page. 44 | -------------------------------------------------------------------------------- /docs/credits.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # Credits 6 | **Sai Itecka** 7 | * Original creator of a damage monitor, which inspired the toolbox damage monitor. 8 | * Created original implementation of the Cursor Fix. 9 | 10 | **Ziox** 11 | * Implementation of the vast majority of the chat-based features, such as custom chats and the chat timestamps. 12 | * Major contributor to the GW API used, reverse engineering work. 13 | 14 | **KAOS** 15 | * Original creator of the GW API used, reverse engineering work. 16 | * Several minor additions. 17 | 18 | **Misty/DarkManic** 19 | * Extensive work on the site and documentation. 20 | 21 | **and everyone working/suggesting ideas!** 22 | 23 | [back](./) 24 | -------------------------------------------------------------------------------- /docs/dialogs.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | <figure> 6 | <img src="https://user-images.githubusercontent.com/11432831/28233524-4cf116ee-68ac-11e7-9a97-1a4bcc2d2659.PNG"/> 7 | <figcaption>Dialogs Window</figcaption> 8 | </figure> 9 | 10 | # Dialogs 11 | The Dialogs window allows you to send dialogs directly to NPCs without actually having to talk to them, and in some cases without having completed all the pre-requisites to make that dialog available. 12 | 13 | You still have to interact with the NPC (press space) in order to activate the dialog, but you can do so even while they refuse to talk to you because they're in combat. You can move away from the NPC, and so long as you don't go beyond compass range or interact with another, sending the dialog will make you walk back. 14 | 15 | ## Default Dialogs 16 | The 4 buttons at the top are for the quests that commonly need to be taken while the quest NPC is in aggro and unable to talk. 17 | 18 | The 7 buttons below are for teleporting to each of the Reapers in the Underworld. Although you need to be at a Reaper to use the dialog, the destination Reaper does not need to have been spawned. 19 | 20 | ## Favorites 21 | If you want more elite area dialogs to appear on the window, you can select them from the first drop down menu. 22 | 23 | You can have as many favorites as you want: go on [Settings](settings) to add more. 24 | 25 | ## Custom Dialogs 26 | The bottom drop down menu contains a list of some of the most popular dialogs, none of which require pre-requisites. 27 | 28 | You can also use the input field, or the chat command `/dialog <id>`, to send any dialog you wish, so long as you know the code for it. This can be found using the [Info window](info). 29 | 30 | [back](./) 31 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/docs/favicon.ico -------------------------------------------------------------------------------- /docs/jekyll-theme-midnight.gemspec: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | Gem::Specification.new do |s| 4 | s.name = "jekyll-theme-midnight" 5 | s.version = "0.0.4" 6 | s.license = "CC0-1.0" 7 | s.authors = ["Matt Graham", "GitHub, Inc."] 8 | s.email = ["opensource+jekyll-theme-midnight@github.com"] 9 | s.homepage = "https://github.com/pages-themes/midnight" 10 | s.summary = "Midnight is a Jekyll theme for GitHub Pages" 11 | 12 | s.files = `git ls-files -z`.split("\x0").select do |f| 13 | f.match(%r{^((_includes|_layouts|_sass|assets)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i) 14 | end 15 | 16 | s.platform = Gem::Platform::RUBY 17 | s.add_runtime_dependency "jekyll", "~> 3.3" 18 | end 19 | -------------------------------------------------------------------------------- /docs/script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | gem install bundler 6 | bundle install 7 | -------------------------------------------------------------------------------- /docs/script/cibuild: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | bundle exec jekyll build 6 | gem build jekyll-theme-midnight.gemspec 7 | -------------------------------------------------------------------------------- /docs/script/release: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Tag and push a release. 3 | 4 | set -e 5 | 6 | # Make sure we're in the project root. 7 | 8 | cd $(dirname "$0")/.. 9 | 10 | # Make sure the darn thing works 11 | 12 | bundle update 13 | 14 | # Build a new gem archive. 15 | 16 | rm -rf jekyll-theme-midnight-*.gem 17 | gem build -q jekyll-theme-midnight.gemspec 18 | 19 | # Make sure we're on the master branch. 20 | 21 | (git branch | grep -q 'master') || { 22 | echo "Only release from the master branch." 23 | exit 1 24 | } 25 | 26 | # Figure out what version we're releasing. 27 | 28 | tag=v`ls jekyll-theme-midnight-*.gem | sed 's/^jekyll-theme-midnight-\(.*\)\.gem$/\1/'` 29 | 30 | # Make sure we haven't released this version before. 31 | 32 | git fetch -t origin 33 | 34 | (git tag -l | grep -q "$tag") && { 35 | echo "Whoops, there's already a '${tag}' tag." 36 | exit 1 37 | } 38 | 39 | # Tag it and bag it. 40 | 41 | gem push jekyll-theme-midnight-*.gem && git tag "$tag" && 42 | git push origin master && git push origin "$tag" 43 | -------------------------------------------------------------------------------- /plugins/Base/ToolboxPlugin.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ToolboxPlugin.h" 4 | #include "PluginUtils.h" 5 | 6 | std::filesystem::path ToolboxPlugin::GetSettingFile(const wchar_t* folder) const 7 | { 8 | const auto wname = PluginUtils::StringToWString(Name()); 9 | const auto ininame = wname + L".ini"; 10 | return std::filesystem::path(folder) / ininame; 11 | } 12 | 13 | void ToolboxPlugin::Initialize(ImGuiContext* ctx, const ImGuiAllocFns allocator_fns, const HMODULE toolbox_dll) 14 | { 15 | ImGui::SetCurrentContext(ctx); 16 | ImGui::SetAllocatorFunctions(allocator_fns.alloc_func, allocator_fns.free_func, allocator_fns.user_data); 17 | toolbox_handle = toolbox_dll; 18 | } 19 | -------------------------------------------------------------------------------- /plugins/Base/ToolboxUIPlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ToolboxPlugin.h" 4 | 5 | class ToolboxUIPlugin : public ToolboxPlugin { 6 | public: 7 | bool* GetVisiblePtr() override; 8 | bool ShowInMainMenu() const override; 9 | 10 | void Initialize(ImGuiContext* ctx, ImGuiAllocFns allocator_fns, HMODULE toolbox_dll) override; 11 | void SignalTerminate() override; 12 | void Terminate() override; 13 | bool HasSettings() const override { return true; } 14 | void DrawSettings() override; 15 | void LoadSettings(const wchar_t*) override; 16 | void SaveSettings(const wchar_t*) override; 17 | bool DrawTabButton(bool show_icon, bool show_text, bool center_align_text) override; 18 | 19 | protected: 20 | ImGuiWindowFlags GetWinFlags(ImGuiWindowFlags flags = 0) const; 21 | 22 | bool show_closebutton = true; 23 | bool show_title = true; 24 | bool can_show_in_main_window = false; 25 | bool can_collapse = true; 26 | bool can_close = false; 27 | bool is_resizable = true; 28 | bool is_movable = true; 29 | 30 | bool lock_move = false; 31 | bool lock_size = false; 32 | bool show_menubutton = false; 33 | 34 | private: 35 | bool plugin_visible = true; 36 | }; 37 | -------------------------------------------------------------------------------- /plugins/Base/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include <Windows.h> 2 | 3 | #include "ToolboxPlugin.h" 4 | 5 | DLLAPI BOOL WINAPI DllMain(const HMODULE hModule, const DWORD reason, LPVOID) 6 | { 7 | switch (reason) { 8 | case DLL_PROCESS_ATTACH: 9 | plugin_handle = hModule; 10 | break; 11 | case DLL_PROCESS_DETACH: 12 | break; 13 | case DLL_THREAD_ATTACH: 14 | break; 15 | case DLL_THREAD_DETACH: 16 | break; 17 | default: 18 | break; 19 | } 20 | 21 | return TRUE; 22 | } 23 | -------------------------------------------------------------------------------- /plugins/ExamplePlugin/ExamplePlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include <ToolboxUIPlugin.h> 4 | 5 | class ExamplePlugin : public ToolboxPlugin { 6 | public: 7 | ExamplePlugin() = default; 8 | ~ExamplePlugin() override = default; 9 | 10 | const char* Name() const override { return "Example Plugin"; } 11 | 12 | void LoadSettings(const wchar_t*) override; 13 | void SaveSettings(const wchar_t*) override; 14 | [[nodiscard]] bool HasSettings() const override { return true; } 15 | void DrawSettings() override; 16 | void Initialize(ImGuiContext* ctx, ImGuiAllocFns allocator_fns, HMODULE toolbox_dll) override; 17 | void SignalTerminate() override; 18 | bool CanTerminate() override; 19 | // Draw user interface. Will be called every frame if the element is visible 20 | void Draw(IDirect3DDevice9* pDevice) override; 21 | }; 22 | -------------------------------------------------------------------------------- /resources/Font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/Font.ttf -------------------------------------------------------------------------------- /resources/Font_ChineseTraditional.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/Font_ChineseTraditional.ttf -------------------------------------------------------------------------------- /resources/Font_Cyrillic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/Font_Cyrillic.ttf -------------------------------------------------------------------------------- /resources/Font_Japanese.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/Font_Japanese.ttf -------------------------------------------------------------------------------- /resources/Font_Korean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/Font_Korean.ttf -------------------------------------------------------------------------------- /resources/GWToolbox.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | [hotkey-1:SendChat] 4 | msg = age 5 | 6 | 7 | [hotkey-2:SendChat] 8 | msg = stuck 9 | 10 | 11 | [hotkey-3:SendChat] 12 | msg = resign 13 | 14 | 15 | [hotkey-4:DropUseBuff] 16 | SkillID = 925 17 | 18 | 19 | [hotkey-5:Target] 20 | TargetID = 7449 21 | TargetName = Boo 22 | 23 | [hotkey-6:UseItem] 24 | ItemID = 26501 25 | ItemName = Res Scroll 26 | -------------------------------------------------------------------------------- /resources/discord_game_sdk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/discord_game_sdk.dll -------------------------------------------------------------------------------- /resources/gwtoolbox.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/gwtoolbox.ico -------------------------------------------------------------------------------- /resources/heros/hero_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_1.jpg -------------------------------------------------------------------------------- /resources/heros/hero_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_10.jpg -------------------------------------------------------------------------------- /resources/heros/hero_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_11.jpg -------------------------------------------------------------------------------- /resources/heros/hero_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_12.jpg -------------------------------------------------------------------------------- /resources/heros/hero_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_13.jpg -------------------------------------------------------------------------------- /resources/heros/hero_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_14.jpg -------------------------------------------------------------------------------- /resources/heros/hero_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_15.jpg -------------------------------------------------------------------------------- /resources/heros/hero_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_16.jpg -------------------------------------------------------------------------------- /resources/heros/hero_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_17.jpg -------------------------------------------------------------------------------- /resources/heros/hero_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_18.jpg -------------------------------------------------------------------------------- /resources/heros/hero_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_19.jpg -------------------------------------------------------------------------------- /resources/heros/hero_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_2.jpg -------------------------------------------------------------------------------- /resources/heros/hero_20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_20.jpg -------------------------------------------------------------------------------- /resources/heros/hero_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_21.jpg -------------------------------------------------------------------------------- /resources/heros/hero_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_22.jpg -------------------------------------------------------------------------------- /resources/heros/hero_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_23.jpg -------------------------------------------------------------------------------- /resources/heros/hero_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_24.jpg -------------------------------------------------------------------------------- /resources/heros/hero_25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_25.jpg -------------------------------------------------------------------------------- /resources/heros/hero_26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_26.jpg -------------------------------------------------------------------------------- /resources/heros/hero_27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_27.jpg -------------------------------------------------------------------------------- /resources/heros/hero_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_3.jpg -------------------------------------------------------------------------------- /resources/heros/hero_36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_36.jpg -------------------------------------------------------------------------------- /resources/heros/hero_37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_37.jpg -------------------------------------------------------------------------------- /resources/heros/hero_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_4.jpg -------------------------------------------------------------------------------- /resources/heros/hero_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_5.jpg -------------------------------------------------------------------------------- /resources/heros/hero_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_6.jpg -------------------------------------------------------------------------------- /resources/heros/hero_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_7.jpg -------------------------------------------------------------------------------- /resources/heros/hero_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_8.jpg -------------------------------------------------------------------------------- /resources/heros/hero_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/heros/hero_9.jpg -------------------------------------------------------------------------------- /resources/icons/airplane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/airplane.png -------------------------------------------------------------------------------- /resources/icons/cupcake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/cupcake.png -------------------------------------------------------------------------------- /resources/icons/dialogue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/dialogue.png -------------------------------------------------------------------------------- /resources/icons/feather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/feather.png -------------------------------------------------------------------------------- /resources/icons/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/info.png -------------------------------------------------------------------------------- /resources/icons/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/keyboard.png -------------------------------------------------------------------------------- /resources/icons/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/list.png -------------------------------------------------------------------------------- /resources/icons/notepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/notepad.png -------------------------------------------------------------------------------- /resources/icons/party.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/party.png -------------------------------------------------------------------------------- /resources/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/settings.png -------------------------------------------------------------------------------- /resources/icons/trade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gwdevhub/GWToolboxpp/69b3533d3447487733b39bc78711535f6adda489/resources/icons/trade.png -------------------------------------------------------------------------------- /vcpkg-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "default-registry": { 3 | "kind": "git", 4 | "baseline": "ce613c41372b23b1f51333815feb3edd87ef8a8b", 5 | "repository": "https://github.com/microsoft/vcpkg" 6 | }, 7 | "registries": [ 8 | { 9 | "kind": "artifact", 10 | "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", 11 | "name": "microsoft" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /vcpkg-overlays/ports/wolfssl/vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wolfssl", 3 | "version": "5.7.4", 4 | "description": "TLS and Cryptographic library for many platforms", 5 | "homepage": "https://wolfssl.com", 6 | "license": "GPL-2.0-or-later", 7 | "supports": "!uwp", 8 | "dependencies": [ 9 | { 10 | "name": "vcpkg-cmake", 11 | "host": true 12 | }, 13 | { 14 | "name": "vcpkg-cmake-config", 15 | "host": true 16 | }, 17 | { 18 | "name": "vcpkg-cmake-get-vars", 19 | "host": true 20 | } 21 | ], 22 | "features": { 23 | "asio": { 24 | "description": "Enable asio support" 25 | }, 26 | "dtls": { 27 | "description": "DTLS support" 28 | }, 29 | "quic": { 30 | "description": "Enable quic support" 31 | }, 32 | "secret-callback": { 33 | "description": "Enables callback to provide TLS keys for debugging" 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /vcpkg-overlays/triplets/x86-windows-mixed.cmake: -------------------------------------------------------------------------------- 1 | set(VCPKG_TARGET_ARCHITECTURE x86) 2 | 3 | if(PORT MATCHES "discord-game-sdk") 4 | set(VCPKG_CRT_LINKAGE dynamic) 5 | set(VCPKG_LIBRARY_LINKAGE dynamic) 6 | else() 7 | set(VCPKG_CRT_LINKAGE static) 8 | set(VCPKG_LIBRARY_LINKAGE static) 9 | endif() 10 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | { 4 | "name": "curl", 5 | "features": [ 6 | "wolfssl" 7 | ] 8 | }, 9 | "discord-game-sdk", 10 | "earcut-hpp", 11 | "minhook", 12 | "nlohmann-json", 13 | "simpleini", 14 | "wolfssl", 15 | "ctre" 16 | ], 17 | "overrides": [ 18 | { 19 | "name": "discord-game-sdk", 20 | "version": "2.5.6" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------