From b91f4962a1886917db4a1c375b2f77abfbcd4b43 Mon Sep 17 00:00:00 2001 From: adf Date: Sun, 3 May 2026 08:07:37 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=E3=80=8C/=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Android.mk | 57 +- README.md | 55 +- menu.h | 3340 +++++++++++++++++++++++++++++++++++++++++++++++ refs.h | 48 + variables.h | 3564 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 7024 insertions(+), 40 deletions(-) create mode 100644 menu.h create mode 100644 refs.h create mode 100644 variables.h diff --git a/Android.mk b/Android.mk index c17fa5e..c4e7371 100755 --- a/Android.mk +++ b/Android.mk @@ -1,35 +1,12 @@ -# 获取当前目录路径 LOCAL_PATH := $(call my-dir) -# 预编译 Dobby 库 include $(CLEAR_VARS) -LOCAL_MODULE := dobby +LOCAL_MODULE := libdobby LOCAL_SRC_FILES := Dobby/libdobby.a include $(PREBUILT_STATIC_LIBRARY) -# 清除变量 include $(CLEAR_VARS) - -# 设置模块名称 LOCAL_MODULE := HOOK - -# 设置C语言编译器标志 -LOCAL_CFLAGS := -w -s -Wno-error=format-security -fvisibility=hidden -fpermissive -fexceptions - -# 设置C++语言编译器标志 -LOCAL_CPPFLAGS := -w -s -Wno-error=format-security -fvisibility=hidden -std=c++17 -LOCAL_CPPFLAGS += -Wno-error=c++11-narrowing -fpermissive -Wall -fexceptions - -# 设置链接器标志 -LOCAL_LDFLAGS += -Wl,--gc-sections,--strip-all - -# 设置链接库 -LOCAL_LDLIBS := -lm -ldl -lz -llog -landroid -lEGL -lGLESv1_CM -lGLESv2 -lGLESv3 - -# 设置C语言头文件目录 -LOCAL_C_INCLUDES := $(LOCAL_PATH)/imgui $(LOCAL_PATH)/Dobby - -# 设置源文件列表 LOCAL_SRC_FILES := \ main.cpp \ imgui/imgui.cpp \ @@ -38,21 +15,25 @@ LOCAL_SRC_FILES := \ imgui/imgui_widgets.cpp \ imgui/imgui_impl_android.cpp \ imgui/imgui_impl_opengl3.cpp \ - SDK/PUBGM_Basic.cpp \ - SDK/PUBGM_Basic_functions.cpp \ - SDK/PUBGM_CoreUObject_functions.cpp \ - SDK/PUBGM_Engine_functions.cpp \ - SDK/PUBGM_ShadowTrackerExtra_functions.cpp \ - SDK/PUBGM_UnrealArchExt_functions.cpp \ - SDK/PUBGM_Gameplay_functions.cpp \ - SDK/PUBGM_Client_functions.cpp + android_native_app_glue.c \ + structures/data/SDK/PUBGM_Basic.cpp \ + structures/data/SDK/PUBGM_Basic_functions.cpp \ + structures/data/SDK/PUBGM_CoreUObject_functions.cpp \ + structures/data/SDK/PUBGM_Engine_functions.cpp \ + structures/data/SDK/PUBGM_ShadowTrackerExtra_functions.cpp \ + structures/data/SDK/PUBGM_UnrealArchExt_functions.cpp \ + structures/data/SDK/PUBGM_Gameplay_functions.cpp \ + structures/data/SDK/PUBGM_Client_functions.cpp \ +LOCAL_CFLAGS := -w -s -Wno-error=format-security -fvisibility=hidden -fpermissive -fexceptions +LOCAL_CPPFLAGS := -w -s -Wno-error=format-security -fvisibility=hidden -std=c++17 +LOCAL_CPPFLAGS += -Wno-error=c++11-narrowing -fpermissive -Wall -fexceptions +LOCAL_C_INCLUDES += $(LOCAL_PATH)/imgui +LOCAL_C_INCLUDES += $(LOCAL_PATH)/App +LOCAL_C_INCLUDES += $(LOCAL_PATH)/SDK +LOCAL_LDFLAGS := -Wl,--gc-sections,--strip-all +LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM -lGLESv2 -lGLESv3 -lm -ldl -lz +LOCAL_STATIC_LIBRARIES := libdobby -# 设置静态库 -LOCAL_STATIC_LIBRARIES := android_native_app_glue dobby - -# 构建共享库 include $(BUILD_SHARED_LIBRARY) - -# 导入模块 $(call import-module,android/native_app_glue) diff --git a/README.md b/README.md index 297542f..23eb8e5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,53 @@ -# pubg -一个基本的pubg mobile 直装模板 +# PUBG Mobile Debugging Tool (qingthr) + +这是一个基于 NDK 开发的 Android 原生插件(HOOK 库),主要用于《刺激战场》(PUBG Mobile)的调试与功能扩展。项目集成了 ImGui 菜单界面,支持 ESP(透视)、物资生成、建筑探测及多种游戏数值调试功能。 + +## 主要功能 + +- **ESP 绘制**:支持射线、骨骼、血量、名称及距离显示。 +- **物资调试**:支持一键刷物资、自定义物资生成等。 +- **建筑功能**:支持探测附近建筑、保存建筑列表、在玩家位置生成建筑及建筑跟随模式。 +- **游戏增强**:包括高跳、加速、视角调整(广角)、无限子弹、除雾等调试功能。 +- **多语言支持**:支持中文与英文界面切换。 + +## 项目结构 + +- `jni/`:核心源代码目录。 + - `主程序.cpp`:JNI 入口与 EGL 钩子处理。 + - `菜单.h`:基于 ImGui 的 UI 界面逻辑。 + - `变量.h`:全局变量、结构体定义及核心功能逻辑。 + - `DrawESP.h`:ESP 绘制逻辑。 + - `SDK/`:包含游戏相关的类与结构体定义。 + - `imgui/`:ImGui 框架及其 Android/OpenGL3 渲染实现。 + +## 修复内容 (Latest Update) + +针对近期无法编译的问题,进行了以下核心修复: + +1. **语法错误修正**: + - 修正了 `jni/变量.h` 中 `探测并添加附近建筑(floatRadius)` 缺少空格导致的类型解析错误。 +2. **结构体与变量补全**: + - 补全了缺失的 `探测到的建筑` 结构体定义。 + - 补全了 `建筑生成线程`、`建筑线程运行`、`缓存的建筑类` 等核心逻辑变量。 +3. **逻辑闭合修复**: + - 针对 `jni/菜单.h` 中极其复杂的嵌套逻辑,修复了大量未闭合或多余的大括号 `{}`,确保 `void 菜单()` 函数及其内部窗口逻辑能够正确闭合,解决了“function definition is not allowed here”等编译难题。 +4. **链接错误修复**: + - 将 `extern` 声明的全局变量(如 `建筑跟随模式`、`建筑探测半径` 等)修改为 `inline` 定义,解决了 ndk-build 链接阶段的 `undefined symbol` 错误。 +5. **代码清理**: + - 暂时注释掉了未定义的 `执行控制台命令()` 函数,确保构建流程畅通。 + +## 编译指南 + +在 Termux 或 Android NDK 环境下,进入项目根目录运行: + +```bash +ndk-build +``` + +编译成功后,生成的库文件位于 `libs/armeabi-v7a/libHOOK.so`。 + +## 开源协议 + +本项目采用 **MIT License**。 + +*注:本项目仅供学习交流使用,请勿用于非法用途。* diff --git a/menu.h b/menu.h new file mode 100644 index 0000000..13d28fc --- /dev/null +++ b/menu.h @@ -0,0 +1,3340 @@ +int show_ChildMenu; +std::string inputText0; +std::string inputText1; +std::string inputText2; +std::string inputText3; +std::string inputText4; +// 当前焦点的输入框索引 +int activeEditBoxIndex = -1; +// 是否显示虚拟键盘 +bool showVirtualKeyboard = false; +// 渲染虚拟键盘 +// 修复命中框功能 +void Fix_Hitbox(ASTExtraBaseCharacter* Character); +void RenderVirtualKeyboard() { + ImGui::Begin("虚拟键盘"); + + static const char keyboardChars[] = "1234567890."; + + for (int i = 0; i < strlen(keyboardChars); ++i) { + if (i % 10 != 0) { + ImGui::SameLine(); + } + + std::string a(1, keyboardChars[i]); + if (ImGui::Button(a.c_str(), ImVec2(80, 80))) { + if (activeEditBoxIndex == 0) { + inputText1 += keyboardChars[i]; + } else if (activeEditBoxIndex == 1) { + inputText2 += keyboardChars[i]; + } else if (activeEditBoxIndex == 2) { + inputText3 += keyboardChars[i]; + } else if (activeEditBoxIndex == 3) { + inputText4 += keyboardChars[i]; + } + } + } + + if (ImGui::Button("退格", ImVec2(80, 80))) { + if (activeEditBoxIndex == 0 && !inputText1.empty()) { + inputText1.pop_back(); + } else if (activeEditBoxIndex == 1 && !inputText2.empty()) { + inputText2.pop_back(); + } else if (activeEditBoxIndex == 2 && !inputText3.empty()) { + inputText3.pop_back(); + } else if (activeEditBoxIndex == 3 && !inputText4.empty()) { + inputText4.pop_back(); + } + } + + if (ImGui::Button("关闭", ImVec2(100, 80))) { + showVirtualKeyboard = false; + } + + ImGui::End(); +} +void RenderDamageMenu() +{ + +} +void FixDamage() { + auto World = GetWorld(); + TArray Actors; + UGameplayStatics::GetAllActorsOfClass(World, AActor::StaticClass(), &Actors); + for (int i = 0; i < Actors.Num(); i++) { + AActor* Actor = Actors[i]; + if (Actor->IsA(ASTExtraBaseCharacter::StaticClass())) { + ASTExtraPlayerCharacter* Player = (ASTExtraPlayerCharacter*)Actor; + Player->CapsuleComponent->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block); + } + } +} + + + +void 菜单(){ +static int num=0; +if(num==0){ +num=1; +ImGui::SetNextWindowSize(ImVec2(590, 520), ImGuiCond_Once); +ImGui::SetWindowPos(ImVec2(150,40),ImGuiCond_Always); +} +if(DamageFix){ +//ProcessDPlayers(); +} +if(修复部分){ +修复(); +} +if(修复车辆){ +ProcessPlayers(); +} + if (ImGui::Begin(T(混淆("刺激战场(服务/客户)调试端"), 混淆("PUBG Mobile Tool")), 0, ImGuiWindowFlags_NoSavedSettings)) { + + // 添加语言切换按钮在标题栏右侧 + ImGui::SameLine(ImGui::GetWindowWidth() - 120); + if (ImGui::Button(currentLanguage == Language::CHINESE ? 混淆("EN") : 混淆("中文"), ImVec2(60, 30))) { + ToggleLanguage(); + } + + ImGui::Columns(2); + ImGui::SetColumnOffset(1, 160); + + // 左边按钮区域 - 固定不滚动 + { + if (ImGui::Button(T("单机调试", "Offline"), ImVec2(145, 65))) { + 单机设置=true; + 联机调试=false; + 功能设置=false; + 坐标调试=false; + 物资调试=false; + } + if (ImGui::Button(T("联机调试", "Online"), ImVec2(145, 65))) { + 单机设置=false; + 联机调试=true; + 功能设置=false; + 坐标调试=false; + 物资调试=false; + } + if (ImGui::Button(T("功能调试", "Function"), ImVec2(145, 65))) { + 单机设置=false; + 联机调试=false; + 功能设置=true; + 坐标调试=false; + 物资调试=false; + } + if (ImGui::Button(T("坐标调试", "coordinate"), ImVec2(145, 65))) { + 单机设置=false; + 联机调试=false; + 功能设置=false; + 坐标调试=true; + 物资调试=false; + } + if (ImGui::Button(T("物资调试", "Items"), ImVec2(145, 65))) { + 单机设置=false; + 联机调试=false; + 功能设置=false; + 坐标调试=false; + 物资调试=true; + } + + ImGui::Text("%.2fFPS", 1000.0f / ImGui::GetIO().Framerate); + ImGui::Spacing(); + } + + ImGui::NextColumn(); + + // 右边功能区域 - 可滚动 + // 使用ChildWindow创建一个独立的可滚动区域 + ImGui::BeginChild("RightPanel", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar); + +if(单机设置){ +if (ImGui::Button(T("训练场", "Training Ground"), ImVec2(-1,40))){ +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/Shooting_Range/shooting_test/shooting_range4",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; +} + +if (ImGui::Button(T("沙漠", "Desert"), ImVec2(-1,40))){ +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Desert/PUBG_Desert",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; +} +if (ImGui::Button(T("雨林", "Rainforest"), ImVec2(-1,40))){ +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Savage/PUBG_Savage_Main",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; +} + + +if (ImGui::Button(T("雪地", "Snow"), ImVec2(-1,40))){ +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; +} +if (ImGui::Button(T("海岛", "Forest"), ImVec2(-1,40))){ +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; +} + + + + +if(ImGui::Button(T("进入大厅", "Enter Lobby"),ImVec2(-1,40))){ +SDK::UGameBackendHUD*hud=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*hd=hud->GetFirstGameFrontendHUD(); +SDK::UScriptHelperClient::EnterBattle(hd,"pg.qq.com",17500,12345,"Player1","secretkey",67890); +物资功能=false; +提示=true; +} + + if(ImGui::Button(T("去除门", "Remove Doors"),ImVec2(-1,40))){ + +获取对象(); +PlayerController2->RemoveAllDoors(); +} + +ImGui::EndTabItem(); +} +if(联机调试){ + ImGui::Text(T("请在后台将IP地址及端口复制至剪贴板\nIP和端口前面得加一个open和空格\n演示:open 191.78.125.170:7777", "Please copy the IP address and port \nto the clipboard IP in the background. \nAn open and a space should be \nadded in front of the port.\n Demonstration :open 191.78.125.1700:7777"), 1000.0f / ImGui::GetIO().Framerate); + + + + +ImGui::PushItemWidth(-1); + ImGui::InputText("##key", s, sizeof s); + // auto paste + auto key = getClipboardTextt(); + strncpy(s, key.c_str(), sizeof s); + // auto login + ImGui::PopItemWidth(); + char buffer3[256]; +strncpy(buffer3,inputText3.c_str(),sizeof(buffer3)-1); +buffer3[sizeof(buffer3)-1]='\0'; +ImGui::InputText(T("端口", "port"),buffer3,sizeof(buffer3)); +if(ImGui::IsItemFocused()){ +activeEditBoxIndex=2; +} +inputText3=buffer3; +if(ImGui::Button(T("显示键盘", "Show Keyboard"))){ +showVirtualKeyboard=true; +} + +if(showVirtualKeyboard){ +RenderVirtualKeyboard(); +} + if (ImGui::Button(T("进入服务器", "Join Server"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),key,UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=false; +提示=true; + +} + if (ImGui::Button(T("进入(无Fighting)", "Join no Fighting"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),key,UGameplayStatics::GetPlayerController(GetWorld(),0)); +物资功能=false; +提示=true; + +} + +if (ImGui::CollapsingHeader(T("服务端地图-普通模式", "Server Maps - Normal Mode"))) + { + if (ImGui::Button(T("训练场", "Training Ground"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/Shooting_Range/shooting_test/shooting_range4?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} +if (ImGui::Button(T("海岛-普通", "Forest - Normal"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-普通", "Snow - Normal"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-普通", "Desert - Normal"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Desert/PUBG_Desert?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雨林-普通", "Rainforest - Normal"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} +} +if (ImGui::CollapsingHeader(T("服务端地图-特殊模式", "Server Maps - Special mode"))) +{ + if (ImGui::Button(T("战争模式狙击", "War Mode Sniper"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/SuperPower/BP_SuperPowerGameMode.BP_SuperPowerGameMode_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("狙击模式", "Sniper Mode"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/SniperMode/DestinyCircleSniperRifle_Desert_2.DestinyCircleSniperRifle_Desert_2_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("娱乐模式 霰弹枪", "Entertainment Shotgun"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircleShotgun_Savage_4.DestinyCircleShotgun_Savage_4_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("娱乐模式 手枪", "Entertainment Pistol"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/DestinyCircle/DestinyCirclePistol_Savage_4.DestinyCirclePistol_Savage_4_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("娱乐模式 高资源", "Entertainment High Loot"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircleAllweapon_Desert_1.DestinyCircleAllweapon_Desert_1_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("刺激对决", "Intense Duel"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/4X4DestinyCircle/4X4DestinyCircleAllweapon_1.4X4DestinyCircleAllweapon_1_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("海岛资源战", "Island Resource War"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/TRW/BP_GameMode_TRW.BP_GameMode_TRW_c?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("昼夜交替", "Day Night Cycle"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/Forest/BP_BattleRoyaleGameModeTeamPUBG_Double_Night.BP_BattleRoyaleGameModeTeamPUBG_Double_Night_C?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("春节模式", "Spring Festival Mode"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/Forest/BP_BattleRoyaleGameMode_PUBG_Spring.BP_BattleRoyaleGameMode_PUBG_Spring_C?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("超能模式", "Super Power Mode"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/SuperPower/SuperPowerGameMode_1.SuperPowerGameMode_1_C?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("比赛模式", "Tournament Mode"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/BP_BattleRoyaleGameMode_PUBG_tournament.BP_BattleRoyaleGameMode_PUBG_tournament_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } + if (ImGui::Button(T("圣诞模式", "Christmas Mode"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/Forest/BP_BattleRoyaleGameMode_PUBG_xmas.BP_BattleRoyaleGameMode_PUBG_xmas_C?listen?PlayerName=Server",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=true; + 提示=false; + } +} + +if (ImGui::CollapsingHeader(T("服务端地图-海洋战役模式", "Service Maps - Ocean Battle Mode"))) + { + if (ImGui::Button(T("海岛-海洋战役", "Forest - Ocean Battle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/NewGameMode/BP_BattleRoyaleGameMode_OceanBattle.BP_BattleRoyaleGameMode_OceanBattle_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-海洋战役", "Snow - Ocean Battle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?game=/Game/BluePrints/Core/NewGameMode/BP_BattleRoyaleGameMode_OceanBattle.BP_BattleRoyaleGameMode_OceanBattle_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-海洋战役", "Desert - Ocean Battle"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Desert/PUBG_Desert?game=/Game/BluePrints/Core/NewGameMode/BP_BattleRoyaleGameMode_OceanBattle.BP_BattleRoyaleGameMode_OceanBattle_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} +if (ImGui::Button(T("雨林-海洋战役", "Rainforest - Ocean Battle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?game=/Game/BluePrints/Core/NewGameMode/BP_BattleRoyaleGameMode_OceanBattle.BP_BattleRoyaleGameMode_OceanBattle_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + } +if (ImGui::CollapsingHeader(T("服务端地图-天命圈模式", "Server Maps - Destiny Circle Mode"))) + { + if (ImGui::Button(T("海岛-天命圈", "Forest - Destiny Circle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircle_1.DestinyCircle_1_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-天命圈", "Snow - Destiny Circle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircle_1.DestinyCircle_1_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-天命圈", "Desert - Destiny Circle"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Desert/PUBG_Desert?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircle_1.DestinyCircle_1_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雨林-天命圈", "Rainforest - Destiny Circle"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?game=/Game/BluePrints/Core/DestinyCircle/DestinyCircle_1.DestinyCircle_1_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + } +if (ImGui::CollapsingHeader(T("服务端地图-特殊模式", "Server Maps - Special Mode"))) + { + if (ImGui::Button(T("训练场-特殊", "Training Ground - Special"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/Shooting_Range/shooting_test/shooting_range4?game=/Game/BluePrints/Core/BP_BattleRoyaleGameModeTeamPUBG.BP_BattleRoyaleGameModeTeamPUBG_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("海岛-特殊", "Forest - Special"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?game=/Game/BluePrints/Core/BP_BattleRoyaleGameModeTeamPUBG.BP_BattleRoyaleGameModeTeamPUBG_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-特殊", "Snow - Special"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?game=/Game/BluePrints/Core/BP_BattleRoyaleGameModeTeamPUBG.BP_BattleRoyaleGameModeTeamPUBG_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-特殊", "Desert - Special"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Desert/PUBG_Desert?game=/Game/BluePrints/Core/BP_BattleRoyaleGameModeTeamPUBG.BP_BattleRoyaleGameModeTeamPUBG_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雨林-特殊", "Rainforest - Special"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?game=/Game/BluePrints/Core/BP_BattleRoyaleGameModeTeamPUBG.BP_BattleRoyaleGameModeTeamPUBG_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} +} +if (ImGui::CollapsingHeader(T("服务端地图-战争模式", "Server Maps - War Mode"))) + { + if (ImGui::Button(T("海岛-战争", "Forest - War"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Forest/PUBG_Forest?Game=/Game/Blueprints/Core/War/BP_WarGameMode.BP_WarGameMode_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-战争", "Snow - War"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?Game=/Game/Blueprints/Core/War/BP_WarGameMode.BP_WarGameMode_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-战争", "Desert - War"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Desert/PUBG_Desert?Game=/Game/Blueprints/Core/War/BP_WarGameMode.BP_WarGameMode_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雨林-战争", "Rainforest - War"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),混淆("open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?Game=/Game/Blueprints/Core/War/BP_WarGameMode.BP_WarGameMode_C?listen"),UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + + } +if (ImGui::CollapsingHeader(T("服务端地图-训练模式", "Server Maps - Training Mode"))) + { + +if (ImGui::Button(T("海岛-训练", "Forest - Training"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Forest/PUBG_Forest?Game=/Game/BluePrints/Core/BP_BattleRoyalTrainingGameMode.BP_BattleRoyalTrainingGameMode_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雪地-训练", "Snow - Training"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?Game=/Game/BluePrints/Core/BP_BattleRoyalTrainingGameMode.BP_BattleRoyalTrainingGameMode_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("沙漠-训练", "Desert - Training"), ImVec2(-1,40))){ + + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Desert/PUBG_Desert?Game=/Game/BluePrints/Core/BP_BattleRoyalTrainingGameMode.BP_BattleRoyalTrainingGameMode_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + +if (ImGui::Button(T("雨林-训练", "Rainforest - Training"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_Savage/PUBG_Savage_Main?Game=/Game/BluePrints/Core/BP_BattleRoyalTrainingGameMode.BP_BattleRoyalTrainingGameMode_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} +} +if (ImGui::Button(T("雪地-年兽", "Snow - Year Beast"), ImVec2(-1,40))){ + +UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open /Game/Maps/PUBG_DihorOtok/DihorOtok_Main?game=/Game/BluePrints/Core/YearBeast/BP_BRGameModeTeam_YearBeast.BP_BRGameModeTeam_YearBeast_C?listen",UGameplayStatics::GetPlayerController(GetWorld(),0)); +SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); +HUD->PendingGameStatus="Fighting"; +物资功能=true; +提示=false; +} + + +ImGui::EndTabItem(); +} +if(功能设置){ + if(提示){ + ImGui::Text(T("您当前不是服务端无法使用部分功能", "You are not currently a server and\ncannot use some functions")); + } +if (ImGui::CollapsingHeader(T("修复功能","Repair the game"))) { + ImGui::Text(T("修复载具目前还有个小问题\n无法清理玩家指针\n所以导致在下一局游戏中可能会崩溃", "There is still a minor problem with the fixed vehicle\nunable to clean up the player pointer\n so it may crash in the next game")); +ImGui::Checkbox(T("修复着陆", "Repair landing"), &修复着陆); +if(物资功能){ +ImGui::Checkbox(T("修复部分伤害和攀爬", "Repair some hurt and climbing"), &修复部分); +} +if(ImGui::Button("伤害修复",ImVec2(-1,55))){FixDamage();} +//ImGui::Checkbox("DamageFix", &DamageFix); +ImGui::Checkbox(T("修复车辆", "Fix Vehicle"), &修复车辆); + + if (修复车辆) { + ProcessPlayers(); + + ImGui::Separator(); + ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), T("驾驶员位置调节", "Driver Position Adjustment")); + ImGui::SliderFloat(T("X偏移", "X Offset"), &驾驶员X偏移, -200.0f, 200.0f, "%.1f"); + ImGui::SliderFloat(T("Y偏移", "Y Offset"), &驾驶员Y偏移, -200.0f, 200.0f, "%.1f"); + ImGui::SliderFloat(T("Z偏移", "Z Offset"), &驾驶员Z偏移, 0.0f, 200.0f, "%.1f"); + + ImGui::Separator(); + ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), T("乘客位置调节", "Passenger Position Adjustment")); + ImGui::SliderFloat(T("乘客X偏移", "Passenger X Offset"), &乘客X偏移, -200.0f, 200.0f, "%.1f"); + ImGui::SliderFloat(T("乘客Y偏移", "Passenger Y Offset"), &乘客Y偏移, -200.0f, 200.0f, "%.1f"); + ImGui::SliderFloat(T("乘客Z偏移", "Passenger Z Offset"), &乘客Z偏移, 0.0f, 200.0f, "%.1f"); + + if (ImGui::Button(T("重置位置", "Reset Position"))) { + 驾驶员X偏移 = 100.0f; + 驾驶员Y偏移 = 0.0f; + 驾驶员Z偏移 = 80.0f; + 乘客X偏移 = 50.0f; + 乘客Y偏移 = 50.0f; + 乘客Z偏移 = 80.0f; + } + + ImGui::Separator(); + ImGui::Spacing(); + + ImGui::TextColored(ImVec4(0.0f, 1.0f, 1.0f, 1.0f), T("车辆修复日志", "Vehicle Repair Log")); + + if (ImGui::Button(T("清空日志", "Clear Log"))) { + VehicleFixLog::ClearLogs(); + } + ImGui::SameLine(); + + static bool autoScroll = true; + ImGui::Checkbox(T("自动滚动", "Auto Scroll"), &autoScroll); + + ImGui::BeginChild(T("车辆修复日志", "Vehicle Fix Logs"), ImVec2(0, 200), true, + ImGuiWindowFlags_HorizontalScrollbar); + + auto logs = VehicleFixLog::GetRecentLogs(50); + + for (const auto& log : logs) { + ImVec4 color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); + + if (log.find("错误") != std::string::npos || + log.find("失败") != std::string::npos || + log.find("警告") != std::string::npos) { + color = ImVec4(1.0f, 0.4f, 0.4f, 1.0f); + } + else if (log.find("成功") != std::string::npos || + log.find("完成") != std::string::npos) { + color = ImVec4(0.4f, 1.0f, 0.4f, 1.0f); + } + else if (log.find("调试") != std::string::npos) { + color = ImVec4(0.8f, 0.8f, 0.4f, 1.0f); + } + else if (log.find("服务端") != std::string::npos) { + color = ImVec4(0.4f, 0.8f, 1.0f, 1.0f); + } + else if (log.find("客户端") != std::string::npos) { + color = ImVec4(0.8f, 0.4f, 1.0f, 1.0f); + } + + ImGui::PushStyleColor(ImGuiCol_Text, color); + ImGui::TextWrapped("%s", log.c_str()); + ImGui::PopStyleColor(); + } + + if (autoScroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY()) { + ImGui::SetScrollHereY(1.0f); + } + + ImGui::EndChild(); + } +} +if (ImGui::CollapsingHeader(T("游戏相关","game-related"))) { +if(物资功能){ +ImGui::Text(T("请先让客户端连接进服务端后\n服务端再点击内存防崩按钮\n倒计时到后会上飞机","Please let the client connect to the server first\nthe server and then click the Memory crash prevention button\nthe countdown will run out and you will board the plane")); +ImGui::Text(T("要是想要客户端能在上飞机后\n能有新的连进来的话可以点击\n修复无法新链接","If you want the client to have a new connection \n after getting on the plane, you can click *Fixed inability to new links*")); +if (ImGui::Button(T("内存防崩","Memory crash prevention"),ImVec2(-1,40))){ +safeWritedword(UE4 + 0xC5EBBC, -476053503); +safeWritedword(UE4 + 0xEDD870, -516948194); +safeWritedword(UE4 + 0xEDF42C, -516948194); +safeWritedword(UE4 + 0x30B92F8, -516948194); +safeWritedword(UE4 + 0x30B93C4, -516948194); +safeWritedword(UE4 + 0x103F880, -516948194); +safeWritedword(UE4 + 0x10BA09C, -516948194); +safeWritedword(UE4 + 0x1040090, 1); + } +if (ImGui::Button(T("修复无法新链接","Fixed inability to new links"),ImVec2(-1,40))){ +safeWritedword(UE4 + 0xC5EBBC, -450891772); +safeWritedword(UE4 + 0xEDD870, -382908368); +safeWritedword(UE4 + 0xEDF42C, -382907376); +safeWritedword(UE4 + 0x30B92F8, -382908368); +safeWritedword(UE4 + 0x30B93C4, -382907376); +safeWritedword(UE4 + 0x103F880, -382907376); +safeWritedword(UE4 + 0x10BA09C, -443473904); +safeWritedword(UE4 + 0x1040090, -382908368); +} +if (ImGui::Button(T("启用飞机横幅","Activate the aircraft banner"),ImVec2(-1,40))){ + 获取对象(); + if (GameMode) { + GameMode->bEnablePlaneBanner = true; + } + } +ImGui::Text(T("如果你遇到被困在地底的情况\n需在服务端点击强制加载全部地图\n这样问题就会解决","If you encounter a situation where you are trapped underground\nyou need to click Load all land on the server\nThis will solve the problem.")); +} +if (ImGui::Button(T("强制加载全地图","Load all land"),ImVec2(-1,40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(UGMCheatManager::StaticClass())) { + UGMCheatManager* GMCheatManager = (UGMCheatManager*)Object; + GMCheatManager->GMSetServerLevelLoadingMode(true); + g_LocalPlayer->STPlayerController->bIsBattleOwner = true; + g_LocalPlayer->STPlayerController->LoadAllLand(true); + g_LocalPlayer->STPlayerController->SetServerLevelLoadingMode(true); + } + } +} +if (ImGui::Button(T("强制加载全地图2","Load all land2"),ImVec2(-1,40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(ULevelStreaming::StaticClass())) { + ULevelStreaming* LevelStreaming = (ULevelStreaming*)Object; + LevelStreaming->bShouldBeLoaded = true; + LevelStreaming->bShouldBeVisible = true; + LevelStreaming->bDisableDistanceStreaming = true; + LevelStreaming->bShouldBlockOnLoad = true; + } + } +} + + if (ImGui::Button(T("NetDriver优化", "NetDriver optimization"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(UNetDriver::StaticClass())) { + UNetDriver* NetDriver = (UNetDriver*)Object; + NetDriver->MaxDownloadSize = 9999999; + NetDriver->bClampListenServerTickRate = false; + NetDriver->NetServerMaxTickRate = 0; + NetDriver->MaxInternetClientRate = 1000000; + NetDriver->MaxClientRate = 1000000; + NetDriver->ServerTravelPause = 0.1f; + NetDriver->SpawnPrioritySeconds = 0.5f; + NetDriver->RelevantTimeout = 999999.9f; + NetDriver->KeepAliveTime = 20.0f; + NetDriver->InitialConnectTimeout = 999999.9f; + NetDriver->ConnectionTimeout = 999999.9f; + NetDriver->bNoTimeouts = true; + } + } +} +if(物资功能){ +if (ImGui::Button(T("网络优化", "network optimization"), ImVec2(-1,40))){ +ApplyStableConfigToWorld(GetWorld()); +}} + if(ImGui::Button(T("刷人机10个", "Spawn AI x10"),ImVec2(-1,40))){ +g_LocalPlayer->STPlayerController->SpawnAI(10); +} + if (ImGui::Button(T("刷人机100个", "Spawn AI x100"), ImVec2(-1, 40))) { + g_LocalPlayer->STPlayerController->SpawnAI(100); + } + if (ImGui::Button(T("刷人机1000个", "Spawn AI x1000"), ImVec2(-1, 40))) { + g_LocalPlayer->STPlayerController->SpawnAI(1000); + } + if (ImGui::Button(T("刷人机10000个", "Spawn AI x10000"), ImVec2(-1, 40))) { + g_LocalPlayer->STPlayerController->SpawnAI(10000); + } +if (ImGui::Button(T("刷人机队友", "Spawn AI Teammate"), ImVec2(-1,40))){ +g_LocalPlayer->STPlayerController->SpawnAITeammate(1); +} +if (ImGui::Button(T("停止人机", "Stop AI"), ImVec2(-1,40))){ +g_LocalPlayer->STPlayerController->StopAI(); +} +if (ImGui::Button(T("重启人机", "Restart AI"), ImVec2(-1,40))){ +g_LocalPlayer->STPlayerController->RestartAI(); +} +if(物资功能){ +if (ImGui::Button(T("倒计时0", "Countdown 0"), ImVec2(-1,40))){ +SDK::UGameBackendHUD* hud = UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD* hd = hud->GetFirstGameFrontendHUD(); +auto BattleRoyaleGameModeBase=(ABattleRoyaleGameModeBase*)(hd->GetGameMode()); +auto gamemode=(UGameModeStateReady*)(BattleRoyaleGameModeBase->GameModeStateReady); +gamemode->StateTime=0; +} +if (ImGui::Button(T("倒计时一万", "Countdown 10000"), ImVec2(-1,40))){ +SDK::UGameBackendHUD* hud = UGameBackendHUD::GetInstance(); +SDK::UGameFrontendHUD* hd = hud->GetFirstGameFrontendHUD(); +auto BattleRoyaleGameModeBase=(ABattleRoyaleGameModeBase*)(hd->GetGameMode()); +auto gamemode=(UGameModeStateReady*)(BattleRoyaleGameModeBase->GameModeStateReady); +gamemode->StateTime=10000; +} + +if (ImGui::Button(T("在当前位置-刷空投","Call for airdrop"),ImVec2(-1,40))) { + if (g_LocalPlayer && g_LocalPlayer->STPlayerController) { + SDK::APawn* playerPawn = g_LocalPlayer->STPlayerController->Pawn; + + if (playerPawn && playerPawn->RootComponent) { + SDK::FVector playerPosition = playerPawn->RootComponent->K2_GetComponentLocation(); + float x = playerPosition.X; + float y = playerPosition.Y; + + g_LocalPlayer->STPlayerController->StartAirDropSpecified(x, y); + } else { + ImGui::Text(T("无法获取玩家Pawn或RootComponent!", "Unable to get player Pawn or RootComponent!")); + } + } else { + ImGui::Text(T("玩家或控制器无效!", "Player or controller invalid!")); + } +} +if (ImGui::Button(T("在当前位置-发动空袭","Call for air strikes"),ImVec2(-1,40))) { + if (g_LocalPlayer && g_LocalPlayer->STPlayerController) { + SDK::APawn* playerPawn = g_LocalPlayer->STPlayerController->Pawn; + + if (playerPawn && playerPawn->RootComponent) { + SDK::FVector playerPosition = playerPawn->RootComponent->K2_GetComponentLocation(); + float x = playerPosition.X; + float y = playerPosition.Y; + + g_LocalPlayer->STPlayerController->StartAirAttackSpecified(x, y, 5700); + } else { + ImGui::Text(T("无法获取玩家Pawn或RootComponent!", "Unable to get player Pawn or RootComponent!")); + } + } else { + ImGui::Text(T("玩家或控制器无效!", "Player or controller invalid!")); + } +} + +if (ImGui::Button(T("发动超级空袭", "Call for super strikes"), ImVec2(-1, 40))) { + if (g_LocalPlayer && g_LocalPlayer->STPlayerController) { + SDK::APawn* playerPawn = g_LocalPlayer->STPlayerController->Pawn; + + if (playerPawn && playerPawn->RootComponent) { + SDK::FVector playerPosition = playerPawn->RootComponent->K2_GetComponentLocation(); + float x = playerPosition.X; + float y = playerPosition.Y; + + g_LocalPlayer->STPlayerController->StartAirAttackSpecified(x, y, 10000000000.00); + } + else { + ImGui::Text(T("无法获取玩家Pawn或RootComponent!", "Unable to get player Pawn or RootComponent!")); + } + } + else { + ImGui::Text(T("玩家或控制器无效!", "Player or controller invalid!")); + } +} + +if (ImGui::Button(T("无敌","invincible"),ImVec2(-1,40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(UGMCheatManager::StaticClass())) { + UGMCheatManager* GMCheatManager = (UGMCheatManager*)Object; + GMCheatManager->GMInvincible(true); + } + } +}} +if (ImGui::Button(T("极端天气","extreme weather"),ImVec2(-1,40))) { + g_LocalPlayer->STPlayerController->SetIsSnowy(true); + g_LocalPlayer->STPlayerController->SetIsRainy(true); + g_LocalPlayer->STPlayerController->SetIsBlizzard(true); + + g_LocalPlayer->STPlayerController->GMOpenWeather(5); +} +if(物资功能){ +if (ImGui::Button(T("杀死大年兽","Kill Big Year Beast"),ImVec2(-1,40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(UGMCheatManager::StaticClass())) { + UGMCheatManager* GMCheatManager = (UGMCheatManager*)Object; + GMCheatManager->KillBigYearBeast(); + } + } +} +if (ImGui::Button(T("开伞", "Open Parachute"), ImVec2(-1,40))) { + auto pc = UGameplayStatics::GetPlayerController(GetWorld(), 0); + auto STExtraPlayerCharacter = (ASTExtraPlayerCharacter *)(pc->Pawn); + STExtraPlayerCharacter->SetParachuteState(EParachuteState::PS_Opening); +} +if (ImGui::Button(T("立正", "Stand At Attention"), ImVec2(-1,40))) { + auto pc = UGameplayStatics::GetPlayerController(GetWorld(), 0); + auto STExtraPlayerCharacter = (ASTExtraPlayerCharacter *)(pc->Pawn); + STExtraPlayerCharacter->SetParachuteState(EParachuteState::PS_Landing); +} +if (ImGui::Button(T("取消", "Cancel"), ImVec2(-1,40))) { + auto pc = UGameplayStatics::GetPlayerController(GetWorld(), 0); + auto STExtraPlayerCharacter = (ASTExtraPlayerCharacter *)(pc->Pawn); + STExtraPlayerCharacter->SetParachuteState(EParachuteState::PS_None); +} +if (ImGui::Button(T("自由落体","Free fall"), ImVec2(-1,40))){ + auto pc =UGameplayStatics::GetPlayerController(GetWorld(),0); + auto STExtraPlayerCharacter=(ASTExtraPlayerCharacter*)(pc->Pawn); + STExtraPlayerCharacter->SetParachuteState(EParachuteState::PS_FreeFall); +}} +} +if(物资功能){ +if (ImGui::CollapsingHeader(T("玩家传送", "Player Teleport"))) { +if(ImGui::Button(T("传送(高空)", "Teleport (High Altitude)"),ImVec2(-1,30))){ + long z=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x158; +writefloat(z,7726.837036); +} +if(ImGui::Button(T("传送(年兽刷新点)", "Teleport (Year Beast Spawn)"),ImVec2(-1,30))){ +long x=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x150; +long y=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x154; +long z=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x158; +writefloat(x,243108); +writefloat(y,252095); +writefloat(z,7939); +} +if(ImGui::Button(T("传送(训练场)", "Teleport (Training Ground)"),ImVec2(-1,30))){ +long x=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x150; +long y=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x154; +long z=getPointer(getPointer(getPointer(getPointer(UE4+0x4634ef0)+0x20)+0x139c)+0x130)+0x158; +writefloat(x,318196.5); +writefloat(y,16122.200195); +writefloat(z,726.837036); +} + ImGui::BeginChild(T("状态区域", "Status Area"), ImVec2(0, 60), true); + { + if (ImGui::GetTime() - fStatusDisplayTime < 3.0f && !sStatusMessage.empty()) { + ImGui::Text(T("状态: %s", "Status: %s"), sStatusMessage.c_str()); + } else { + ImGui::Text(T("状态: 等待操作", "Status: Waiting for operation")); + } + + if (bIsTeleporting) { + ImGui::SameLine(); + ImGui::Text(T(" (处理中...)", " (Processing...)")); + } + } + ImGui::EndChild(); + + ImGui::Spacing(); + + ImGui::Text(T("主功能:", "Main Functions:")); + ImGui::Spacing(); + + if (ImGui::Button(T("传送所有玩家到我", "Teleport All Players to Me"), ImVec2(-1, 40))) { + SafeTeleportAllPlayers(); + } + + ImGui::Spacing(); + ImGui::Separator(); + ImGui::Spacing(); + + ImGui::Text(T("调试信息:", "Debug Info:")); + ImGui::Spacing(); + + ImGui::Columns(2, T("调试按钮", "Debug Buttons"), false); + + if (ImGui::Button(T("服务端位置", "Server Position"), ImVec2(-1, 30))) { + SDK::FVector serverPos = GetServerPlayerPositionSafe(); + SDK::FRotator serverRot = GetServerPlayerRotationSafe(); + + if (serverPos.X == 0.0f && serverPos.Y == 0.0f && serverPos.Z == 0.0f) { + sStatusMessage = T("未找到服务端位置", "Server position not found"); + } else { + char posStr[256]; + snprintf(posStr, sizeof(posStr), T("位置: X=%.1f, Y=%.1f, Z=%.1f\n旋转: P=%.1f, Y=%.1f, R=%.1f", + "Position: X=%.1f, Y=%.1f, Z=%.1f\nRotation: P=%.1f, Y=%.1f, R=%.1f"), + serverPos.X, serverPos.Y, serverPos.Z, + serverRot.Pitch, serverRot.Yaw, serverRot.Roll); + sStatusMessage = posStr; + } + fStatusDisplayTime = ImGui::GetTime(); + } + + ImGui::NextColumn(); + + if (ImGui::Button(T("玩家数量", "Player Count"), ImVec2(-1, 30))) { + SDK::UWorld* world = GetWorld(); + SDK::APlayerController* playerCtrl = nullptr; + bool isServer = false; + + if (IsValidPointer(world)) { + playerCtrl = SDK::UGameplayStatics::GetPlayerController(world, 0); + if (IsValidPointer(playerCtrl) && playerCtrl->HasAuthority()) { + isServer = true; + } + } + + std::vector playerList = GetAllPlayersList(); + int allPlayers = static_cast(playerList.size()); + + std::vector teleportableList = GetSafePlayerList(); + int teleportablePlayers = static_cast(teleportableList.size()); + + char infoStr[256]; + if (isServer) { + snprintf(infoStr, sizeof(infoStr), + T("服务端玩家\n总玩家数: %d\n可传送玩家: %d", + "Server Player\nTotal players: %d\nPlayers available: %d"), + allPlayers, teleportablePlayers); + } else { + snprintf(infoStr, sizeof(infoStr), + T("客户端玩家\n总玩家数: %d\n可传送玩家: %d", + "Client Player\nTotal players: %d\nPlayers available: %d"), + allPlayers, teleportablePlayers); + } + + sStatusMessage = infoStr; + fStatusDisplayTime = ImGui::GetTime(); + } + + ImGui::Columns(1); + + ImGui::Spacing(); + + ImGui::Text(T("系统控制:", "System Control:")); + ImGui::Spacing(); + + ImGui::Columns(2, T("系统按钮", "System Buttons"), false); + + if (ImGui::Button(T("初始化系统", "Initialize System"), ImVec2(-1, 30))) { + InitializeTeleportSystem(); + sStatusMessage = T("传送系统已初始化", "Teleport system initialized"); + fStatusDisplayTime = ImGui::GetTime(); + } + + ImGui::NextColumn(); + + if (ImGui::Button(T("清理系统", "Cleanup System"), ImVec2(-1, 30))) { + CleanupTeleportSystem(); + sStatusMessage = T("传送系统已清理", "Teleport system cleaned up"); + fStatusDisplayTime = ImGui::GetTime(); + } + + ImGui::Columns(1); + + ImGui::Spacing(); + ImGui::Separator(); + ImGui::Spacing(); + + ImGui::Text(T("使用说明:", "Instructions:")); + ImGui::BeginChild(T("说明区域", "Instructions Area"), ImVec2(0, 80), true); + { + ImGui::BulletText(T("点击上方按钮传送所有玩家", "Click the button above to teleport all players")); + ImGui::BulletText(T("传送时自动避免玩家重叠", "Automatically prevents player overlap")); + ImGui::BulletText(T("中间按钮用于查看调试信息", "Middle buttons are for debug information")); + ImGui::BulletText(T("下方按钮用于系统维护", "Bottom buttons are for system maintenance")); + } + ImGui::EndChild(); +}} +if(物资功能){ + +}else{ +if (ImGui::CollapsingHeader(T("载具功能","fly car"))) { +ImGui::Checkbox(T("车辆自控初始化","initialization"), &自控初始化); +ImGui::Checkbox(T("喇叭飞天","horns fly"), &喇叭飞天); +ImGui::SameLine(); +ImGui::Checkbox(T("载具加速","car rapid"), &载具加速); +ImGui::Checkbox(T("车辆右转圈","Turn right"), &转圈); +ImGui::SameLine(); +ImGui::Checkbox(T("车辆左转圈","Turn left"), &转圈2); +ImGui::Checkbox(T("无视碰撞","Ignore collisions"), &无视碰撞开); +ImGui::SameLine(); +ImGui::Checkbox(T("无视重力","Ignore gravity"), &无视重力开); +ImGui::SliderFloat(T("载具速度","acceleration"), &载具速度, 0.01f, 20.f); +ImGui::SliderFloat(T("喇叭高度","fly height"), &喇叭高度, 0.01f, 20.f); +} +if (ImGui::CollapsingHeader(T("测试--单机开枪", "Test - Offline Shooting"))) { + if (ImGui::Button(T("进入单机链接", "Join Offline Server"), ImVec2(-1,40))){ + UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(),"open 127.0.0.1:7788",UGameplayStatics::GetPlayerController(GetWorld(),0)); + SDK::UGameBackendHUD*Instance=UGameBackendHUD::GetInstance(); + SDK::UGameFrontendHUD*HUD=Instance->GetFirstGameFrontendHUD(); + HUD->PendingGameStatus="Fighting"; + 物资功能=false; + 提示=true; + } + + ImGui::Text(T("选择地图数据:", "Select Map Data:")); + + static std::string selected_map = T("无", "None"); + + if (ImGui::Button(T("训练场", "Training Ground"), ImVec2(100, 40))) { + if (SetProxyMapData("1")) { + selected_map = T("训练场", "Training Ground"); + } + } + ImGui::SameLine(); + if (ImGui::Button(T("海岛", "Forest"), ImVec2(100, 40))) { + if (SetProxyMapData("2")) { + selected_map = T("海岛", "Forest"); + } + } + ImGui::SameLine(); + if (ImGui::Button(T("雪地", "Snow"), ImVec2(100, 40))) { + if (SetProxyMapData("3")) { + selected_map = T("雪地", "Snow"); + } + } + if (ImGui::Button(T("雨林", "Rainforest"), ImVec2(100, 40))) { + if (SetProxyMapData("4")) { + selected_map = T("雨林", "Rainforest"); + } + } + ImGui::SameLine(); + if (ImGui::Button(T("沙漠", "Desert"), ImVec2(100, 40))) { + if (SetProxyMapData("5")) { + selected_map = T("沙漠", "Desert"); + } + } + + ImGui::Text(T("当前地图: %s", "Current Map: %s"), GetProxyCurrentMap().c_str()); + + if (selected_map != T("无", "None")) { + ImGui::TextColored(ImVec4(0.0f, 1.0f, 0.0f, 1.0f), T("已选择: %s", "Selected: %s"), selected_map.c_str()); + } + + static bool server_running_display = false; + static std::vector _embedded_logs; + + if (ImGui::Button(server_running_display ? T("停止服务端", "Stop Server") : T("启动服务端", "Start Server"))) { + if (!server_running_display) { + if (StartEmbeddedUDPServer()) { + server_running_display = true; + } + } else { + StopEmbeddedUDPServer(); + server_running_display = false; + } + } + + ImGui::SameLine(); + ImGui::Text(T("服务端状态: ", "Server Status: ")); + ImGui::SameLine(); + + ImVec4 color; + const char* symbol = "◆"; + if (server_running_display) + color = ImVec4(0.0f, 1.0f, 0.0f, 1.0f); + else + color = ImVec4(1.0f, 0.0f, 0.0f, 1.0f); + + if (server_running_display) { + ImGui::TextColored(color, T("%s 运行中", "%s Running"), symbol); + } else { + ImGui::TextColored(color, T("%s 已停止", "%s Stopped"), symbol); + } + + ImGui::TextWrapped(T("日志:", "Logs:")); + ImGui::BeginChild("EmbeddedLogs", ImVec2(0,150), true, ImGuiWindowFlags_HorizontalScrollbar); + _embedded_logs.clear(); + GetEmbeddedLogs(_embedded_logs); + int start = _embedded_logs.size() > 200 ? (int)_embedded_logs.size() - 200 : 0; + for (int i = start; i < (int)_embedded_logs.size(); ++i) { + ImGui::TextWrapped("%s", _embedded_logs[i].c_str()); + } + ImGui::EndChild(); +}} +if (ImGui::Button(T("广角", "Wide Angle"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(ULocalPlayer::StaticClass())) { + auto playerChar = (ULocalPlayer *) Object; + playerChar->AspectRatioAxisConstraint = EAspectRatioAxisConstraint::AspectRatio_MaintainYFOV; + } + } +} +if(ImGui::Button(T("更多功能", "More Functions"),ImVec2(-1,40))){ +更多功能=true; +} +if (ImGui::CollapsingHeader(T("修复大厅","Restoring the Hall"))) { +if (ImGui::Button("刷新关卡列表", ImVec2(-1, 35))) { + RefreshLevelStreamingList(); + } + ImGui::Separator(); + + // 关卡列表显示区域 + ImGui::BeginChild("LevelList", ImVec2(0, 200), true); + if (g_LevelStreamingList.empty()) { + ImGui::Text("暂无关卡数据,请点击刷新"); + } else { + for (int i = 0; i < (int)g_LevelStreamingList.size(); i++) { + auto level = g_LevelStreamingList[i]; + if (!level) continue; + if (ImGui::Selectable(level->GetName().c_str(), g_SelectedLevelIndex == i)) { + g_SelectedLevelIndex = i; + } + } + } + ImGui::EndChild(); + ImGui::Separator(); + + // 选中关卡信息及操作 + if (g_SelectedLevelIndex >= 0 && g_SelectedLevelIndex < (int)g_LevelStreamingList.size()) { + ImGui::Text("当前选中: %s", g_LevelStreamingList[g_SelectedLevelIndex]->GetName().c_str()); + } else { + ImGui::Text("未选中任何关卡"); + } + if (ImGui::Button("隐藏选中", ImVec2(-1, 35))) HideSelectedLevel(); + if (ImGui::Button("移除选中", ImVec2(-1, 35))) UnloadSelectedLevel(); + if (ImGui::Button("恢复选中", ImVec2(-1, 35))) RestoreSelectedLevel(); + ImGui::Spacing(); + if (ImGui::Button("一键隐藏所有", ImVec2(-1, 35))) HideAllLevels(); + if (ImGui::Button("隐藏一半", ImVec2(-1, 35))) HideHalfLevels(); + if (ImGui::Button("一键显示所有", ImVec2(-1, 35))) ShowAllLevels(); +} + if (ImGui::Button(混淆("执行命令"), ImVec2(-1, 55))) { + // 执行控制台命令(); + } + } + + if (show_ChildMenu == 9) { + ImGui::Spacing(); + + ImGui::Text(混淆("【模式1】探测附近建筑")); + ImGui::Spacing(); + + ImGui::Text(混淆("探测半径: %.0f"), 建筑探测半径); + ImGui::SliderFloat(混淆("##探测半径"), &建筑探测半径, 500, 99999999, "%.0f"); + + if (ImGui::Button(混淆("探测并添加到列表"), ImVec2(-1, 55))) { + 探测并添加附近建筑(建筑探测半径); + if (建筑列表.empty()) { + ImGui::OpenPopup(混淆("未找到建筑")); + } else { + ImGui::OpenPopup(混淆("探测完成")); + } + } + + if (ImGui::BeginPopupModal(混淆("探测完成"), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text(混淆("已添加 %d 个建筑到列表"), (int)建筑列表.size()); + ImGui::Spacing(); + if (ImGui::Button(混淆("确定"), ImVec2(120, 0))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + + if (ImGui::BeginPopupModal(混淆("未找到建筑"), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text(混淆("半径内未找到建筑,请靠近建筑或增大半径")); + ImGui::Spacing(); + if (ImGui::Button(混淆("确定"), ImVec2(120, 0))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + + ImGui::Spacing(); + + if (!建筑列表.empty()) { + ImGui::Text(混淆("已探测建筑列表 (%d个):"), (int)建筑列表.size()); + ImGui::SameLine(); + if (ImGui::Button(混淆("清空列表"), ImVec2(80, 0))) { + 清空建筑列表(); + } + + ImGui::BeginChild(混淆("建筑列表区域"), ImVec2(0, 200), true); + + for (int i = 0; i < (int)建筑列表.size(); i++) + { + std::string 显示文本 = 建筑列表[i].名称; + if (显示文本.length() > 30) { + 显示文本 = 显示文本.substr(0, 27) + "..."; + } + + if (ImGui::Selectable(显示文本.c_str(), 当前选中建筑索引 == i)) + { + 当前选中建筑索引 = i; + 加载选中的建筑(); + } + + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::Text(建筑列表[i].路径.c_str()); + ImGui::EndTooltip(); + } + } + + ImGui::EndChild(); + + if (当前选中建筑索引 >= 0) { + ImGui::Text(混淆("当前选中: %s"), 建筑列表[当前选中建筑索引].名称.c_str()); + } + } else { + ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), 混淆("暂无探测记录,点击上方按钮探测")); + } + + ImGui::Spacing(); + ImGui::Separator(); + + ImGui::Text(混淆("【模式2】粘贴绝对路径")); + ImGui::Spacing(); + + ImGui::PushItemWidth(200); + ImGui::InputText(混淆("##建筑路径"), 建筑路径输入, sizeof(建筑路径输入)); + ImGui::PopItemWidth(); + ImGui::SameLine(); + if (ImGui::Button(混淆("粘贴"), ImVec2(70, 0))) { + std::string clip = getClipboardTextt(); + if (!clip.empty()) { + strcpy(建筑路径输入, clip.c_str()); + } + } + + if (ImGui::Button(混淆("加载路径建筑"), ImVec2(-1, 55))) { + UClass* 加载的类 = 通过路径加载建筑类(建筑路径输入); + if (加载的类) { + 缓存的建筑类 = 加载的类; + ImGui::OpenPopup(混淆("加载成功")); + } else { + ImGui::OpenPopup(混淆("加载失败")); + } + } + + if (ImGui::BeginPopupModal(混淆("加载成功"), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text(混淆("建筑类加载成功!")); + ImGui::Spacing(); + if (ImGui::Button(混淆("确定"), ImVec2(120, 0))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + + if (ImGui::BeginPopupModal(混淆("加载失败"), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::Text(混淆("加载失败,请检查路径是否正确")); + ImGui::Text(混淆("格式: Blueprint'/Game/路径/建筑名.建筑名_C'")); + ImGui::Spacing(); + if (ImGui::Button(混淆("确定"), ImVec2(120, 0))) { + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + + ImGui::Spacing(); + ImGui::Separator(); + + ImGui::Text(混淆("【生成控制】")); + ImGui::Spacing(); + + ImGui::Text(混淆("当前缓存: %s"), 缓存的建筑类 ? "已有建筑类" : "无"); + if (缓存的建筑类 && 当前选中建筑索引 >= 0) { + ImGui::SameLine(); + ImGui::TextColored(ImVec4(0, 1, 0, 1), 混淆("(%s)"), 建筑列表[当前选中建筑索引].名称.c_str()); + } + + ImGui::Text(混淆("生成偏移: %.0f"), 建筑生成偏移); + ImGui::SliderFloat(混淆("##生成偏移"), &建筑生成偏移, 200, 1500, "%.0f"); + + if (ImGui::Button(混淆("单次生成"), ImVec2(-1, 55))) { + 执行单次生成(); + } + + bool 旧的跟随模式 = 建筑跟随模式; + ImGui::Checkbox(混淆("跟随模式(持续生成)"), &建筑跟随模式); + if (旧的跟随模式 != 建筑跟随模式) { + 更新建筑跟随状态(); + } + } + +ImGui::EndTabItem(); +} +if(坐标调试){ +if (ImGui::CollapsingHeader(T("坐标调试(海岛)","Coordinate Debugging(Island)"))) { +// 出生点 +if (ImGui::Button("传送(出生点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 796373.625000f); + writefloat(yAxis, 15564.796875f); + writefloat(zAxis, 526.150024f); +} +// 野餐 +if (ImGui::Button("传送(野餐点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 73961.765625f); + writefloat(yAxis, 137797.953125f); + writefloat(zAxis, 6139.821777f); +} + +if (ImGui::Button("传送(K城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 668541.562500f); + writefloat(yAxis, 115466.687500f); + writefloat(zAxis, 1202.660278f); +} + +// 山顶废墟 +if (ImGui::Button("传送(山顶废墟)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 558498.812500f); + writefloat(yAxis, 130586.539062f); + writefloat(zAxis, 25679.998047f); +} + +// S城 +if (ImGui::Button("传送(S城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 385533.843750f); + writefloat(yAxis, 124476.781250f); + writefloat(zAxis, 114.277252f); +} + +// 靶场 +if (ImGui::Button("传送(靶场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 340579.843750f); + writefloat(yAxis, 164234.781250f); + writefloat(zAxis, 1893.813721f); +} + +// Z城 +if (ImGui::Button("传送(Z城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 120202.843750f); + writefloat(yAxis, 120766.796875f); + writefloat(zAxis, 279.809265f); +} + +// G港 +if (ImGui::Button("传送(G港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 208237.562500f); + writefloat(yAxis, 292982.625000f); + writefloat(zAxis, 1147.183105f); +} + +// 医院 +if (ImGui::Button("传送(医院)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 151716.015625f); + writefloat(yAxis, 320286.625000f); + writefloat(zAxis, 2474.388672f); +} + +// G镇 +if (ImGui::Button("传送(G镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 215584.625000f); + writefloat(yAxis, 395646.062500f); + writefloat(zAxis, 145.732346f); +} + +// 废墟 +if (ImGui::Button("传送(废墟)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 315178.343750f); + writefloat(yAxis, 328893.031250f); + writefloat(zAxis, 113.056183f); +} + +// 水城 +if (ImGui::Button("传送(水城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 346776.093750f); + writefloat(yAxis, 312778.812500f); + writefloat(zAxis, -122.358826f); +} + +// R城 +if (ImGui::Button("传送(R城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 395645.062500f); + writefloat(yAxis, 293190.406250f); + writefloat(zAxis, 358.098114f); +} + +// 学校 +if (ImGui::Button("传送(学校)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 422003.750000f); + writefloat(yAxis, 328595.718750f); + writefloat(zAxis, 662.241333f); +} + +// 山田的小穴 +if (ImGui::Button("传送(山田的小穴)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 384737.093750f); + writefloat(yAxis, 374714.562500f); + writefloat(zAxis, 3109.064453f); +} + +// P城 +if (ImGui::Button("传送(P城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 357975.656250f); + writefloat(yAxis, 407357.500000f); + writefloat(zAxis, 3799.720947f); +} + +// 农场 +if (ImGui::Button("传送(农场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 542839.312500f); + writefloat(yAxis, 452304.968750f); + writefloat(zAxis, 161.249191f); +} + +// M城 +if (ImGui::Button("传送(M城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 600232.562500f); + writefloat(yAxis, 481219.187500f); + writefloat(zAxis, 350.063690f); +} + +// 防空洞A +if (ImGui::Button("传送(防空洞A)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 577046.562500f); + writefloat(yAxis, 388334.281250f); + writefloat(zAxis, 2173.750977f); +} + +// 防空洞B +if (ImGui::Button("传送(监狱)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 626493.375000f); + writefloat(yAxis, 377350.250000f); + writefloat(zAxis, 2442.355225f); +} + +// 洋房 +if (ImGui::Button("传送(洋房)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 621526.875000f); + writefloat(yAxis, 298718.843750f); + writefloat(zAxis, 351.399384f); +} + +// Y城 +if (ImGui::Button("传送(Y城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 548812.687500f); + writefloat(yAxis, 245077.437500f); + writefloat(zAxis, 184.976852f); +} + +// L城 +if (ImGui::Button("传送(L城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 708728.687500f); + writefloat(yAxis, 339447.562500f); + writefloat(zAxis, 82.663803f); +} +// 核电站的大鸡巴上 +if (ImGui::Button("传送(核电站上)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 733241.812500f); + writefloat(yAxis, 442407.687500f); + writefloat(zAxis, 5524.284180f); +} + +// 核电站 +if (ImGui::Button("传送(核电站)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 728729.437500f); + writefloat(yAxis, 439039.468750f); + writefloat(zAxis, 2061.244629f); +}// N港 +if (ImGui::Button("传送(N港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 619431.250000f); + writefloat(yAxis, 606584.750000f); + writefloat(zAxis, 90.882019f); +} + +// 军事基地 +if (ImGui::Button("传送(军事基地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 446534.406250f); + writefloat(yAxis, 625284.437500f); + writefloat(zAxis, 87.211082f); +} + +// 打飞机 +if (ImGui::Button("传送(打飞机)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 480024.968750f); + writefloat(yAxis, 643133.500000f); + writefloat(zAxis, 1238.001709f); +} + +// 海的对面是什么 +if (ImGui::Button("传送(海的对面是什么)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 264442.250000f); + writefloat(yAxis, 599815.125000f); + writefloat(zAxis, 461.149933f); +} +// 渔村 +if (ImGui::Button("传送(渔村)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 271059.000000f); + writefloat(yAxis, 563711.750000f); + writefloat(zAxis, 1503.384155f); +} + +// P港 +if (ImGui::Button("传送(P港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 168427.468750f); + writefloat(yAxis, 600518.000000f); + writefloat(zAxis, 90.719124f); +} + +// 矿场 +if (ImGui::Button("传送(矿场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 163445.375000f); + writefloat(yAxis, 525739.312500f); + writefloat(zAxis, 808.120911f); +} +} +if (ImGui::CollapsingHeader(T("坐标调试(雪地)","Coordinate Debugging(Snow)"))) { +// 出生点 +if (ImGui::Button("传送(出生点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 444234.687500f); + writefloat(yAxis, 450621.531250f); + writefloat(zAxis, 2228.036133f); +} + +// 温泉 +if (ImGui::Button("传送(温泉)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 417625.812500f); + writefloat(yAxis, 441305.406250f); + writefloat(zAxis, 1251.419312f); +} + +// 凛冬城 +if (ImGui::Button("传送(凛冬城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 367155.562500f); + writefloat(yAxis, 426480.156250f); + writefloat(zAxis, 2305.149658f); +} + +// 酿酒厂 +if (ImGui::Button("传送(酿酒厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 331639.062500f); + writefloat(yAxis, 480842.312500f); + writefloat(zAxis, 9294.484375f); +} + +// 海的对面是什么 +if (ImGui::Button("传送(海的对面是什么)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 204680.718750f); + writefloat(yAxis, 495332.343750f); + writefloat(zAxis, 1954.740234f); +} + +// 渔村 +if (ImGui::Button("传送(渔村)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 213220.781250f); + writefloat(yAxis, 493128.937500f); + writefloat(zAxis, 1733.497070f); +} + +// 庄园 +if (ImGui::Button("传送(庄园)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 283691.656250f); + writefloat(yAxis, 413977.625000f); + writefloat(zAxis, 4239.299805f); +} + +// 山田的屁眼 +if (ImGui::Button("传送(山田的屁眼)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 237480.453125f); + writefloat(yAxis, 387291.781250f); + writefloat(zAxis, 4725.486328f); +} + +// 恐龙乐园 +if (ImGui::Button("传送(恐龙乐园)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 229128.500000f); + writefloat(yAxis, 387376.843750f); + writefloat(zAxis, 1391.766724f); +} + +// 布格沃镇 +if (ImGui::Button("传送(布格沃镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 166727.062500f); + writefloat(yAxis, 368547.531250f); + writefloat(zAxis, 2200.355469f); +} + +// 希恩港 +if (ImGui::Button("传送(希恩港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 133604.984375f); + writefloat(yAxis, 370198.625000f); + writefloat(zAxis, 398.681427f); +} + +// 转身向大海走去 +if (ImGui::Button("传送(转身向大海走去)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 125797.625000f); + writefloat(yAxis, 371101.281250f); + writefloat(zAxis, 194.917557f); +} + +// 爱情小镇 +if (ImGui::Button("传送(爱情小镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 304944.531250f); + writefloat(yAxis, 354255.218750f); + writefloat(zAxis, 1312.154175f); +} + +// 城堡 +if (ImGui::Button("传送(城堡)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 356967.281250f); + writefloat(yAxis, 357662.031250f); + writefloat(zAxis, 3503.590820f); +} + +// 少萝聚集地 +if (ImGui::Button("传送(少萝聚集地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 432044.406250f); + writefloat(yAxis, 320365.093750f); + writefloat(zAxis, 11031.322266f); +} + +// 水泥厂 +if (ImGui::Button("传送(水泥厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 435116.218750f); + writefloat(yAxis, 322648.281250f); + writefloat(zAxis, 4654.393555f); +} + +// 豪宅(山田的家) +if (ImGui::Button("传送(豪宅(山田的家))", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 280915.562500f); + writefloat(yAxis, 305349.031250f); + writefloat(zAxis, 5424.918457f); +} + +// 航天基地 +if (ImGui::Button("传送(航天基地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 383908.000000f); + writefloat(yAxis, 160980.437500f); + writefloat(zAxis, 2866.648438f); +} + +// 适合拍段子 +if (ImGui::Button("传送(适合拍段子)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 378587.687500f); + writefloat(yAxis, 276477.375000f); + writefloat(zAxis, 1990.543823f); +} + +// 双桥镇 +if (ImGui::Button("传送(双桥镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 385680.187500f); + writefloat(yAxis, 268098.593750f); + writefloat(zAxis, 1005.961060f); +} + +// 滑雪场 +if (ImGui::Button("传送(滑雪场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 322912.156250f); + writefloat(yAxis, 236340.343750f); + writefloat(zAxis, 16273.750000f); +} + +// 冰湖镇 +if (ImGui::Button("传送(冰湖镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 246121.812500f); + writefloat(yAxis, 242173.812500f); + writefloat(zAxis, 8758.397461f); +} + +// 年兽刷新点 +if (ImGui::Button("传送(年兽刷新点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 238501.937500f); + writefloat(yAxis, 252487.562500f); + writefloat(zAxis, 7934.804688f); +} +// 钟塔港 +if (ImGui::Button("传送(钟塔港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 99854.039062f); + writefloat(yAxis, 235428.203125f); + writefloat(zAxis, 3029.992432f); +} + +// 拍段子 +if (ImGui::Button("传送(拍段子)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 182611.359375f); + writefloat(yAxis, 176897.843750f); + writefloat(zAxis, 8333.750977f); +} + +// 双池镇 +if (ImGui::Button("传送(双池镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 170370.218750f); + writefloat(yAxis, 180021.296875f); + writefloat(zAxis, 7043.150391f); +} + +// 煤矿厂 +if (ImGui::Button("传送(煤矿厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 304987.906250f); + writefloat(yAxis, 188512.156250f); + writefloat(zAxis, 8459.812500f); +} + +// 哈达农场 +if (ImGui::Button("传送(哈达农场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 481779.531250f); + writefloat(yAxis, 217483.140625f); + writefloat(zAxis, 9479.206055f); +} +// 亚力克港 +if (ImGui::Button("传送(亚力克港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 477181.937500f); + writefloat(yAxis, 124913.007812f); + writefloat(zAxis, 740.149963f); +} + +// 亚力克港塔顶 +if (ImGui::Button("传送(亚力克港塔顶)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 468057.531250f); + writefloat(yAxis, 111883.781250f); + writefloat(zAxis, 3942.716553f); +} + +// 扎鲁镇 +if (ImGui::Button("传送(扎鲁镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 278791.250000f); + writefloat(yAxis, 119994.882812f); + writefloat(zAxis, 2780.765869f); +} + +// 军港船上 +if (ImGui::Button("传送(军港船上)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 240158.500000f); + writefloat(yAxis, 97982.515625f); + writefloat(zAxis, 876.578247f); +} + +// 军港 +if (ImGui::Button("传送(军港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 239174.875000f); + writefloat(yAxis, 108477.289062f); + writefloat(zAxis, 801.193054f); +} + +// 防空洞空投点位 +if (ImGui::Button("传送(防空洞空投点位)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 420984.062500f); + writefloat(yAxis, 232054.312500f); + writefloat(zAxis, 4686.845703f); +} +} +if (ImGui::CollapsingHeader(T("坐标调试(雨林)","Coordinate Debugging(Rainforest)"))) { +// 出生点 +if (ImGui::Button("传送(出生点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 47933.152344f); + writefloat(yAxis, 203055.500000f); + writefloat(zAxis, 1214.230347f); +} + +// 一号营地 +if (ImGui::Button("传送(一号营地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 81213.710938f); + writefloat(yAxis, 164618.171875f); + writefloat(zAxis, 1081.396484f); +} + +// 河静 +if (ImGui::Button("传送(河静)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 129459.796875f); + writefloat(yAxis, 114099.648438f); + writefloat(zAxis, 1356.572632f); +} + +// 塔莫克 +if (ImGui::Button("传送(塔莫克)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 222462.328125f); + writefloat(yAxis, 94425.593750f); + writefloat(zAxis, 1011.927429f); +} + +// 克豪镇 +if (ImGui::Button("传送(克豪镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 238401.781250f); + writefloat(yAxis, 71919.906250f); + writefloat(zAxis, 495.524292f); +} + +// 椰树林 +if (ImGui::Button("传送(椰树林)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 318321.343750f); + writefloat(yAxis, 81768.539062f); + writefloat(zAxis, 1695.501343f); +} + +// 二号营地 +if (ImGui::Button("传送(二号营地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 343127.437500f); + writefloat(yAxis, 154418.093750f); + writefloat(zAxis, 1161.198486f); +} + +// 榕树林 +if (ImGui::Button("传送(榕树林)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 295310.250000f); + writefloat(yAxis, 197592.500000f); + writefloat(zAxis, 1393.576416f); +} + +// 拉卡维 +if (ImGui::Button("传送(拉卡维)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 347931.406250f); + writefloat(yAxis, 228151.468750f); + writefloat(zAxis, 782.318054f); +} + +// 坎邦 +if (ImGui::Button("传送(坎邦)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 339577.562500f); + writefloat(yAxis, 284831.593750f); + writefloat(zAxis, 434.349030f); +} + +// 码头 +if (ImGui::Button("传送(码头)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 331417.875000f); + writefloat(yAxis, 344303.375000f); + writefloat(zAxis, 183.458389f); +} + +// 三号营地 +if (ImGui::Button("传送(三号营地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 238447.875000f); + writefloat(yAxis, 342338.187500f); + writefloat(zAxis, 2238.786133f); +} + +// 洞穴 +if (ImGui::Button("传送(洞穴)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 264012.375000f); + writefloat(yAxis, 304849.250000f); + writefloat(zAxis, 231.546555f); +} + +// 采石扬 +if (ImGui::Button("传送(采石扬)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 269806.468750f); + writefloat(yAxis, 252563.875000f); + writefloat(zAxis, 297.965454f); +} + +// 派南 +if (ImGui::Button("传送(派南)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 191960.484375f); + writefloat(yAxis, 270702.593750f); + writefloat(zAxis, 183.122650f); +} + +// 祭坛 +if (ImGui::Button("传送(祭坛)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 122015.531250f); + writefloat(yAxis, 262666.406250f); + writefloat(zAxis, 333.574371f); +} + +// 塔姆帮 +if (ImGui::Button("传送(塔姆帮)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 88811.132812f); + writefloat(yAxis, 290258.812500f); + writefloat(zAxis, 5540.849121f); +} + +// 莎米 +if (ImGui::Button("传送(莎米)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 143384.312500f); + writefloat(yAxis, 355166.281250f); + writefloat(zAxis, 1144.252441f); +} + +// 训练基地 +if (ImGui::Button("传送(训练基地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 198669.109375f); + writefloat(yAxis, 195734.265625f); + writefloat(zAxis, 1015.807190f); +} + +// 天堂度假村 +if (ImGui::Button("传送(天堂度假村)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 245644.109375f); + writefloat(yAxis, 137689.640625f); + writefloat(zAxis, 4063.525391f); +} + +} +if (ImGui::CollapsingHeader(T("坐标调试(沙漠)","Coordinate Debugging(desert)"))) { +// 出生点 +if (ImGui::Button("传送(出生点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 82693.500000f); + writefloat(yAxis, 727817.312500f); + writefloat(zAxis, 5108.150391f); +} + +// 火车站 +if (ImGui::Button("传送(火车站)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 250829.281250f); + writefloat(yAxis, 125060.984375f); + writefloat(zAxis, 4803.459961f); +} + +// 农场 +if (ImGui::Button("传送(农场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 265549.093750f); + writefloat(yAxis, 212961.234375f); + writefloat(zAxis, 10129.885742f); +} + +// 伊波城 +if (ImGui::Button("传送(伊波城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 157739.468750f); + writefloat(yAxis, 284963.687500f); + writefloat(zAxis, 9262.229492f); +} + +// 新山城 +if (ImGui::Button("传送(新山城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 210217.046875f); + writefloat(yAxis, 408802.250000f); + writefloat(zAxis, 6412.083496f); +} + +// 砖厂 +if (ImGui::Button("传送(砖厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 180600.828125f); + writefloat(yAxis, 488169.281250f); + writefloat(zAxis, 7963.916504f); +} + +// 老工业区 +if (ImGui::Button("传送(老工业区)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 278593.781250f); + writefloat(yAxis, 521418.718750f); + writefloat(zAxis, 11530.205078f); +} + +// 小矿山 +if (ImGui::Button("传送(小矿山)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 224198.546875f); + writefloat(yAxis, 595435.437500f); + writefloat(zAxis, 17425.300781f); +} + +// 滨海小镇 +if (ImGui::Button("传送(滨海小镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 163307.296875f); + writefloat(yAxis, 598872.812500f); + writefloat(zAxis, 644.678223f); +} + +// 监狱 +if (ImGui::Button("传送(监狱)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 85706.671875f); + writefloat(yAxis, 726345.812500f); + writefloat(zAxis, 5103.527832f); +} + +// 无花果镇 +if (ImGui::Button("传送(无花果镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 249517.125000f); + writefloat(yAxis, 727779.125000f); + writefloat(zAxis, -881.343872f); +} + +// 普罗港 +if (ImGui::Button("传送(普罗港)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 629424.125000f); + writefloat(yAxis, 633068.125000f); + writefloat(zAxis, -1090.296753f); +} + +// 海的对面是什么 +if (ImGui::Button("传送(海的对面是什么)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 633679.437500f); + writefloat(yAxis, 648287.937500f); + writefloat(zAxis, -1392.145264f); +} + +// 黑斑羚镇 +if (ImGui::Button("传送(黑斑羚镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 639227.687500f); + writefloat(yAxis, 464329.468750f); + writefloat(zAxis, 8270.783203f); +} + +// 幸福村(牢大坠机点) +if (ImGui::Button("传送(幸福村(牢大坠机点))", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 503167.531250f); + writefloat(yAxis, 426698.843750f); + writefloat(zAxis, 9011.178711f); +} + +// 大矿山 +if (ImGui::Button("传送(大矿山)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 508462.812500f); + writefloat(yAxis, 372246.750000f); + writefloat(zAxis, 9718.271484f); +} + +// 墓地 +if (ImGui::Button("传送(墓地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 452717.562500f); + writefloat(yAxis, 373656.781250f); + writefloat(zAxis, 5974.846680f); +} + +// 皮卡多 +if (ImGui::Button("传送(皮卡多)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 365469.500000f); + writefloat(yAxis, 423210.125000f); + writefloat(zAxis, 5539.034180f); +} + +// 狮城 +if (ImGui::Button("传送(狮城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 483862.468750f); + writefloat(yAxis, 533514.062500f); + writefloat(zAxis, 19780.271484f); +} + +// 电站 +if (ImGui::Button("传送(电站)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 317204.375000f); + writefloat(yAxis, 358664.875000f); + writefloat(zAxis, 13736.246094f); +} + +// 圣马丁 +if (ImGui::Button("传送(圣马丁)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 392256.156250f); + writefloat(yAxis, 297388.125000f); + writefloat(zAxis, 7139.406738f); +} + +// 别墅区(山田的家) +if (ImGui::Button("传送(别墅区(山田的家))", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 440596.687500f); + writefloat(yAxis, 278615.875000f); + writefloat(zAxis, 5062.807617f); +} + +// 水厂 +if (ImGui::Button("传送(水厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 430199.625000f); + writefloat(yAxis, 191261.796875f); + writefloat(zAxis, 5709.166992f); +} + +// 断城 +if (ImGui::Button("传送(断城)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 557123.062500f); + writefloat(yAxis, 156040.750000f); + writefloat(zAxis, 7089.334961f); +} +// 提波镇 +if (ImGui::Button("传送(提波镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 666332.187500f); + writefloat(yAxis, 134728.312500f); + writefloat(zAxis, 4349.668457f); +} + +// 军事基地 +if (ImGui::Button("传送(军事基地)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 696588.312500f); + writefloat(yAxis, 42568.285156f); + writefloat(zAxis, 6451.878418f); +} + +// 火电厂 +if (ImGui::Button("传送(火电厂)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 544747.437500f); + writefloat(yAxis, 41807.656250f); + writefloat(zAxis, 7636.512695f); +} + +// 橙花镇 +if (ImGui::Button("传送(橙花镇)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 643050.687500f); + writefloat(yAxis, 246525.796875f); + writefloat(zAxis, 5782.760254f); +} + +// 垃圾站 +if (ImGui::Button("传送(垃圾站)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 586121.625000f); + writefloat(yAxis, 334391.218750f); + writefloat(zAxis, 10626.436523f); +} +// 拖车场 +if (ImGui::Button("传送(拖车场)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 88043.117188f); + writefloat(yAxis, 186304.250000f); + writefloat(zAxis, 11528.625000f); +} + +// 废墟 +if (ImGui::Button("传送(废墟)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 20803.363281f); + writefloat(yAxis, 131696.437500f); + writefloat(zAxis, 16926.419922f); +} +} +if (ImGui::CollapsingHeader(T("坐标调试(训练场)","Coordinate Debugging(training ground)"))) { +// 出生点 +if (ImGui::Button("传送(出生点)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 46285.628906f); + writefloat(yAxis, 160711.875000f); + writefloat(zAxis, 727.156128f); +} + +// 标耙小岛 +if (ImGui::Button("传送(标耙小岛)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 28483.691406f); + writefloat(yAxis, 156624.875000f); + writefloat(zAxis, -110.156754f); +} + +// 集装箱顶上 +if (ImGui::Button("传送(集装箱顶上)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 43020.757812f); + writefloat(yAxis, 183850.796875f); + writefloat(zAxis, 3240.651855f); +} + +// 车库 +if (ImGui::Button("传送(车库)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 36884.968750f); + writefloat(yAxis, 169209.125000f); + writefloat(zAxis, 96.183075f); +} + +// 加油站 +if (ImGui::Button("传送(加油站)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 21748.804688f); + writefloat(yAxis, 166414.078125f); + writefloat(zAxis, 102.662201f); +} + +// 大桥上 +if (ImGui::Button("传送(大桥上)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 25628.134766f); + writefloat(yAxis, 193167.359375f); + writefloat(zAxis, 3091.817139f); +} + +// 海边 +if (ImGui::Button("传送(海边)", ImVec2(-1, 60))) { + long xAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x150; + long yAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x154; + long zAxis = getPointer(getPointer(getPointer(getPointer(UE4 + 0x4634ef0) + 0x20) + 0x139c) + 0x130) + 0x158; + writefloat(xAxis, 39275.957031f); + writefloat(yAxis, 161431.421875f); + writefloat(zAxis, -469.822662f); +} + +} +ImGui::EndTabItem(); +} +if(物资调试){ + if(提示){ + ImGui::Text(T("您当前不是服务端无法使用部分功能", "You are not currently a server and\ncannot use some functions")); + } +if(物资功能){ +ImGui::Text(T("您当前是服务端,注意:点一键刷物资后\n请等两三秒再点其他的\n不然服务端原地炸膛", "You are currently a server. Note: After clicking 'Spawn All Items',\nplease wait 2-3 seconds before clicking other buttons,\notherwise the server may crash")); + + + + + + +if (ImGui::CollapsingHeader(T("自定义", "Custom"))) + { + + + ImGui::Text(T("请在后台将物品ID复制至剪贴板\n并选择合适的数量", "Please copy item ID to clipboard in background\nand select appropriate quantity"), 1000.0f / ImGui::GetIO().Framerate); + + + + ImGui::PushItemWidth(-1); + ImGui::InputText("##keys", s, sizeof s); + // auto paste + auto keys = getClipboardTextt(); + strncpy(s, keys.c_str(), sizeof s); + // auto login + ImGui::PopItemWidth(); + char buffer4[256]; +strncpy(buffer4,inputText4.c_str(),sizeof(buffer4)-1); +buffer4[sizeof(buffer4)-1]='\0'; +ImGui::InputText(T("物品数量", "Item Quantity"),buffer4,sizeof(buffer4)); +if(ImGui::IsItemFocused()){ +activeEditBoxIndex=3; +} +inputText4=buffer4; + if (ImGui::Button(T("自定义刷(自动判断)", "Custom Spawn (Auto Detect)"), ImVec2(-1,40))){ + + int 物品ID=std::stoi(keys); +int 物品类型=getItemType(物品ID); +int 物品数量=std::stoi(inputText4); +if(物品ID!=0&&物品类型!=0&&物品数量!=0){ +SpawnItem(物品ID,物品类型,物品数量); +} + + } + + if(ImGui::Button(T("显示键盘", "Show Keyboard"))){ +showVirtualKeyboard=true; +} + +if(showVirtualKeyboard){ +RenderVirtualKeyboard(); +} + + } + +if (ImGui::CollapsingHeader(T("武器", "Weapons"))){ +if (ImGui::Button(T("一键刷新枪械", "Spawn All Weapons"), ImVec2(-1,40))) { SpawnAllWeapons(); } + if (ImGui::Button(T("AKM突击步枪", "AKM Assault Rifle"), ImVec2(-1,40))) { AKM(); } + if (ImGui::Button(T("M416突击步枪", "M416 Assault Rifle"), ImVec2(-1,40))) { M416(); } + if (ImGui::Button(T("AWM狙击枪", "AWM Sniper Rifle"), ImVec2(-1,40))) { AWM(); } + if (ImGui::Button(T("M16A4突击步枪", "M16A4 Assault Rifle"), ImVec2(-1,40))) { M16A4(); } + if (ImGui::Button(T("GROZA突击步枪", "GROZA Assault Rifle"), ImVec2(-1,40))) { GROZA(); } + if (ImGui::Button(T("SCAR-L突击步枪", "SCAR-L Assault Rifle"), ImVec2(-1,40))) { SCARL(); } + if (ImGui::Button(T("AUG突击步枪", "AUG Assault Rifle"), ImVec2(-1,40))) { AUG(); } + if (ImGui::Button(T("QBZ突击步枪", "QBZ Assault Rifle"), ImVec2(-1,40))) { QBZ(); } + if (ImGui::Button(T("M762突击步枪", "M762 Assault Rifle"), ImVec2(-1,40))) { M762(); } + if (ImGui::Button(T("MK47突击步枪", "MK47 Assault Rifle"), ImVec2(-1,40))) { MK47(); } + if (ImGui::Button(T("G36C突击步枪", "G36C Assault Rifle"), ImVec2(-1,40))) { G36C(); } + if (ImGui::Button(T("UZI冲锋枪", "UZI SMG"), ImVec2(-1,40))) { UZI(); } + if (ImGui::Button(T("UMP9冲锋枪", "UMP9 SMG"), ImVec2(-1,40))) { UMP9(); } + if (ImGui::Button(T("Vector冲锋枪", "Vector SMG"), ImVec2(-1,40))) { Vector(); } + if (ImGui::Button(T("汤姆逊冲锋枪", "Thompson SMG"), ImVec2(-1,40))) { Thompson(); } + if (ImGui::Button(T("PP-19冲锋枪", "PP-19 SMG"), ImVec2(-1,40))) { PP19(); } + if (ImGui::Button(T("Kar98K狙击枪", "Kar98K Sniper Rifle"), ImVec2(-1,40))) { Kar98K(); } + if (ImGui::Button(T("M24狙击枪", "M24 Sniper Rifle"), ImVec2(-1,40))) { M24(); } + if (ImGui::Button(T("SKS射手步枪", "SKS Marksman Rifle"), ImVec2(-1,40))) { SKS(); } + if (ImGui::Button(T("VSS射手步枪", "VSS Marksman Rifle"), ImVec2(-1,40))) { VSS(); } + if (ImGui::Button(T("Mini14射手步枪", "Mini14 Marksman Rifle"), ImVec2(-1,40))) { Mini14(); } + if (ImGui::Button(T("Mk14射手步枪", "Mk14 Marksman Rifle"), ImVec2(-1,40))) { Mk14(); } + if (ImGui::Button(T("Win94狙击枪", "Win94 Sniper Rifle"), ImVec2(-1,40))) { Win94(); } + if (ImGui::Button(T("SLR射手步枪", "SLR Marksman Rifle"), ImVec2(-1,40))) { SLR(); } + if (ImGui::Button(T("QBU射手步枪", "QBU Marksman Rifle"), ImVec2(-1,40))) { QBU(); } + if (ImGui::Button(T("S686散弹枪", "S686 Shotgun"), ImVec2(-1,40))) { S686(); } + if (ImGui::Button(T("S1897散弹枪", "S1897 Shotgun"), ImVec2(-1,40))) { S1897(); } + if (ImGui::Button(T("S12K散弹枪", "S12K Shotgun"), ImVec2(-1,40))) { S12K(); } + if (ImGui::Button(T("M249轻机枪", "M249 LMG"), ImVec2(-1,40))) { M249(); } + if (ImGui::Button(T("DP-28轻机枪", "DP-28 LMG"), ImVec2(-1,40))) { DP28(); } + if (ImGui::Button(T("P92手枪", "P92 Pistol"), ImVec2(-1,40))) { P92(); } + if (ImGui::Button(T("P1911手枪", "P1911 Pistol"), ImVec2(-1,40))) { P1911(); } + if (ImGui::Button(T("R1895手枪", "R1895 Pistol"), ImVec2(-1,40))) { R1895(); } + if (ImGui::Button(T("P18C手枪", "P18C Pistol"), ImVec2(-1,40))) { P18C(); } + if (ImGui::Button(T("R45手枪", "R45 Pistol"), ImVec2(-1,40))) { R45(); } + if (ImGui::Button(T("短管散弹枪", "Sawed-Off Shotgun"), ImVec2(-1,40))) { SawedOff(); } + if (ImGui::Button(T("信号枪", "Signal Gun"), ImVec2(-1,40))) { SignalGun(); } + if (ImGui::Button(T("蝎式手枪", "Scorpion Pistol"), ImVec2(-1,40))) { Scorpion(); } + if (ImGui::Button(T("吃鸡礼花枪", "Chicken Firework Gun"), ImVec2(-1,40))) { ChickenFirework(); } + if (ImGui::Button(T("元宵节礼花枪", "Lantern Firework Gun"), ImVec2(-1,40))) { LanternFirework(); } + if (ImGui::Button(T("年兽信号枪", "Year Beast Signal Gun"), ImVec2(-1,40))) { BeastSignal(); } + if (ImGui::Button(T("圣诞信号枪", "Christmas Signal Gun"), ImVec2(-1,40))) { ChristmasSignal(); } + if (ImGui::Button(T("新年礼花枪", "New Year Firework Gun"), ImVec2(-1,40))) { NewYearFirework(); } + if (ImGui::Button(T("十字弩", "Crossbow"), ImVec2(-1,40))) { Crossbow(); } + if (ImGui::Button(T("防爆盾", "Riot Shield"), ImVec2(-1,40))) { RiotShield(); } + if (ImGui::Button(T("大砍刀", "Machete"), ImVec2(-1,40))) { Machete(); } + if (ImGui::Button(T("撬棍", "Crowbar"), ImVec2(-1,40))) { Crowbar(); } + if (ImGui::Button(T("镰刀", "Sickle"), ImVec2(-1,40))) { Sickle(); } + if (ImGui::Button(T("平底锅", "Pan"), ImVec2(-1,40))) { Pan(); } +} +if (ImGui::CollapsingHeader(T("枪皮", "Weapon Skins"))){ + // 一键刷新所有皮肤武器按钮 + if (ImGui::Button(T("一键刷新枪皮", "Spawn All Skin Weapons"), ImVec2(-1,40))) { SpawnAllSkinWeapons(); } + + + + if (ImGui::Button(T("AKM-赤橙", "AKM - Orange"), ImVec2(-1,40))) { AKM_Chicheng(); } + if (ImGui::Button(T("AKM-荣耀", "AKM - Glory"), ImVec2(-1,40))) { AKM_Rongyao(); } + if (ImGui::Button(T("AKM-乌木金纹", "AKM - Ebony Gold"), ImVec2(-1,40))) { AKM_Wumujinwen(); } + if (ImGui::Button(T("AKM-血誓", "AKM - Blood Oath"), ImVec2(-1,40))) { AKM_Xueshi(); } + if (ImGui::Button(T("AKM-狂怒", "AKM - Fury"), ImVec2(-1,40))) { AKM_Kuangnu(); } + + if (ImGui::Button(T("M16A4-鲨齿", "M16A4 - Shark Tooth"), ImVec2(-1,40))) { M16A4_Shachi(); } + if (ImGui::Button(T("M16A4-青耀", "M16A4 - Blue Shine"), ImVec2(-1,40))) { M16A4_Qingyao(); } + if (ImGui::Button(T("M16A4-乌木金纹", "M16A4 - Ebony Gold"), ImVec2(-1,40))) { M16A4_Wumujinwen(); } + if (ImGui::Button(T("M16A4-皇室", "M16A4 - Royal"), ImVec2(-1,40))) { M16A4_Huangshi(); } + if (ImGui::Button(T("M16A4-野战英豪", "M16A4 - Field Hero"), ImVec2(-1,40))) { M16A4_Yezhanyinghao(); } + if (ImGui::Button(T("M16A4-狂怒", "M16A4 - Fury"), ImVec2(-1,40))) { M16A4_Kuangnu(); } + + if (ImGui::Button(T("SCAR-L-狂怒", "SCAR-L - Fury"), ImVec2(-1,40))) { SCARL_Kuangnu(); } + if (ImGui::Button(T("SCAR-L-乌木金纹", "SCAR-L - Ebony Gold"), ImVec2(-1,40))) { SCARL_Wumujinwen(); } + if (ImGui::Button(T("SCAR-L-赤橙", "SCAR-L - Orange"), ImVec2(-1,40))) { SCARL_Chicheng(); } + if (ImGui::Button(T("SCAR-L-血誓", "SCAR-L - Blood Oath"), ImVec2(-1,40))) { SCARL_Xueshi(); } + + + if (ImGui::Button(T("M416-火箭少女101", "M416 - Rocket Girls 101"), ImVec2(-1,40))) { M416_RocketGirl(); } + if (ImGui::Button(T("M416-乌木金纹", "M416 - Ebony Gold"), ImVec2(-1,40))) { M416_Wumujinwen(); } + if (ImGui::Button(T("M416-蝰蛇", "M416 - Viper"), ImVec2(-1,40))) { M416_Kuishe(); } + if (ImGui::Button(T("M416-涂鸦艺术", "M416 - Graffiti Art"), ImVec2(-1,40))) { M416_Tuya(); } + if (ImGui::Button(T("M416-沙漠风暴", "M416 - Desert Storm"), ImVec2(-1,40))) { M416_Shamofengbao(); } + if (ImGui::Button(T("M416-雪域迷彩", "M416 - Snow Camo"), ImVec2(-1,40))) { M416_Xueyumicai(); } + if (ImGui::Button(T("M416-血誓", "M416 - Blood Oath"), ImVec2(-1,40))) { M416_Xueshi(); } + if (ImGui::Button(T("M416-赤橙", "M416 - Orange"), ImVec2(-1,40))) { M416_Chicheng(); } + if (ImGui::Button(T("M416-迎春赐吉", "M416 - Spring Blessing"), ImVec2(-1,40))) { M416_Spring(); } + + if (ImGui::Button(T("GROZA-狂怒", "GROZA - Fury"), ImVec2(-1,40))) { GROZA_Kuangnu(); } + + if (ImGui::Button(T("AUG-血誓", "AUG - Blood Oath"), ImVec2(-1,40))) { AUG_Xueshi(); } + + if (ImGui::Button(T("UZI-狂怒", "UZI - Fury"), ImVec2(-1,40))) { UZI_Kuangnu(); } + + + + if (ImGui::Button(T("Kar98K-青耀", "Kar98K - Blue Shine"), ImVec2(-1,40))) { Kar98K_Qingyao(); } + if (ImGui::Button(T("Kar98K-乌木金纹", "Kar98K - Ebony Gold"), ImVec2(-1,40))) { Kar98K_Wumujinwen(); } + if (ImGui::Button(T("Kar98K-灼热熔岩", "Kar98K - Molten Lava"), ImVec2(-1,40))) { Kar98K_FireLava(); } + if (ImGui::Button(T("Kar98K-血誓", "Kar98K - Blood Oath"), ImVec2(-1,40))) { Kar98K_Xueshi(); } + if (ImGui::Button(T("Kar98K-迎春赐吉", "Kar98K - Spring Blessing"), ImVec2(-1,40))) { Kar98K_Spring(); } + + if (ImGui::Button(T("AWM-幻彩", "AWM - Rainbow"), ImVec2(-1,40))) { AWM_Rainbow(); } + + if (ImGui::Button(T("撬棍-绯红前夜", "Crowbar - Crimson Eve"), ImVec2(-1,40))) { Crowbar_RedNight(); } + + + if (ImGui::Button(T("平底锅-双黄蛋", "Pan - Double Yolk"), ImVec2(-1,40))) { Pan_DoubleYolk(); } + if (ImGui::Button(T("平底锅-幸存者", "Pan - Survivor"), ImVec2(-1,40))) { Pan_Survivor(); } + if (ImGui::Button(T("平底锅-禁猎区", "Pan - No Hunting Zone"), ImVec2(-1,40))) { Pan_NoHunt(); } + if (ImGui::Button(T("平底锅-烂番茄", "Pan - Rotten Tomato"), ImVec2(-1,40))) { Pan_RottenTomato(); } + if (ImGui::Button(T("平底锅-一路向前", "Pan - Forward"), ImVec2(-1,40))) { Pan_Forward(); } + if (ImGui::Button(T("平底锅-绯红前夜", "Pan - Crimson Eve"), ImVec2(-1,40))) { Pan_RedNight(); } +} +if (ImGui::CollapsingHeader(T("子弹", "Ammo"))){ + if (ImGui::Button(T("一键刷新子弹", "Spawn All Ammo"), ImVec2(-1,40))) { SpawnAllAmmo(); } + if (ImGui::Button(T("7.62 mm子弹", "7.62 mm Ammo"), ImVec2(-1,40))) { Bullet762(); } + if (ImGui::Button(T("5.56 mm子弹", "5.56 mm Ammo"), ImVec2(-1,40))) { Bullet556(); } + if (ImGui::Button(T("12口径散弹", "12 Gauge Shells"), ImVec2(-1,40))) { ShotgunShell(); } + if (ImGui::Button(T("0.45口径子弹", ".45 ACP Ammo"), ImVec2(-1,40))) { Bullet45(); } + if (ImGui::Button(T(".300马格南子弹", ".300 Magnum Ammo"), ImVec2(-1,40))) { Magnum(); } + if (ImGui::Button(T("信号弹", "Signal Flare"), ImVec2(-1,40))) { SignalFlare(); } + if (ImGui::Button(T("弩箭", "Arrow"), ImVec2(-1,40))) { Arrow(); } + if (ImGui::Button(T("烟花弹", "Firework Shell"), ImVec2(-1,40))) { FireworkShell(); } + if (ImGui::Button(T("年兽诱饵弹", "Year Beast Bait"), ImVec2(-1,40))) { BeastBait(); } +} + +if (ImGui::CollapsingHeader(T("瞄准镜/配件", "Scopes/Attachments"))){ + if (ImGui::Button(T("一键刷新配件", "Spawn All Attachments"), ImVec2(-1,40))) { SpawnAllAttachments(); } + if (ImGui::Button(T("霰弹枪收束器", "Shotgun Choke"), ImVec2(-1,40))) { Choke(); } + if (ImGui::Button(T("枪口补偿器(冲锋枪)", "SMG Compensator"), ImVec2(-1,40))) { SMGCompensator(); } + if (ImGui::Button(T("枪口补偿器(狙击枪)", "Sniper Compensator"), ImVec2(-1,40))) { SniperCompensator(); } + if (ImGui::Button(T("消焰器(冲锋枪)", "SMG Flash Hider"), ImVec2(-1,40))) { SMGFlashHider(); } + if (ImGui::Button(T("消焰器(狙击枪)", "Sniper Flash Hider"), ImVec2(-1,40))) { SniperFlashHider(); } + if (ImGui::Button(T("消音器(冲锋枪)", "SMG Silencer"), ImVec2(-1,40))) { SMGSilencer(); } + if (ImGui::Button(T("消音器(狙击枪)", "Sniper Silencer"), ImVec2(-1,40))) { SniperSilencer(); } + if (ImGui::Button(T("消音器(手枪)", "Pistol Silencer"), ImVec2(-1,40))) { PistolSilencer(); } + if (ImGui::Button(T("枪口补偿器(步枪)", "Rifle Compensator"), ImVec2(-1,40))) { RifleCompensator(); } + if (ImGui::Button(T("消焰器(步枪)", "Rifle Flash Hider"), ImVec2(-1,40))) { RifleFlashHider(); } + if (ImGui::Button(T("消音器(步枪)", "Rifle Silencer"), ImVec2(-1,40))) { RifleSilencer(); } + if (ImGui::Button(T("鸭嘴枪口(霰弹枪)", "Shotgun Duckbill"), ImVec2(-1,40))) { Duckbill(); } + if (ImGui::Button(T("直角前握把", "Angled Grip"), ImVec2(-1,40))) { AngledGrip(); } + if (ImGui::Button(T("垂直握把", "Vertical Grip"), ImVec2(-1,40))) { VerticalGrip(); } + if (ImGui::Button(T("轻型握把", "Light Grip"), ImVec2(-1,40))) { LightGrip(); } + if (ImGui::Button(T("半截式握把", "Half Grip"), ImVec2(-1,40))) { HalfGrip(); } + if (ImGui::Button(T("拇指握把", "Thumb Grip"), ImVec2(-1,40))) { ThumbGrip(); } + if (ImGui::Button(T("激光瞄准器", "Laser Sight"), ImVec2(-1,40))) { LaserSight(); } + if (ImGui::Button(T("红点瞄准镜", "Red Dot Sight"), ImVec2(-1,40))) { RedDot(); } + if (ImGui::Button(T("全息瞄准镜", "Holographic Sight"), ImVec2(-1,40))) { Holographic(); } + if (ImGui::Button(T("2倍 瞄准镜", "2x Scope"), ImVec2(-1,40))) { Scope2x(); } + if (ImGui::Button(T("4倍 瞄准镜", "4x Scope"), ImVec2(-1,40))) { Scope4x(); } + if (ImGui::Button(T("8倍 瞄准镜", "8x Scope"), ImVec2(-1,40))) { Scope8x(); } + if (ImGui::Button(T("侧边瞄准镜", "Canted Sight"), ImVec2(-1,40))) { CantedSight(); } + if (ImGui::Button(T("扩容弹匣(手枪)", "Pistol Extended Mag"), ImVec2(-1,40))) { PistolExtMag(); } + if (ImGui::Button(T("快速弹匣(手枪)", "Pistol Quickdraw Mag"), ImVec2(-1,40))) { PistolQuickMag(); } + if (ImGui::Button(T("快速扩容弹匣(手枪)", "Pistol Quickdraw Extended Mag"), ImVec2(-1,40))) { PistolQuickExtMag(); } + if (ImGui::Button(T("扩容弹匣(冲锋枪)", "SMG Extended Mag"), ImVec2(-1,40))) { SMGExtMag(); } + if (ImGui::Button(T("快速弹匣(冲锋枪)", "SMG Quickdraw Mag"), ImVec2(-1,40))) { SMGQuickMag(); } + if (ImGui::Button(T("快速扩容弹匣(冲锋枪)", "SMG Quickdraw Extended Mag"), ImVec2(-1,40))) { SMGQuickExtMag(); } + if (ImGui::Button(T("扩容弹匣(狙击枪)", "Sniper Extended Mag"), ImVec2(-1,40))) { SniperExtMag(); } + if (ImGui::Button(T("快速弹匣(狙击枪)", "Sniper Quickdraw Mag"), ImVec2(-1,40))) { SniperQuickMag(); } + if (ImGui::Button(T("快速扩容弹匣(狙击枪)", "Sniper Quickdraw Extended Mag"), ImVec2(-1,40))) { SniperQuickExtMag(); } + if (ImGui::Button(T("子弹袋(散弹枪)", "Shotgun Bullet Loops"), ImVec2(-1,40))) { ShotgunBulletLoops(); } + if (ImGui::Button(T("扩容弹匣(步枪)", "Rifle Extended Mag"), ImVec2(-1,40))) { RifleExtMag(); } + if (ImGui::Button(T("快速弹匣(步枪)", "Rifle Quickdraw Mag"), ImVec2(-1,40))) { RifleQuickMag(); } + if (ImGui::Button(T("快速扩容弹匣(步枪)", "Rifle Quickdraw Extended Mag"), ImVec2(-1,40))) { RifleQuickExtMag(); } + if (ImGui::Button(T("子弹袋(Kar98K,Win94)", "Kar98k/Win94 Bullet Loops"), ImVec2(-1,40))) { Kar98kLoops(); } + if (ImGui::Button(T("枪托(Micro UZI)", "UZI Stock"), ImVec2(-1,40))) { UziStock(); } + if (ImGui::Button(T("战术枪托(M416,Vector)", "Tactical Stock"), ImVec2(-1,40))) { TacticalStock(); } + if (ImGui::Button(T("托腮板(狙击枪)", "Sniper Cheek Pad"), ImVec2(-1,40))) { CheekPad(); } + if (ImGui::Button(T("箭袋(十字弩)", "Crossbow Quiver"), ImVec2(-1,40))) { Quiver(); } +} + +if (ImGui::CollapsingHeader(T("装备", "Gear"))){ + if (ImGui::Button(T("一键刷新装备", "Spawn All Gear"), ImVec2(-1,40))) { SpawnAllGear(); } + if (ImGui::Button(T("夜视仪", "Night Vision Goggles"), ImVec2(-1,40))) { 夜视仪(); } + if (ImGui::Button(T("特种部队头盔(3级)", "Special Forces Helmet (Lv3)"), ImVec2(-1,40))) { HelmetLv3(); } + if (ImGui::Button(T("军用防弹衣(3级)", "Military Vest (Lv3)"), ImVec2(-1,40))) { VestLv3(); } + if (ImGui::Button(T("背包(3级)", "Backpack (Lv3)"), ImVec2(-1,40))) { BackpackLv3(); } + if (ImGui::Button(T("摩托车头盔(1级)", "Motorcycle Helmet (Lv1)"), ImVec2(-1,40))) { HelmetLv1(); } + if (ImGui::Button(T("警用防弹衣(1级)", "Police Vest (Lv1)"), ImVec2(-1,40))) { VestLv1(); } + if (ImGui::Button(T("背包(1级)", "Backpack (Lv1)"), ImVec2(-1,40))) { BackpackLv1(); } + if (ImGui::Button(T("军用头盔(2级)", "Military Helmet (Lv2)"), ImVec2(-1,40))) { HelmetLv2(); } + if (ImGui::Button(T("警用防弹衣(2级)", "Police Vest (Lv2)"), ImVec2(-1,40))) { VestLv2(); } + if (ImGui::Button(T("背包(2级)", "Backpack (Lv2)"), ImVec2(-1,40))) { BackpackLv2(); } + if (ImGui::Button(T("圣诞头盔(3级)", "Christmas Helmet (Lv3)"), ImVec2(-1,40))) { ChristmasHelmet(); } + if (ImGui::Button(T("年兽头盔(3级)", "Year Beast Helmet (Lv3)"), ImVec2(-1,40))) { BeastHelmet(); } +} +if (ImGui::CollapsingHeader(T("衣服", "Clothing"))) + { + if (ImGui::Button(T("一键刷新衣服", "Spawn All Clothing"), ImVec2(-1,40))) { 一键生成衣服(); } + if (ImGui::Button(T("雪地吉利服", "Snow Ghillie Suit"), ImVec2(-1,40))) { 雪地吉利服(); } +if (ImGui::Button(T("晶翼女神套装", "Crystal Wing Goddess Suit"), ImVec2(-1,40))) { 晶翼女神套装(); } +if (ImGui::Button(T("黑曜金尊套装", "Obsidian Golden Suit"), ImVec2(-1,40))) { 黑曜金尊套装(); } +if (ImGui::Button(T("火箭少女101", "Rocket Girls 101"), ImVec2(-1,40))) { 火箭少女101(); } +if (ImGui::Button(T("至尊金龙外套", "Supreme Golden Dragon Coat"), ImVec2(-1,40))) { 至尊金龙外套(); } +if (ImGui::Button(T("S1战斗裤", "Season 1 Combat Pants"), ImVec2(-1,40))) { S1战斗裤(); } +if (ImGui::Button(T("S1战斗外套", "Season 1 Combat Jacket"), ImVec2(-1,40))) { S1战斗外套(); } +if (ImGui::Button(T("小黄衣", "Yellow Jacket"), ImVec2(-1,40))) { 小黄衣(); } +if (ImGui::Button(T("小黄裤", "Yellow Pants"), ImVec2(-1,40))) { 小黄裤(); } +if (ImGui::Button(T("黑色连帽大衣", "Black Hooded Coat"), ImVec2(-1,40))) { 黑色连帽大衣(); } +if (ImGui::Button(T("西部牛仔面罩", "Western Cowboy Mask"), ImVec2(-1,40))) { 西部牛仔面罩(); } +if (ImGui::Button(T("黑色rock", "Black Rock"), ImVec2(-1,40))) { 黑色rock(); } +if (ImGui::Button(T("青色面罩", "Cyan Mask"), ImVec2(-1,40))) { 青色面罩(); } +if (ImGui::Button(T("师傅专用外套", "Master's Exclusive Jacket"), ImVec2(-1,40))) { 师傅专用外套(); } +if (ImGui::Button(T("时尚圣诞套装", "Fashion Christmas Suit"), ImVec2(-1,40))) { 时尚圣诞套装(); } +if (ImGui::Button(T("卡路里套装", "Calorie Suit"), ImVec2(-1,40))) { 卡路里套装(); } + +} +if (ImGui::CollapsingHeader(T("动作", "Emotes"))) + { +if (ImGui::Button(T("你好", "Hello"), ImVec2(-1,40))) { 你好(); } +if (ImGui::Button(T("感谢", "Thanks"), ImVec2(-1,40))) { 感谢(); } +if (ImGui::Button(T("鼓掌", "Applause"), ImVec2(-1,40))) { 鼓掌(); } +if (ImGui::Button(T("大笑", "Laugh"), ImVec2(-1,40))) { 大笑(); } +if (ImGui::Button(T("来这里", "Come Here"), ImVec2(-1,40))) { 来这里(); } +if (ImGui::Button(T("走", "Go"), ImVec2(-1,40))) { 走(); } +if (ImGui::Button(T("否定", "Negative"), ImVec2(-1,40))) { 否定(); } +if (ImGui::Button(T("肯定", "Positive"), ImVec2(-1,40))) { 肯定(); } +if (ImGui::Button(T("投降", "Surrender"), ImVec2(-1,40))) { 投降(); } +if (ImGui::Button(T("愤怒", "Anger"), ImVec2(-1,40))) { 愤怒(); } +if (ImGui::Button(T("摇摆舞", "Swing Dance"), ImVec2(-1,40))) { 摇摆舞(); } +if (ImGui::Button(T("电摇", "Electric Dance"), ImVec2(-1,40))) { 电摇(); } +if (ImGui::Button(T("拍灰舞", "Dust Dance"), ImVec2(-1,40))) { 拍灰舞(); } +if (ImGui::Button(T("俄舞", "Russian Dance"), ImVec2(-1,40))) { 俄舞(); } +if (ImGui::Button(T("安静", "Quiet"), ImVec2(-1,40))) { 安静(); } +if (ImGui::Button(T("雀跃", "Jump for Joy"), ImVec2(-1,40))) { 雀跃(); } +if (ImGui::Button(T("崩溃", "Breakdown"), ImVec2(-1,40))) { 崩溃(); } +if (ImGui::Button(T("海带舞", "Kelp Dance"), ImVec2(-1,40))) { 海带舞(); } +if (ImGui::Button(T("街舞", "Street Dance"), ImVec2(-1,40))) { 街舞(); } +if (ImGui::Button(T("壁虎步", "Gecko Walk"), ImVec2(-1,40))) { 壁虎步(); } +if (ImGui::Button(T("机械舞", "Robot Dance"), ImVec2(-1,40))) { 机械舞(); } +if (ImGui::Button(T("蹦迪舞", "Disco Dance"), ImVec2(-1,40))) { 蹦迪舞(); } +if (ImGui::Button(T("斗舞", "Battle Dance"), ImVec2(-1,40))) { 斗舞(); } +if (ImGui::Button(T("秀舞", "Show Dance"), ImVec2(-1,40))) { 秀舞(); } +if (ImGui::Button(T("拉票舞", "Vote Dance"), ImVec2(-1,40))) { 拉票舞(); } +if (ImGui::Button(T("创造舞", "Creative Dance"), ImVec2(-1,40))) { 创造舞(); } +if (ImGui::Button(T("三连赞", "Triple Like"), ImVec2(-1,40))) { 三连赞(); } +if (ImGui::Button(T("桑巴舞", "Samba Dance"), ImVec2(-1,40))) { 桑巴舞(); } +if (ImGui::Button(T("空翻", "Flip"), ImVec2(-1,40))) { 空翻(); } +if (ImGui::Button(T("摇篮舞", "Cradle Dance"), ImVec2(-1,40))) { 摇篮舞(); } +if (ImGui::Button(T("摆裙舞", "Skirt Dance"), ImVec2(-1,40))) { 摆裙舞(); } +if (ImGui::Button(T("吃鸡舞", "Chicken Dance"), ImVec2(-1,40))) { 吃鸡舞(); } +if (ImGui::Button(T("抖胸舞", "Chest Dance"), ImVec2(-1,40))) { 抖胸舞(); } +if (ImGui::Button(T("青蛙舞", "Frog Dance"), ImVec2(-1,40))) { 青蛙舞(); } +if (ImGui::Button(T("甩手舞", "Hand Dance"), ImVec2(-1,40))) { 甩手舞(); } +if (ImGui::Button(T("点赞", "Like"), ImVec2(-1,40))) { 点赞(); } +if (ImGui::Button(T("欢庆舞", "Celebration Dance"), ImVec2(-1,40))) { 欢庆舞(); } +if (ImGui::Button(T("螃蟹舞", "Crab Dance"), ImVec2(-1,40))) { 螃蟹舞(); } +if (ImGui::Button(T("快看我", "Look at Me"), ImVec2(-1,40))) { 快看我(); } +if (ImGui::Button(T("难过", "Sad"), ImVec2(-1,40))) { 难过(); } +if (ImGui::Button(T("扭秧歌", "Yangko Dance"), ImVec2(-1,40))) { 扭秧歌(); } +if (ImGui::Button(T("拜年(男)", "New Year Greeting (Male)"), ImVec2(-1,40))) { 拜年男(); } +if (ImGui::Button(T("红包来了", "Red Envelope Arrived"), ImVec2(-1,40))) { 红包来了(); } +if (ImGui::Button(T("拜年(女)", "New Year Greeting (Female)"), ImVec2(-1,40))) { 拜年女(); } +} +if (ImGui::CollapsingHeader(T("其它", "Other"))) + { + if (ImGui::Button(T("一键刷新其他", "Spawn All Other Items"), ImVec2(-1,40))) { 一键生成其他物资(); } +if (ImGui::Button(T("点券", "Points"), ImVec2(-1,40))) { 点券(); } +if (ImGui::Button(T("现金", "Cash"), ImVec2(-1,40))) { 现金(); } +if (ImGui::Button(T("Q币", "Q Coins"), ImVec2(-1,40))) { Q币(); } +if (ImGui::Button(T("红包", "Red Envelope"), ImVec2(-1,40))) { 红包(); } +if (ImGui::Button(T("坚甲", "Hard Shell"), ImVec2(-1,40))) { 坚甲(); } +if (ImGui::Button(T("利爪", "Sharp Claw"), ImVec2(-1,40))) { 利爪(); } +if (ImGui::Button(T("小鸡", "Chicken"), ImVec2(-1,40))) { 小鸡(); } +if (ImGui::Button(T("鸡蛋", "Egg"), ImVec2(-1,40))) { 鸡蛋(); } +if (ImGui::Button(T("南瓜", "Pumpkin"), ImVec2(-1,40))) { 南瓜(); } +if (ImGui::Button(T("圣诞糖果", "Christmas Candy"), ImVec2(-1,40))) { 圣诞糖果(); } +if (ImGui::Button(T("西瓜", "Watermelon"), ImVec2(-1,40))) { 西瓜(); } +if (ImGui::Button(T("小黄鸭", "Yellow Duck"), ImVec2(-1,40))) { 小黄鸭(); } +if (ImGui::Button(T("鸡", "Chicken"), ImVec2(-1,40))) { 鸡(); } +if (ImGui::Button(T("机密情报", "Classified Information"), ImVec2(-1,40))) { 机密情报(); } +if (ImGui::Button(T("鸡神奖杯", "Chicken God Trophy"), ImVec2(-1,40))) { 鸡神奖杯(); } +if (ImGui::Button(T("胜利手雷", "Victory Grenade"), ImVec2(-1,40))) { 胜利手雷(); } +if (ImGui::Button(T("足球", "Soccer Ball"), ImVec2(-1,40))) { 足球(); } +if (ImGui::Button(T("震爆弹", "Flashbang"), ImVec2(-1,40))) { 震爆弹(); } +if (ImGui::Button(T("烟雾弹", "Smoke Grenade"), ImVec2(-1,40))) { 烟雾弹(); } +if (ImGui::Button(T("燃烧瓶", "Molotov"), ImVec2(-1,40))) { 燃烧瓶(); } +if (ImGui::Button(T("破片手榴弹", "Frag Grenade"), ImVec2(-1,40))) { 破片手榴弹(); } +if (ImGui::Button(T("跳舞弹", "Dance Grenade"), ImVec2(-1,40))) { 跳舞弹(); } +if (ImGui::Button(T("大春雷", "Big Spring Thunder"), ImVec2(-1,40))) { 大春雷(); } +if (ImGui::Button(T("鞭炮", "Firecracker"), ImVec2(-1,40))) { 鞭炮(); } +if (ImGui::Button(T("小春雷", "Small Spring Thunder"), ImVec2(-1,40))) { 小春雷(); } +if (ImGui::Button(T("南瓜炸弹", "Pumpkin Bomb"), ImVec2(-1,40))) { 南瓜炸弹(); } +if (ImGui::Button(T("新年爆竹", "New Year Firecracker"), ImVec2(-1,40))) { 新年爆竹(); } +if (ImGui::Button(T("新年烟花", "New Year Firework"), ImVec2(-1,40))) { 新年烟花(); } +if (ImGui::Button(T("苹果", "Apple"), ImVec2(-1,40))) { 苹果(); } +if (ImGui::Button(T("圣诞玩具苹果", "Christmas Toy Apple"), ImVec2(-1,40))) { 圣诞玩具苹果(); } +if (ImGui::Button(T("圣诞小鸡玩偶", "Christmas Chicken Doll"), ImVec2(-1,40))) { 圣诞小鸡玩偶(); } +if (ImGui::Button(T("冬季雪球", "Winter Snowball"), ImVec2(-1,40))) { 冬季雪球(); } +if (ImGui::Button(T("肾上腺素", "Adrenaline"), ImVec2(-1,40))) { 肾上腺素(); } + +} + } + +} + + + ImGui::EndChild(); // 结束右边的可滚动区域 + + ImGui::End(); + +if(更多功能){ + ImGui::SetNextWindowSize(ImVec2(390, 320), ImGuiCond_Once); + if (ImGui::Begin(T(混淆("娱乐功能"), 混淆("Entertainment Functionsi"))), 0,ImGuiWindowFlags_NoSavedSettings) { + +ImGui::SliderFloat(T("高度", "Height"), &高度, 1.0f, 999.0f, "%.1f"); +if(ImGui::Button(T("高跳", "High Jump"),ImVec2(-1,40))){ + +高跳=true; +} +if (ImGui::Button(T("枪械一套", "Full Weapon Set"), ImVec2(-1,40))){ + 枪械一套=true; + } + ImGui::SliderFloat(T("马可", "Marco"), &tocdoquay, 0.0f, 500.0f, "%.1f"); +if (ImGui::Button(T("马可波罗", "Marco Polo"), ImVec2(-1,40))){ + chongchongche=true; +} + +if (ImGui::Button(T("无限子弹", "Infinite Ammo"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; + if (Object->IsA(UShootWeaponEntity::StaticClass())) { +auto playerChar = (UShootWeaponEntity *) Object; +playerChar->bHasInfiniteClips = true; +playerChar->bClipHasInfiniteBullets = true; +} + if (Object->IsA(ASTExtraShootWeapon::StaticClass())) { +auto playerChar = (ASTExtraShootWeapon *) Object; +playerChar->CurMaxBulletNumInOneClip = 105; +}}} +if (ImGui::Button(T("六道强者", "Six Paths Master"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +if (Object->IsA(UShootWeaponEntity::StaticClass())) { +auto playerChar = (UShootWeaponEntity *) Object; +playerChar->BurstShootBulletsNum = 999; +} +  if (Object->IsA(UShootWeaponEntity::StaticClass())) { +            auto playerChar = (UShootWeaponEntity *) Object; +   playerChar->ShootInterval = (float) 0; +}}} + if (ImGui::Button(T("飞天", "Fly"), ImVec2(-1,40))){ + 飞天2=true; +飞天关=false; +飞天1=false; + } +if (ImGui::Button(T("定点", "Fixed Point"), ImVec2(-1,40))){ + 飞天2=false; + 飞天1=true; +飞天关=false; + } + if (ImGui::Button(T("关", "Off"), ImVec2(-1,40))){ + 飞天关=true; +飞天1=false; +飞天2=false; + } + + if (ImGui::Button(T("飞天跳(开)", "Fly Jump (On)"), ImVec2(-1,40))){ + 飞天跳关=false; + 飞天跳开=true; + } + if (ImGui::Button(T("飞天跳(关)", "Fly Jump (Off)"), ImVec2(-1,40))){ + 飞天跳关=true; +飞天跳开=false; + } + if (ImGui::Button(T("能量加速(开)", "Energy Boost (On)"), ImVec2(-1,40))){ + 能量加速关=false; + 能量加速开=true; + } + if (ImGui::Button(T("能量加速(关)", "Energy Boost (Off)"), ImVec2(-1,40))){ + 能量加速关=true; +能量加速开=false; + } + if (ImGui::Button(T("除雾", "Remove Fog"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +  if (Object->IsA(UExponentialHeightFogComponent::StaticClass())) { +auto playerChar = (UExponentialHeightFogComponent *) Object; +playerChar->SetFogMaxOpacity(0.0f); +playerChar->SetFogDensity(0.0f); +playerChar->SetFogHeightFalloff(0.0f); +playerChar->SetFogCutoffDistance(0.0f); +playerChar->SetStartDistance(0.0f); + } + }} + + + if (ImGui::Button(T("趴下加速(开)", "Prone Speed Boost (On)"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +if (Object->IsA(ASTExtraBaseCharacter::StaticClass())) { +auto playerChar = (ASTExtraBaseCharacter *) Object; +playerChar->SpeedScale = 999999; + } + }} + + if (ImGui::Button(T("趴下加速(开)速度99999999", "Prone Speed Boost (On)"), ImVec2(-1, 40))) { + + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + if (Object->IsA(ASTExtraBaseCharacter::StaticClass())) { + auto playerChar = (ASTExtraBaseCharacter*)Object; + playerChar->SpeedScale = 99999999999; + } + } + } + +if (ImGui::Button(T("趴下加速(关)", "Prone Speed Boost (Off)"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +if (Object->IsA(ASTExtraBaseCharacter::StaticClass())) { +auto playerChar = (ASTExtraBaseCharacter *) Object; +playerChar->SpeedScale = 1.0f; + } + }} +if (ImGui::Button(T("枪械地震(开)", "Weapon Earthquake (On)"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +        if (Object->IsA(UShootWeaponEntity::StaticClass())) { +            auto JLSDK = (UShootWeaponEntity *) Object; +   JLSDK->AnimationKick = 26.f; + } + }} + +if (ImGui::Button(T("枪械地震(关)", "Weapon Earthquake (Off)"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; +        if (Object->IsA(UShootWeaponEntity::StaticClass())) { +            auto JLSDK = (UShootWeaponEntity *) Object; +   JLSDK->AnimationKick = 1.f; + } + }} + +if (ImGui::Button(T("240fps", "240 FPS"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; + + if (Object->IsA(USTExtraGameInstance::StaticClass())) { + auto SDK_USTExtraGameInstance = (USTExtraGameInstance *) Object; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSLow = 240; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSMid = 240; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHigh = 240; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHDR = 240; + + }}} + +if (ImGui::Button(T("120fps", "120 FPS"), ImVec2(-1, 40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + + if (Object->IsA(USTExtraGameInstance::StaticClass())) { + auto SDK_USTExtraGameInstance = (USTExtraGameInstance*)Object; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSLow = 120; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSMid = 120; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHigh = 120; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHDR = 120; + + } + } +} + +if (ImGui::Button(T("6fps", "60 FPS"), ImVec2(-1, 40))) { + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto Object = objs.GetByIndex(i); + if (isObjectInvalid(Object)) + continue; + + if (Object->IsA(USTExtraGameInstance::StaticClass())) { + auto SDK_USTExtraGameInstance = (USTExtraGameInstance*)Object; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSLow = 60; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSMid = 60; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHigh = 60; + SDK_USTExtraGameInstance->UserDetailSetting.PUBGDeviceFPSHDR = 60; + + } + } +} + +if (ImGui::Button(T("爬墙", "Wall Climb"), ImVec2(-1,40))){ + auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; + + if (Object->IsA(AActor::StaticClass())) { + auto playerChar = (AActor *) Object; + if (playerChar->bActorEnableCollision) { + playerChar->SetActorEnableCollision(true); + playerChar->bActorEnableCollision = true; + } + }}} + + ImGui::SliderFloat(T("人物大小", "Character Size"), &巨人, 1.0f, 100.0f, "%.1f", 1); + if (ImGui::Button(T("美国人", "American"), ImVec2(-1,40))){ +人物变大=true; +} +ImGui::SliderFloat(T("枪械大小", "Weapon Size"), &Gun_Size, 1.0f, 1000.0f, "%.1f", 1); + if (ImGui::Button(T("美国枪", "American Gun"), ImVec2(-1,40))){ +枪械变大=true; +} +ImGui::SliderFloat(T("速度", "Speed"), &XXXC, 1.0f, 1000.0f, "%.1f", 1); + if (ImGui::Button(T("加速", "Speed Boost"), ImVec2(-1,40))){ + +auto objs = UObject::GetGlobalObjects(); +    for (int i = 0; i < objs.Num(); i++) { +        auto Object = objs.GetByIndex(i); +        if (isObjectInvalid(Object)) +            continue; + if (Object->IsA(ASTExtraBaseCharacter::StaticClass())) { +auto playerChar = (ASTExtraBaseCharacter *) Object; +g_LocalPlayer->STPlayerController->AcknowledgedPawn->CustomTimeDilation = XXXC; +} + }} + ImGui::SliderFloat(T("视角", "Field of View"), &视角, 1.0f, 490.0f, "%.1f", 1); + if (ImGui::Button(T("广角", "Wide Angle"), ImVec2(-1,40))){ +广角=true; +} + + if(ImGui::Button(T("关闭菜单", "Close Menu"),ImVec2(-1,40))){ + 更多功能 = false; +} + if(ImGui::Button("?")){ +开发者菜单=true; +} +ImGui::End(); +} +if(开发者菜单){ + ImGui::SetNextWindowSize(ImVec2(420, 320), ImGuiCond_Once); + if (ImGui::Begin(T(混淆("绘制功能"), 混淆("ESP Functions"))), 0,ImGuiWindowFlags_NoSavedSettings) { +{ +ImGui::Columns(2); +ImGui::SetColumnOffset(1, 133); +if (ImGui::Button(T("绘制页面", "Drawing Page"), ImVec2(130,60))) +Settings::Tab = 1; + +ImGui::Text("%.2fFPS", 1000.0f / ImGui::GetIO().Framerate); +ImGui::Spacing(); +ImGui::Columns(2); +ImGui::NextColumn(); +} + +if (Settings::Tab == 1) { + + ImGui::Checkbox(T("显示射线", "Show Ray"), &Config.PlayerESP.Line); + ImGui::SameLine(); + ImGui::Checkbox(T("显示骨骼", "Show Skeleton"), &Config.PlayerESP.Skeleton); + + ImGui::Checkbox(T("显示血量", "Show Health"), &Config.PlayerESP.血量); + ImGui::SameLine(); + ImGui::Checkbox(T("显示名称", "Show Name"), &Config.PlayerESP.名字); + + ImGui::Checkbox(T("显示距离", "Show Distance"), &Config.PlayerESP.距离); + ImGui::SameLine(); + ImGui::Checkbox(T("显示人数", "Show Player Count"), &人数); + + ImGui::Checkbox(T("显示盒子", "Show Loot Box"), &Config.PlayerESP.LootBox); + ImGui::SameLine(); + ImGui::Checkbox(T("剩余人数", "Show Remaining Players"), &Config.PlayerESP.剩余人数); + + ImGui::Checkbox(T("显示方框", "Show Box"), &Config.PlayerESP.Box); + ImGui::SameLine(); + ImGui::Checkbox(T("忽略人机", "Ignore Bots"), &Config.PlayerESP.NoBot); + + ImGui::EndTabItem(); + } + ImGui::End(); + } +} +} // close void 菜单() +} diff --git a/refs.h b/refs.h new file mode 100644 index 0000000..05ba0fd --- /dev/null +++ b/refs.h @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "structures/memory/syscall_rw.h" +#include "structures/functions/obfuscate.cpp" +#include "structures/functions/Quaternion.hpp" +#include "structures/functions/common_funcs.h" +#include "structures/functions/essential_funcs.h" +#include "structures/data/training_data.h" +#include "structures/data/vikendi_data.h" +#include "structures/data/erangel_data.h" +#include "structures/data/desert_data.h" +#include "structures/data/sanhok_data.h" +#include "variables.h" +#include "DrawESP.h" \ No newline at end of file diff --git a/variables.h b/variables.h new file mode 100644 index 0000000..aa35698 --- /dev/null +++ b/variables.h @@ -0,0 +1,3564 @@ + +struct sConfig { + +struct sPlayerESP { + bool Alert; + bool Line; + bool Box; + bool Skeleton; + bool NoBot; + bool LootBox; + bool 血量; + bool 剩余人数; + bool 名字; + bool 距离; + + float RadarX; + float RadarY; + bool Radar; + bool RadarDraw2; + bool Radar1; + bool Radar2; + bool Radar3; + bool Radar4; + +}; +sPlayerESP PlayerESP{0}; + +struct sOTHER { + bool HIDEESP; +}; +sOTHER OTHER{0}; + +}; +sConfig Config{0}; + + + + +bool 提示=true; +bool 物资功能=false; +bool 单机设置=true; +bool 联机调试=false; +bool 功能设置=false; +bool 物资调试=false; +bool 坐标调试=false; + +bool HIDEESP = true; +bool 人数 = false; +bool 世界 = false; +bool 更多功能 = false; + +bool 高跳 = false; +float 高度 = 500.0f; + +bool chongchongche = false; +float chongchongche1; +float chongchongche2; +float tocdoquay = 0.0f; + +bool 人物变大 = false; +float 巨人 = 1.0f; + +bool 飞天跳开 = false; +bool 飞天跳关 = false; +bool 飞天2 = false; +bool 飞天1 = false; +bool 飞天关 = false; + +bool 能量加速开 = false; +bool 能量加速关 = false; + +bool 伤害测试2 = false; +bool 枪械一套 = false; +bool 枪械变大 = false; +float Gun_Size = 1.0f; +bool 开启伤害 = true; +float 伤害值 = 0.0f; +float 伤害倍率 = 1.0f; + +bool 广角 = false; +float 视角 = 90.0f; + +bool 自控初始化 = false; +bool 喇叭飞天 = false; +bool 载具加速 = false; +bool 转圈 = false; +bool 转圈2 = false; +bool 无视碰撞开 = false; +bool 无视重力开 = false; +bool 老爷模式 = false; +bool 飞船模式 = false; +float 载具速度 = 1.0f; +float 喇叭高度 = 1.0f; +float XXXC = 3.0f; +bool 开发者菜单 = false; +bool 修复着陆 = true; +bool 修复部分 = true; +bool 修复车辆 = true; +bool DamageFix = false; +float 驾驶员X偏移 = 100.0f; +float 驾驶员Y偏移 = 0.0f; +float 驾驶员Z偏移 = 80.0f; +float 乘客X偏移 = 50.0f; +float 乘客Y偏移 = 50.0f; +float 乘客Z偏移 = 80.0f; +extern void 执行单次生成(); +extern void 更新建筑跟随状态(); +extern void 探测并添加附近建筑(float Radius); +extern void 清空建筑列表(); +extern void 加载选中的建筑(); +extern void 获取对象(); +inline bool 建筑跟随模式 = false; +inline float 建筑探测半径 = 1000.0f; +inline float 建筑生成偏移 = 500.0f; +inline char 建筑路径输入[256] = {0}; + +bool(*ogm)(); +bool gm(){ +return true; +} +void CreateItem(int ItemType, int TypeSpecificID, int Count) { +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=ItemType; +Item.TypeSpecificID=TypeSpecificID; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(Count); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} + +void src(int ItemType, int TypeSpecificID, int Count) { +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=ItemType; +Item.TypeSpecificID=TypeSpecificID; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(Count); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} + +// 武器皮肤 - 类型1 (正确) +void AKM_Chicheng() { src(1, 101001001, 10); } +void AKM_Rongyao() { src(1, 101001002, 10); } +void AKM_Wumujinwen() { src(1, 101001003, 10); } +void AKM_Xueshi() { src(1, 101001004, 10); } +void AKM_Kuangnu() { src(1, 101001005, 10); } + +void M16A4_Shachi() { src(1, 101002001, 10); } +void M16A4_Qingyao() { src(1, 101002002, 10); } +void M16A4_Wumujinwen() { src(1, 101002003, 10); } +void M16A4_Huangshi() { src(1, 101002004, 10); } +void M16A4_Yezhanyinghao() { src(1, 101002005, 10); } +void M16A4_Kuangnu() { src(1, 101002006, 10); } + +void SCARL_Kuangnu() { src(1, 101003001, 10); } +void SCARL_Wumujinwen() { src(1, 101003002, 10); } +void SCARL_Chicheng() { src(1, 101003003, 10); } +void SCARL_Xueshi() { src(1, 101003004, 10); } + +void M416_RocketGirl() { src(1, 101004001, 10); } +void M416_Wumujinwen() { src(1, 101004002, 10); } +void M416_Kuishe() { src(1, 101004003, 10); } +void M416_Tuya() { src(1, 101004004, 10); } +void M416_Shamofengbao() { src(1, 101004005, 10); } +void M416_Xueyumicai() { src(1, 101004006, 10); } +void M416_Xueshi() { src(1, 101004007, 10); } +void M416_Chicheng() { src(1, 101004008, 10); } +void M416_Spring() { src(1, 101004009, 10); } + +void GROZA_Kuangnu() { src(1, 101005001, 10); } +void AUG_Xueshi() { src(1, 101006001, 10); } + +void UZI_Kuangnu() { src(1, 102001001, 10); } + +void UMP9_Chicheng() { src(1, 102002001, 10); } +void UMP9_Rongyao() { src(1, 102002002, 10); } +void UMP9_RocketGirl() { src(1, 102002003, 10); } +void UMP9_Spring() { src(1, 102002004, 10); } + +void Kar98K_Qingyao() { src(1, 103001001, 10); } +void Kar98K_Wumujinwen() { src(1, 103001002, 10); } +void Kar98K_FireLava() { src(1, 103001003, 10); } +void Kar98K_Xueshi() { src(1, 103001004, 10); } +void Kar98K_Spring() { src(1, 103001005, 10); } + +void AWM_Rainbow() { src(1, 103003001, 10); } +void SKS_Chicheng() { src(1, 103004001, 10); } + +void S686_Chicheng() { src(1, 104001001, 10); } + +void P92_Kuangnu() { src(1, 106001001, 10); } +void P1911_Qingyao() { src(1, 106002001, 10); } + +void Crowbar_RedNight() { src(1, 108002001, 10); } + +void Pan_DoubleYolk() { src(1, 108004001, 10); } +void Pan_Survivor() { src(1, 108004002, 10); } +void Pan_NoHunt() { src(1, 108004003, 10); } +void Pan_RottenTomato() { src(1, 108004004, 10); } +void Pan_Forward() { src(1, 108004005, 10); } +void Pan_RedNight() { src(1, 108004006, 10); } + +// 表情动作 - 类型22 (正确) +void 你好() { src(22, 2200101, 20); } +void 感谢() { src(22, 2200201, 20); } +void 鼓掌() { src(22, 2200301, 20); } +void 大笑() { src(22, 2200401, 20); } +void 来这里() { src(22, 2200501, 20); } +void 走() { src(22, 2200601, 20); } +void 否定() { src(22, 2200701, 20); } +void 肯定() { src(22, 2200801, 20); } +void 投降() { src(22, 2200901, 20); } +void 愤怒() { src(22, 2201001, 20); } +void 摇摆舞() { src(22, 2201101, 20); } +void 电摇() { src(22, 2201201, 20); } +void 拍灰舞() { src(22, 2201301, 20); } +void 俄舞() { src(22, 2201401, 20); } +void 安静() { src(22, 2201501, 20); } +void 雀跃() { src(22, 2201601, 20); } +void 崩溃() { src(22, 2201701, 20); } +void 海带舞() { src(22, 2201801, 20); } +void 街舞() { src(22, 2201901, 20); } +void 壁虎步() { src(22, 2202001, 20); } +void 机械舞() { src(22, 2202101, 20); } +void 蹦迪舞() { src(22, 2202201, 20); } +void 斗舞() { src(22, 2202301, 20); } +void 秀舞() { src(22, 2202401, 20); } +void 拉票舞() { src(22, 2202501, 20); } +void 创造舞() { src(22, 2202601, 20); } +void 三连赞() { src(22, 2202701, 20); } +void 桑巴舞() { src(22, 2202801, 20); } +void 空翻() { src(22, 2202901, 20); } +void 摇篮舞() { src(22, 2203001, 20); } +void 摆裙舞() { src(22, 2203101, 20); } +void 吃鸡舞() { src(22, 2203201, 20); } +void 抖胸舞() { src(22, 2203301, 20); } +void 青蛙舞() { src(22, 2203401, 20); } +void 甩手舞() { src(22, 2203501, 20); } +void 点赞() { src(22, 2203601, 20); } +void 欢庆舞() { src(22, 2203701, 20); } +void 螃蟹舞() { src(22, 2203801, 20); } +void 快看我() { src(22, 2203901, 20); } +void 难过() { src(22, 2204001, 20); } +void 扭秧歌() { src(22, 2204101, 20); } +void 拜年男() { src(22, 2204201, 20); } +void 红包来了() { src(22, 2204301, 20); } +void 拜年女() { src(22, 2204401, 20); } + +// 服装 - 类型4 (正确) +void 雪地吉利服() { src(4, 403038, 10); } +void 晶翼女神套装() { src(4, 403409, 10); } +void 黑曜金尊套装() { src(4, 403410, 10); } +void 火箭少女101() { src(4, 453021, 10); } +void 至尊金龙外套() { src(4, 403188, 10); } +void S1战斗裤() { src(4, 404049, 10); } +void S1战斗外套() { src(4, 403124, 10); } +void 小黄衣() { src(4, 403017, 10); } +void 小黄裤() { src(4, 404001, 10); } +void 黑色连帽大衣() { src(4, 403184, 10); } +void 西部牛仔面罩() { src(4, 402037, 10); } +void 黑色rock() { src(4, 403178, 10); } +void 青色面罩() { src(4, 402032, 10); } +void 师傅专用外套() { src(4, 403075, 10); } +void 时尚圣诞套装() { src(4, 403393, 10); } +void 卡路里套装() { src(4, 403408, 10); } + +// 货币 - 类型100 (正确) +void 现金() { src(100, 1011, 520); } +void Q币() { src(100, 1012, 520); } +void 点券() { src(100, 1006, 520); } + +// 特效道具 - 类型30 (正确) +void 新年烟花() { src(30, 3000301, 50); } +void 新年爆竹() { src(30, 3000302, 50); } +void 红包() { src(30, 3001027, 50); } +void 坚甲() { src(30, 3001028, 50); } +void 利爪() { src(30, 3001029, 50); } +void 小鸡() { src(30, 3002001, 50); } +void 鸡蛋() { src(30, 3002002, 50); } +void 南瓜() { src(30, 3001013, 50); } +void 圣诞糖果() { src(30, 3001014, 50); } +void 西瓜() { src(30, 3001001, 50); } +void 小黄鸭() { src(30, 3001002, 90); } +void 鸡() { src(30, 3001003, 90); } + +// 道具/材料 - 类型16 (正确) +void 机密情报() { src(16, 1602056, 50); } +void 鸡神奖杯() { src(16, 1602046, 50); } +void 胜利手雷() { src(16, 1602039, 50); } +void 足球() { src(16, 1602030, 50); } + +// 消耗品 - 类型6 (正确,但需要修正参数个数) +void 震爆弹() { src(6, 602001, 50); } +void 烟雾弹() { src(6, 602002, 50); } +void 燃烧瓶() { src(6, 602003, 50); } +void 破片手榴弹() { src(6, 602004, 50); } +void 跳舞弹() { src(6, 602006, 50); } +// 修正参数个数错误: +void 大春雷() { src(6, 602010, 50); } // 原来有4个参数 +void 鞭炮() { src(6, 602011, 50); } // 原来有4个参数 +void 小春雷() { src(6, 602012, 50); } // 原来有4个参数 +void 南瓜炸弹() { src(6, 602013, 50); } // 原来有4个参数 +void 苹果() { src(6, 602005, 50); } +void 圣诞玩具苹果() { src(6, 602007, 50); } +void 圣诞小鸡玩偶() { src(6, 602008, 50); } +void 冬季雪球() { src(6, 602009, 50); } +void 肾上腺素() { src(6, 601002, 50); } + +// 武器 - 类型1 (正确) +void AKM() { src(1, 101001, 10); } +void M416() { src(1, 101004, 10); } +void AWM() { src(1, 103003, 10); } +void M16A4() { src(1, 101002, 10); } +void GROZA() { src(1, 101005, 10); } +void SCARL() { src(1, 101003, 10); } +void AUG() { src(1, 101006, 10); } +void QBZ() { src(1, 101007, 10); } +void M762() { src(1, 101008, 10); } +void MK47() { src(1, 101009, 10); } +void G36C() { src(1, 101010, 10); } +void UZI() { src(1, 102001, 10); } +void UMP9() { src(1, 102002, 10); } +void Vector() { src(1, 102003, 10); } +void Thompson() { src(1, 102004, 10); } +void PP19() { src(1, 102005, 10); } +void Kar98K() { src(1, 103001, 10); } +void M24() { src(1, 103002, 10); } +void SKS() { src(1, 103004, 10); } +void VSS() { src(1, 103005, 10); } +void Mini14() { src(1, 103006, 10); } +void Mk14() { src(1, 103007, 10); } +void Win94() { src(1, 103008, 10); } +void SLR() { src(1, 103009, 10); } +void QBU() { src(1, 103010, 10); } +void S686() { src(1, 104001, 10); } +void S1897() { src(1, 104002, 10); } +void S12K() { src(1, 104003, 10); } +void M249() { src(1, 105001, 10); } +void DP28() { src(1, 105002, 10); } +void P92() { src(1, 106001, 10); } +void P1911() { src(1, 106002, 10); } +void R1895() { src(1, 106003, 10); } +void P18C() { src(1, 106004, 10); } +void R45() { src(1, 106005, 10); } +void SawedOff() { src(1, 106006, 10); } +void SignalGun() { src(1, 106007, 10); } +void Scorpion() { src(1, 106008, 10); } +void ChickenFirework() { src(1, 106095, 10); } +void LanternFirework() { src(1, 106096, 10); } +void BeastSignal() { src(1, 106097, 10); } +void ChristmasSignal() { src(1, 106098, 10); } +void NewYearFirework() { src(1, 106099, 10); } +void Crossbow() { src(1, 107001, 10); } +void RiotShield() { src(1, 107003, 10); } +void Machete() { src(1, 108001, 10); } +void Crowbar() { src(1, 108002, 10); } +void Sickle() { src(1, 108003, 10); } +void Pan() { src(1, 108004, 10); } + +// 弹药 - 类型3 (正确) +void Bullet762() { src(3, 302001, 900); } +void Bullet556() { src(3, 303001, 900); } +void ShotgunShell() { src(3, 304001, 900); } +void Bullet45() { src(3, 305001, 900); } +void Magnum() { src(3, 306001, 900); } +void SignalFlare() { src(3, 308001, 900); } +void Arrow() { src(3, 307001, 900); } +void FireworkShell() { src(3, 308002, 900); } +void BeastBait() { src(3, 308003, 900); } + +// 配件 - 类型2 (修正:之前是类型1,应该改为类型2) +void Choke() { src(2, 201001, 10); } +void SMGCompensator() { src(2, 201002, 10); } +void SniperCompensator() { src(2, 201003, 10); } +void SMGFlashHider() { src(2, 201004, 10); } +void SniperFlashHider() { src(2, 201005, 10); } +void SMGSilencer() { src(2, 201006, 10); } +void SniperSilencer() { src(2, 201007, 10); } +void PistolSilencer() { src(2, 201008, 10); } +void RifleCompensator() { src(2, 201009, 10); } +void RifleFlashHider() { src(2, 201010, 10); } +void RifleSilencer() { src(2, 201011, 10); } +void Duckbill() { src(2, 201012, 10); } +void AngledGrip() { src(2, 202001, 10); } +void VerticalGrip() { src(2, 202002, 10); } +void LightGrip() { src(2, 202004, 10); } +void HalfGrip() { src(2, 202005, 10); } +void ThumbGrip() { src(2, 202006, 10); } +void LaserSight() { src(2, 202007, 10); } +void RedDot() { src(2, 203001, 10); } +void Holographic() { src(2, 203002, 10); } +void Scope2x() { src(2, 203003, 10); } +void Scope4x() { src(2, 203004, 10); } +void Scope8x() { src(2, 203005, 10); } +void CantedSight() { src(2, 203018, 10); } +void PistolExtMag() { src(2, 204001, 10); } +void PistolQuickMag() { src(2, 204002, 10); } +void PistolQuickExtMag() { src(2, 204003, 10); } +void SMGExtMag() { src(2, 204004, 10); } +void SMGQuickMag() { src(2, 204005, 10); } +void SMGQuickExtMag() { src(2, 204006, 10); } +void SniperExtMag() { src(2, 204007, 10); } +void SniperQuickMag() { src(2, 204008, 10); } +void SniperQuickExtMag() { src(2, 204009, 10); } +void ShotgunBulletLoops() { src(2, 204010, 10); } +void RifleExtMag() { src(2, 204011, 10); } +void RifleQuickMag() { src(2, 204012, 10); } +void RifleQuickExtMag() { src(2, 204013, 10); } +void Kar98kLoops() { src(2, 204014, 10); } +void UziStock() { src(2, 205001, 10); } +void TacticalStock() { src(2, 205002, 10); } +void CheekPad() { src(2, 205003, 10); } +void Quiver() { src(2, 205004, 10); } + +// 装备 - 类型5 (正确) +void 夜视仪() { src(5, 504001, 10); } +void HelmetLv3() { src(5, 502003, 10); } +void VestLv3() { src(5, 503003, 10); } +void BackpackLv3() { src(5, 501003, 10); } +void HelmetLv1() { src(5, 502001, 10); } +void VestLv1() { src(5, 503001, 10); } +void BackpackLv1() { src(5, 501004, 10); } +void HelmetLv2() { src(5, 502002, 10); } +void VestLv2() { src(5, 503002, 10); } +void BackpackLv2() { src(5, 501005, 10); } +void ChristmasHelmet() { src(5, 502010, 10); } +void BeastHelmet() { src(5, 502011, 10); } +// 一键刷新所有皮肤武器 +void SpawnAllSkinWeapons() { + AKM_Chicheng(); AKM_Rongyao(); AKM_Wumujinwen(); AKM_Xueshi(); AKM_Kuangnu(); + M16A4_Shachi(); M16A4_Qingyao(); M16A4_Wumujinwen(); M16A4_Huangshi(); M16A4_Yezhanyinghao(); M16A4_Kuangnu(); + SCARL_Kuangnu(); SCARL_Wumujinwen(); SCARL_Chicheng(); SCARL_Xueshi(); + M416_RocketGirl(); M416_Wumujinwen(); M416_Kuishe(); M416_Tuya(); M416_Shamofengbao(); + M416_Xueyumicai(); M416_Xueshi(); M416_Chicheng(); M416_Spring(); + GROZA_Kuangnu(); AUG_Xueshi(); + UZI_Kuangnu(); + Kar98K_Qingyao(); Kar98K_Wumujinwen(); Kar98K_FireLava(); Kar98K_Xueshi(); Kar98K_Spring(); + AWM_Rainbow(); + + Crowbar_RedNight(); + Pan_DoubleYolk(); Pan_Survivor(); Pan_NoHunt(); Pan_RottenTomato(); Pan_Forward(); Pan_RedNight(); +} +void 一键生成其他物资() { + 红包(); 坚甲(); 利爪(); 小鸡(); 鸡蛋(); 南瓜(); 圣诞糖果(); + 西瓜(); 小黄鸭(); 鸡(); 机密情报(); 鸡神奖杯(); 胜利手雷(); 足球(); + 震爆弹(); 烟雾弹(); 燃烧瓶(); 破片手榴弹(); 跳舞弹(); 大春雷(); + 鞭炮(); 小春雷(); 南瓜炸弹(); 苹果(); 圣诞玩具苹果(); 圣诞小鸡玩偶(); + 冬季雪球(); 肾上腺素(); Q币(); 现金(); 点券(); 新年爆竹(); 新年烟花(); +} +void 一键生成衣服() { + 雪地吉利服();晶翼女神套装();黑曜金尊套装();火箭少女101();至尊金龙外套();S1战斗裤();S1战斗外套();小黄衣();小黄裤();黑色连帽大衣();西部牛仔面罩();黑色rock();青色面罩();师傅专用外套();时尚圣诞套装();卡路里套装(); +} + +void 一键生成动作() { + 你好(); 感谢(); 鼓掌(); 大笑(); 来这里(); 走(); 否定(); 肯定(); 投降(); 愤怒(); + 摇摆舞(); 电摇(); 拍灰舞(); 俄舞(); 安静(); 雀跃(); 崩溃(); 海带舞(); 街舞(); + 壁虎步(); 机械舞(); 蹦迪舞(); 斗舞(); 秀舞(); 拉票舞(); 创造舞(); 三连赞(); + 桑巴舞(); 空翻(); 摇篮舞(); 摆裙舞(); 吃鸡舞(); 抖胸舞(); 青蛙舞(); 甩手舞(); + 点赞(); 欢庆舞(); 螃蟹舞(); 快看我(); 难过(); 扭秧歌(); 拜年男(); 红包来了(); + 拜年女(); +} +void SpawnAllWeapons() { + AKM(); M416(); AWM(); M16A4(); GROZA(); SCARL(); AUG(); QBZ(); M762(); MK47(); G36C(); + UZI(); UMP9(); Vector(); Thompson(); PP19(); Kar98K(); M24(); SKS(); VSS(); Mini14(); + Mk14(); Win94(); SLR(); QBU(); S686(); S1897(); S12K(); M249(); DP28(); P92(); P1911(); + R1895(); P18C(); R45(); SawedOff(); SignalGun(); Scorpion(); ChickenFirework(); LanternFirework(); + BeastSignal(); ChristmasSignal(); NewYearFirework(); Crossbow(); RiotShield(); Machete(); + Crowbar(); Sickle(); Pan(); +} + +void SpawnAllAmmo() { + Bullet762(); Bullet556(); ShotgunShell(); Bullet45(); Magnum(); SignalFlare(); + Arrow(); FireworkShell(); BeastBait(); +} + +void SpawnAllAttachments() { + Choke(); SMGCompensator(); SniperCompensator(); SMGFlashHider(); SniperFlashHider(); + SMGSilencer(); SniperSilencer(); PistolSilencer(); RifleCompensator(); RifleFlashHider(); + RifleSilencer(); Duckbill(); AngledGrip(); VerticalGrip(); LightGrip(); HalfGrip(); + ThumbGrip(); LaserSight(); RedDot(); Holographic(); Scope2x(); Scope4x(); Scope8x(); + CantedSight(); PistolExtMag(); PistolQuickMag(); PistolQuickExtMag(); SMGExtMag(); + SMGQuickMag(); SMGQuickExtMag(); SniperExtMag(); SniperQuickMag(); SniperQuickExtMag(); + ShotgunBulletLoops(); RifleExtMag(); RifleQuickMag(); RifleQuickExtMag(); Kar98kLoops(); + UziStock(); TacticalStock(); CheekPad(); Quiver(); +} + +void SpawnAllGear() { + HelmetLv3(); VestLv3(); BackpackLv3(); HelmetLv1(); VestLv1(); BackpackLv1(); 夜视仪(); + HelmetLv2(); VestLv2(); BackpackLv2(); ChristmasHelmet(); BeastHelmet(); +} + + + + +void SpawnItemM1(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=501003; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} +void SpawnItemM2(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=502003; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} +void SpawnItemM3(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=503003; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} + + + +void SpawnItemM4(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=404049; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} +void SpawnItemM5(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=403124; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} + + + +void SpawnItemM6(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=404001; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} +void SpawnItemM7(){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=5; +Item.TypeSpecificID=403017; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(1); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} +void SpawnItem(int ItemID,int ItemType,int Count){ +获取对象(); +FTransform Transform; +if(PlayerCharacter){ +Transform=PlayerCharacter->GetTransform(); +} +AActor*Actor=UGameplayStatics::BeginSpawningActorFromClass(GetWorld(),APickUpWrapperActor::StaticClass(),Transform,true,UGameplayStatics::GetPlayerController(GetWorld(),0)); +APickUpWrapperActor*PickUpActor=reinterpret_cast(Actor); +if(PickUpActor){ +FItemDefineID Item; +Item.Type=ItemType; +Item.TypeSpecificID=ItemID; +PickUpActor->SetDefineID(Item); +PickUpActor->SetCountOnServerAfterSpawn(Count); +PickUpActor->ShowMesh(true); + PickUpActor->ShowActor(); + UGameplayStatics::FinishSpawningActor(PickUpActor,Transform); +PickUpActor->RegisterToPlayerPickUpList(); +} +} + +static bool bDisableTimeouts = false; // 默认启用超时检查 +// 判断物品类型 +int getItemType(int itemID) { + // 1. 货币类 (1000-1015) + if (itemID >= 1000 && itemID <= 1015) { + return 100; + } + + // 2. 武器类 (101001-108004) + if ((itemID >= 101001 && itemID <= 101010) || // 突击步枪 + (itemID >= 102001 && itemID <= 102006) || // 冲锋枪 + (itemID >= 103001 && itemID <= 103010) || // 狙击枪 + (itemID >= 104001 && itemID <= 104003) || // 霰弹枪 + (itemID >= 105001 && itemID <= 105002) || // 轻机枪 + (itemID >= 106001 && itemID <= 106099) || // 手枪/特殊武器 + (itemID == 107001 || itemID == 107003) || // 十字弩/防爆盾 + (itemID >= 108001 && itemID <= 108004)) { // 近战武器 + return 1; + } + + // 3. 配件类 (201001-296008) + if ((itemID >= 201001 && itemID <= 201012) || // 枪口类 + (itemID >= 202001 && itemID <= 202007) || // 握把类 + (itemID >= 203001 && itemID <= 203018) || // 瞄准镜类 + (itemID >= 203104 && itemID <= 203104) || // 瞄准镜测试皮肤 + (itemID >= 204001 && itemID <= 204014) || // 弹匣类 + (itemID >= 205001 && itemID <= 205006) || // 枪托类 + (itemID >= 281002 && itemID <= 281004) || // 默认枪口 + (itemID >= 283009 && itemID <= 283010) || // 默认枪口 + (itemID >= 291001 && itemID <= 291010) || // 突击步枪默认弹匣 + (itemID >= 292001 && itemID <= 292006) || // 冲锋枪默认弹匣 + (itemID >= 293002 && itemID <= 293010) || // 狙击枪默认弹匣 + (itemID >= 294003 && itemID <= 294003) || // 霰弹枪默认弹匣 + (itemID >= 295001 && itemID <= 295002) || // 轻机枪默认弹匣 + (itemID >= 296001 && itemID <= 296008)) { // 手枪默认弹匣 + return 2; + } + + // 4. 弹药类 (301001-308003) + if ((itemID >= 301001 && itemID <= 301001) || // 9毫米子弹 + (itemID >= 302001 && itemID <= 302001) || // 7.62毫米子弹 + (itemID >= 303001 && itemID <= 303001) || // 5.56毫米子弹 + (itemID >= 304001 && itemID <= 304001) || // 12口径霰弹 + (itemID >= 305001 && itemID <= 305001) || // .45口径子弹 + (itemID >= 306001 && itemID <= 306001) || // .300马格南子弹 + (itemID >= 307001 && itemID <= 307001) || // 弩箭 + (itemID >= 308001 && itemID <= 308003)) { // 信号弹/烟花弹/年兽诱饵弹 + return 3; + } + + // 5. 服装类 (400997-407008) + if ((itemID >= 400997 && itemID <= 400999) || // 创建头 + (itemID >= 401003 && itemID <= 401992) || // 帽子类 + (itemID >= 401992001 && itemID <= 401992002) || // 经典脸型体验 + (itemID >= 401993 && itemID <= 401999) || // 经典脸型 + (itemID >= 402001 && itemID <= 402079) || // 面罩/眼镜类 + (itemID >= 403001 && itemID <= 403999) || // 上衣类 + (itemID >= 404001 && itemID <= 404231) || // 下装类 + (itemID >= 405001 && itemID <= 405999) || // 鞋子类 + (itemID >= 406001 && itemID <= 406003) || // 头发 + (itemID >= 406001001 && itemID <= 406001002) || // 经典发型体验 + (itemID >= 40601001 && itemID <= 40606009) || // 经典发型 + (itemID >= 407001001 && itemID <= 407001004) || // 脸涂 + (itemID >= 407008 && itemID <= 407008) || // 海岛探路者墨镜 + (itemID >= 410001 && itemID <= 410039) || // 套装类 + (itemID >= 453001 && itemID <= 455003) || // 合作定制服装 + (itemID >= 473001 && itemID <= 474009)) { // 腾讯系定制服装 + return 4; + } + + // 6. 防具/背包类 (501001-504001) + if ((itemID >= 501001 && itemID <= 501006) || // 背包 + (itemID >= 502001 && itemID <= 502011) || // 头盔 + (itemID >= 503001 && itemID <= 503003) || // 防弹衣 + (itemID >= 504001 && itemID <= 504001)) { // 夜视仪 + return 5; + } + + // 7. 消耗品类 (601001-603001) + if ((itemID >= 601001 && itemID <= 601061) || // 医疗品 + (itemID >= 602001 && itemID <= 602014) || // 投掷物 + (itemID >= 603001 && itemID <= 603001)) { // 燃料 + return 6; + } + + // 8. 降落伞类 (701001-703086) + if ((itemID >= 701001 && itemID <= 703086)) { + return 4; // 注意:根据文件,降落伞也是类型4 + } + + // 9. 宝箱/礼盒类 (1500001-1601002) + if ((itemID >= 1500001 && itemID <= 1500008) || // 军备宝箱 + (itemID >= 1501001 && itemID <= 1514005) || // 各种宝箱礼盒 + (itemID == 1601002)) { // 改名卡 + return 15; + } + + // 10. 道具/材料类 (1601001-1602118) + if ((itemID == 1601001) || // 重置角色卡 + (itemID >= 1602001 && itemID <= 1602118)) { // 各种道具材料 + return 16; + } + + // 11. 军团相关 (1701001) + if (itemID == 1701001) { + return 17; + } + + // 12. 头像框类 (2001001-2004308) + if ((itemID >= 2001001 && itemID <= 2004308)) { + return 20; + } + + // 13. 经验/金币卡类 (2101001-2105001) + if ((itemID >= 2101001 && itemID <= 2105001)) { + return 21; + } + + // 14. 表情动作类 (2200101-2204401) + if ((itemID >= 2200101 && itemID <= 2204401)) { + return 22; + } + + // 15. 时效房卡类 (2401001-2408055) + if ((itemID >= 2401001 && itemID <= 2408055)) { + return 24; + } + + // 16. 模式体验房卡类 (2501001-2508001) + if ((itemID >= 2501001 && itemID <= 2508001)) { + return 25; + } + + // 17. 特效道具类 (3000301-3002002) + if ((itemID >= 3000301 && itemID <= 3002002)) { + return 30; + } + + // 18. 浇水完成证明类 (4001001-4001006) + if ((itemID >= 4001001 && itemID <= 4001006)) { + return 40; + } + + // 19. 武器皮肤配件 (100100101-200400103) + if ((itemID >= 100100101 && itemID <= 100400903) || // M416等武器皮肤配件 + (itemID >= 200200101 && itemID <= 200400103)) { // UMP9等武器皮肤配件 + return 2; // 注意:根据文件,这些是类型2 + } + + // 20. 武器皮肤 (101001001-108004006) + if ((itemID >= 101001001 && itemID <= 108004006)) { + return 1; // 注意:根据文件,武器皮肤是类型1 + } + + // 默认返回1(武器类) + return 1; +} + + +#undef bind // fix NDK macro collision with std::bind +using namespace std; +#define STATUS_ICON_RUNNING "◆" // 实心圆 +#define STATUS_ICON_STOPPED "◆" // 空心圆 +static std::mutex g_log_mutex; +static std::vector g_log_lines; +static const size_t MAX_LOG_LINES = 2000; +static bool g_AutoWeaponFixEnabled = false; +static bool enabled = false; +class UDPProxy { +public: + UDPProxy(int local_port=7788, const std::string &target_ip="192.168.100.100", int target_port=7777) + : local_port(local_port), target_ip(target_ip), target_port(target_port), + sockfd(-1), running(false) {} + + ~UDPProxy() { stop(); } + + bool start() { + if (running.load()) return true; + + // 创建新的日志文件名 + { + auto now = std::chrono::system_clock::now(); + std::time_t t = std::chrono::system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + char buf[128]; + snprintf(buf, sizeof(buf), "/sdcard/udp_proxy_%04d%02d%02d_%02d%02d%02d.log", + tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); + logfile = buf; + } + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) { + push_log(std::string("[ERR] socket create failed: ") + strerror(errno)); + return false; + } + int opt = 1; + setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); + + sockaddr_in addr; + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_port = htons(local_port); + + if (::bind(sockfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) { + push_log(std::string("[ERR] bind failed: ") + strerror(errno)); + close(sockfd); + sockfd = -1; + return false; + } + + // 日志头 + { + std::ofstream f(logfile, std::ios::app); + if (f.is_open()) { + f << std::string(80, '=') << "\nUDP代理日志 - 启动时间: " << timestamp_date() + << "\n监听端口: " << local_port << " -> 目标地址: " << target_ip << ":" << target_port + << "\n" << std::string(80, '=') << "\n\n"; + } + } + + running.store(true); + worker = std::thread(&UDPProxy::recv_loop, this); + push_log(std::string("[启动] 监听 ") + std::to_string(local_port) + " -> 转发到 " + + target_ip + ":" + std::to_string(target_port)); + return true; + } + + void stop() { + if (!running.load()) return; + running.store(false); + if (sockfd != -1) { close(sockfd); sockfd = -1; } + if (worker.joinable()) worker.join(); + push_log(std::string("[STOP] 服务端已关闭")); + } + + bool is_running() const { return running.load(); } + + void get_logs(std::vector& out) { + std::lock_guard lk(log_mutex); + out = logs; + } + +private: + int local_port; + std::string target_ip; + int target_port; + int sockfd; + std::atomic running; + std::thread worker; + + std::mutex log_mutex; + std::vector logs; + + std::mutex clients_mutex; + std::map, long long> client_timestamps; + + std::string logfile; + + // 时间函数 + static std::string timestamp_ms() { + using namespace std::chrono; + auto now = system_clock::now(); + auto ms = duration_cast(now.time_since_epoch()) % 1000; + auto t = system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + char buf[64]; + snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%03lld", tm.tm_hour, tm.tm_min, tm.tm_sec, (long long)ms.count()); + return buf; + } + + static std::string timestamp_date() { + auto t = std::time(nullptr); + std::tm tm = *std::localtime(&t); + char buf[64]; + snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d", tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); + return buf; + } + + static std::string to_hex(const uint8_t *buf, size_t len) { + std::ostringstream oss; + oss << std::hex << std::setfill('0'); + for (size_t i = 0; i < len; ++i) oss << std::setw(2) << (int)(buf[i] & 0xFF); + return oss.str(); + } + + void push_log(const std::string &s) { + std::lock_guard lk(log_mutex); + logs.push_back(s); + if (logs.size() > 2000) logs.erase(logs.begin(), logs.begin() + (logs.size() - 2000)); + std::ofstream f(logfile, std::ios::app); + if (f.is_open()) f << s << "\n"; + } + + void push_packet_log(const std::string &direction, double delay, ssize_t len, const std::string &ip, int port, const std::string &hexdata) { + std::ostringstream ss; + ss << timestamp_ms() << " | " << direction << " | 延迟: " << std::fixed << std::setprecision(2) + << delay << "ms | 长度: " << len << "字节 | 地址: " << ip << ":" << port; + push_log(ss.str()); + push_log("原始数据: " + hexdata); + } + + void recv_loop() { + while (running.load()) { + sockaddr_in addr; + socklen_t addrlen = sizeof(addr); + uint8_t buf[65536]; + ssize_t len = recvfrom(sockfd, buf, sizeof(buf), 0, (struct sockaddr*)&addr, &addrlen); + if (len < 0) { + if (!running.load()) break; + push_log(std::string("[ERR] recvfrom failed: ") + strerror(errno)); + continue; + } + + auto t0 = std::chrono::high_resolution_clock::now(); + char ipbuf[64]; + inet_ntop(AF_INET, &addr.sin_addr, ipbuf, sizeof(ipbuf)); + int port = ntohs(addr.sin_port); + bool from_client = (port != target_port); + + if (from_client) { + { + std::lock_guard lk(clients_mutex); + client_timestamps[{ipbuf, port}] = + std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()).count(); + } + + sockaddr_in target{}; + target.sin_family = AF_INET; + inet_pton(AF_INET, target_ip.c_str(), &target.sin_addr); + target.sin_port = htons(target_port); + sendto(sockfd, buf, len, 0, (struct sockaddr*)&target, sizeof(target)); + + auto t1 = std::chrono::high_resolution_clock::now(); + double delay = std::chrono::duration(t1 - t0).count(); + push_packet_log("客户端->服务端", delay, len, ipbuf, port, to_hex(buf, len)); + } else { + std::pair latest; + bool found = false; + { + std::lock_guard lk(clients_mutex); + long long best = 0; + for (auto &kv : client_timestamps) { + if (kv.second > best) { best = kv.second; latest = kv.first; found = true; } + } + } + if (found) { + sockaddr_in dst{}; + dst.sin_family = AF_INET; + inet_pton(AF_INET, latest.first.c_str(), &dst.sin_addr); + dst.sin_port = htons(latest.second); + sendto(sockfd, buf, len, 0, (struct sockaddr*)&dst, sizeof(dst)); + + auto t1 = std::chrono::high_resolution_clock::now(); + double delay = std::chrono::duration(t1 - t0).count(); + push_packet_log("服务端->客户端", delay, len, latest.first, latest.second, to_hex(buf, len)); + } + } + } + } +}; + +static UDPProxy* g_proxy = nullptr; + +extern "C" bool StartPacketProxy() { + if (g_proxy && g_proxy->is_running()) return true; + g_proxy = new UDPProxy(); + return g_proxy->start(); +} + +extern "C" void StopPacketProxy() { + if (g_proxy) { + g_proxy->stop(); + delete g_proxy; + g_proxy = nullptr; + } +} + +extern "C" void GetPacketProxyLogs(std::vector& out) { + if (g_proxy) g_proxy->get_logs(out); +} + + + +///===========抓包结束=========/// +inline void push_log(const string &s) { + std::lock_guard lk(g_log_mutex); + if (g_log_lines.size() >= MAX_LOG_LINES) { + g_log_lines.erase(g_log_lines.begin(), g_log_lines.begin() + (g_log_lines.size() - MAX_LOG_LINES + 1)); + } + g_log_lines.push_back(s); + std::cout << s << std::endl; +} + +static string bytes_to_hex_lower(const uint8_t *buf, size_t len) { + std::ostringstream oss; + oss << std::hex << std::setfill('0'); + for (size_t i = 0; i < len; ++i) { + oss << std::setw(2) << (int)(buf[i] & 0xFF); + } + string s = oss.str(); + std::transform(s.begin(), s.end(), s.begin(), ::tolower); + return s; +} + +static vector hex_to_bytes(const string &hex_in) { + string filtered; + filtered.reserve(hex_in.size()); + for (char c : hex_in) { + if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) filtered.push_back(c); + } + if (filtered.size() % 2 == 1) filtered.insert(filtered.begin(), '0'); + vector out; + out.reserve(filtered.size()/2); + for (size_t i = 0; i + 1 < filtered.size(); i += 2) { + unsigned int byte = 0; + std::stringstream ss; + ss << std::hex << filtered.substr(i,2); + ss >> byte; + out.push_back(static_cast(byte & 0xFF)); + } + return out; +} + +static string current_time_str() { + using namespace std::chrono; + auto now = system_clock::now(); + auto t = system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + char buf[64]; + auto ms = duration_cast(now.time_since_epoch()).count() % 1000; + std::snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%03lld", tm.tm_hour, tm.tm_min, tm.tm_sec, (long long)ms); + return string(buf); +} + + +class GameUDPProxy { +private: + // 成员变量 + int listen_port; + std::string target_host; + int target_port; + std::string log_file; + std::atomic running; // 改为 atomic + int sockfd; + sockaddr_in client_address; + std::thread worker; // 添加线程成员 + + // 响应数据存储 + std::vector> response_data; + size_t response_index; + std::string current_map; + +public: + GameUDPProxy(int listen_port=7788, const std::string &target_host="127.0.0.1", + int target_port=7777, const std::string &log_file="") + : listen_port(listen_port), target_host(target_host), target_port(target_port), + log_file(log_file), running(false), sockfd(-1), response_index(0), current_map("无") + { + // 构造函数中不自动加载数据 + } + + ~GameUDPProxy() { + stop(); + } + + bool start() { + if (running.load()) return true; + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) { + push_log(std::string("[错误] 套接字创建失败: ") + strerror(errno)); + return false; + } + + int opt = 1; + setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); + + sockaddr_in addr; + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_port = htons(listen_port); + + if (::bind(sockfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) { + push_log(std::string("[错误] 绑定失败: ") + strerror(errno)); + close(sockfd); + sockfd = -1; + return false; + } + + running.store(true); + + // 启动日志头 + push_log(repeat_string("=", 80)); + push_log(std::string("UDP代理启动 - 时间: ") + get_current_time()); + push_log(std::string("监听端口: ") + std::to_string(listen_port) + " -> 目标地址: " + target_host + ":" + std::to_string(target_port)); + push_log(std::string("当前地图数据: ") + current_map); + push_log(repeat_string("=", 80)); + push_log("代理服务已启动,等待客户端连接..."); + + // 在新线程中运行 + worker = std::thread(&GameUDPProxy::run, this); + + return true; + } + + void stop() { + running.store(false); + if (sockfd != -1) { + close(sockfd); + sockfd = -1; + } + if (worker.joinable()) { + worker.join(); + } + push_log("代理服务已停止"); + } + + bool is_running() const { + return running.load(); + } + + // 设置地图数据 + bool set_map_data(const std::string& map_choice) { + std::map map_files = { + {"1", "训练场"}, + {"2", "海岛"}, + {"3", "雪地"}, + {"4", "雨林"}, + {"5", "沙漠"} + }; + + if (map_files.find(map_choice) != map_files.end()) { + current_map = map_files[map_choice]; + + // 根据选择设置对应的数据 + const char* log_data = nullptr; + if (map_choice == "1") { + log_data = TRAINING_LOG_DATA; + } else if (map_choice == "2") { + log_data = ISLAND_LOG_DATA; + } else if (map_choice == "3") { + log_data = SNOW_LOG_DATA; + }else if (map_choice == "4") { + log_data = YULINH_LOG_DATA; + }else if (map_choice == "5") { + log_data = SANOP_LOG_DATA; + } + + response_data.clear(); // 清空原有数据 + response_index = 0; + + if (log_data) { + load_response_data_from_string(log_data); + + // 立即在日志中显示地图切换信息 + std::ostringstream ss; + ss << "已切换到地图: " << current_map << " (数据条数: " << response_data.size() << ")"; + push_log(ss.str()); + + return true; + } + } + return false; + } + + std::string get_current_map() const { + return current_map; + } + +private: + // 从字符串加载响应数据 + void load_response_data_from_string(const char* log_content) { + std::istringstream iss(log_content); + std::string line; + + // 解析服务端->客户端的数据 + std::vector lines; + while (std::getline(iss, line)) { + lines.push_back(line); + } + + for (size_t i = 0; i < lines.size(); i++) { + if (lines[i].find("服务端->客户端") != std::string::npos && i + 1 < lines.size()) { + if (lines[i + 1].find("原始数据:") != std::string::npos) { + size_t pos = lines[i + 1].find("原始数据: "); + if (pos != std::string::npos) { + std::string hex_data = lines[i + 1].substr(pos + 10); + // 移除可能的空格 + hex_data.erase(std::remove(hex_data.begin(), hex_data.end(), ' '), hex_data.end()); + + try { + auto bytes = hex_to_bytes(hex_data); + if (!bytes.empty()) { + response_data.push_back(bytes); + } + } catch (...) { + push_log("[错误] 解析十六进制数据失败: " + hex_data); + } + } + } + } + } + } + + // 根据客户端数据获取对应的服务端响应 + std::vector get_response_for_client(const std::vector& client_data) { + if (response_data.empty()) { + // 如果没有预加载的数据,返回默认响应 + return hex_to_bytes("19137909a95516a2a40ba6feb8f8c91c94d7388ee999a66004"); + } + + // 简单策略:轮询返回预加载的响应数据 + response_index = (response_index + 1) % response_data.size(); + return response_data[response_index]; + } + + void run() { + while (running.load()) { + sockaddr_in client_addr; + socklen_t client_len = sizeof(client_addr); + uint8_t buffer[4096]; + + // 设置超时,避免阻塞无法退出 + struct timeval tv; + tv.tv_sec = 1; + tv.tv_usec = 0; + setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); + + ssize_t len = recvfrom(sockfd, buffer, sizeof(buffer), 0, + (struct sockaddr*)&client_addr, &client_len); + + if (len < 0) { + if (!running.load()) break; + if (errno == EAGAIN || errno == EWOULDBLOCK) { + continue; + } + if (errno != EAGAIN && errno != EWOULDBLOCK) { + push_log(std::string("[错误] 接收数据失败: ") + strerror(errno)); + } + continue; + } + + if (len == 0) { + continue; + } + + client_address = client_addr; + + // 记录客户端消息 + std::vector data(buffer, buffer + len); + log_packet("客户端->服务端", 0.24, len, client_addr, data); + + // 处理客户端请求并发送响应 + handle_client_request(data, client_addr); + } + } + + void handle_client_request(const std::vector& client_data, const sockaddr_in& client_addr) { + try { + // 获取对应的服务端响应 + auto response_data_vec = get_response_for_client(client_data); + + // 模拟网络延迟 + std::this_thread::sleep_for(std::chrono::milliseconds(45)); + + // 发送响应 + ssize_t sent = sendto(sockfd, response_data_vec.data(), response_data_vec.size(), 0, + (struct sockaddr*)&client_addr, sizeof(client_addr)); + + if (sent > 0) { + // 记录服务端响应 + log_packet("服务端->客户端", 0.33, response_data_vec.size(), client_addr, response_data_vec); + } else { + push_log(std::string("[错误] 发送响应失败: ") + strerror(errno)); + } + + } catch (const std::exception& e) { + push_log(std::string("[错误] 处理客户端请求失败: ") + e.what()); + } + } + + // 记录数据包日志 + void log_packet(const std::string& direction, double delay, size_t len, + const sockaddr_in& addr, const std::vector& data) { + char ipbuf[64]; + inet_ntop(AF_INET, &addr.sin_addr, ipbuf, sizeof(ipbuf)); + int port = ntohs(addr.sin_port); + + std::ostringstream ss; + ss << current_time_str() << " | " << direction << " | 延迟: " + << std::fixed << std::setprecision(2) << delay << "ms | 长度: " + << len << "字节 | 地址: " << ipbuf << ":" << port; + push_log(ss.str()); + push_log("原始数据: " + bytes_to_hex_lower(data.data(), data.size())); + push_log(repeat_string("-", 60)); + } + + // 获取当前时间字符串(带毫秒) + std::string current_time_str() { + auto now = std::chrono::system_clock::now(); + auto ms = std::chrono::duration_cast( + now.time_since_epoch()) % 1000; + auto t = std::chrono::system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + char buf[64]; + std::snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%03lld", + tm.tm_hour, tm.tm_min, tm.tm_sec, (long long)ms.count()); + return std::string(buf); + } + + // 获取当前日期时间字符串 + std::string get_current_time() { + auto now = std::chrono::system_clock::now(); + std::time_t t = std::chrono::system_clock::to_time_t(now); + std::tm tm = *std::localtime(&t); + char buf[64]; + std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &tm); + return std::string(buf); + } + + // 字符串重复辅助函数 + std::string repeat_string(const std::string& str, int n) { + std::string result; + for (int i = 0; i < n; ++i) { + result += str; + } + return result; + } +}; + +// 全局代理实例 +static GameUDPProxy* g_proxy_server = nullptr; + +// 启动代理服务 +extern "C" bool StartEmbeddedUDPServer() { + if (g_proxy_server && g_proxy_server->is_running()) return true; + + try { + // 如果还没有创建实例,先创建 + if (!g_proxy_server) { + g_proxy_server = new GameUDPProxy(7788, "127.0.0.1", 7777, ""); + } + return g_proxy_server->start(); + } catch (...) { + push_log("[错误] 启动嵌入式服务器异常"); + return false; + } +} + +// 停止代理服务 +extern "C" void StopEmbeddedUDPServer() { + try { + if (g_proxy_server) { + g_proxy_server->stop(); + delete g_proxy_server; + g_proxy_server = nullptr; + } + } catch (...) { + push_log("[错误] 停止嵌入式服务器异常"); + } +} + +// 设置地图数据 +extern "C" bool SetProxyMapData(const std::string& map_choice) { + // 确保代理实例存在 + if (!g_proxy_server) { + g_proxy_server = new GameUDPProxy(7788, "127.0.0.1", 7777, ""); + } + return g_proxy_server->set_map_data(map_choice); +} + +// 获取当前地图 +extern "C" std::string GetProxyCurrentMap() { + if (g_proxy_server) { + return g_proxy_server->get_current_map(); + } + return "无"; +} + +// 获取代理日志 +extern "C" void GetEmbeddedLogs(std::vector& out_lines) { + std::lock_guard lk(g_log_mutex); + out_lines = g_log_lines; +} + + +// ==== Original main.cpp content follows ==== + +// ==================================================== +// 车辆修复专用日志系统 - 独立于现有日志系统 +// ==================================================== + +namespace VehicleFixLog { + static std::vector LogEntries; + static std::mutex LogMutex; + static const int MAX_LOG_ENTRIES = 500; + + // 添加日志 + void AddLog(const std::string& message) { + std::lock_guard lock(LogMutex); + + // 获取当前时间 - 修复编译错误 + time_t now = time(0); + struct tm* tstruct = localtime(&now); + if (tstruct) { + char buf[80]; + strftime(buf, sizeof(buf), "[%H:%M:%S] ", tstruct); + std::string fullMessage = std::string(buf) + message; + LogEntries.push_back(fullMessage); + } else { + LogEntries.push_back(message); + } + + // 限制日志数量 + if (LogEntries.size() > MAX_LOG_ENTRIES) { + LogEntries.erase(LogEntries.begin()); + } + } + + // 清空日志 + void ClearLogs() { + std::lock_guard lock(LogMutex); + LogEntries.clear(); + } + + // 获取日志副本 + std::vector GetLogs() { + std::lock_guard lock(LogMutex); + return LogEntries; + } + + // 获取最近N条日志 + std::vector GetRecentLogs(int count) { + std::lock_guard lock(LogMutex); + if (LogEntries.size() <= count) { + return LogEntries; + } + return std::vector(LogEntries.end() - count, LogEntries.end()); + } +} + +// 车辆修复日志宏 +#define VEHICLE_LOG(...) \ + do { \ + char buffer[512]; \ + snprintf(buffer, sizeof(buffer), __VA_ARGS__); \ + VehicleFixLog::AddLog(buffer); \ + } while(0) + +// 错误处理函数 +void HandleVehicleFixError(const std::string& errorMessage, + SDK::ASTExtraBaseCharacter* Char = nullptr, + SDK::ASTExtraVehicleBase* Vehicle = nullptr) +{ + std::string errorLog = "[错误] "; + errorLog += errorMessage; + + if (Char) { + errorLog += " | 角色: "; + if (Char->PlayerState) { + errorLog += Char->PlayerState->PlayerName.ToString(); + } else { + errorLog += "未知"; + } + } + + if (Vehicle) { + char addrBuffer[20]; + snprintf(addrBuffer, sizeof(addrBuffer), "%p", Vehicle); + errorLog += " | 车辆地址: "; + errorLog += addrBuffer; + } + + VEHICLE_LOG("%s", errorLog.c_str()); +} + +// ==================================================== +// 车辆修复系统数据结构 +// ==================================================== + +struct PlayerInfo +{ + SDK::APlayerState* PS; + std::string Name; + int UID; + SDK::ASTExtraBaseCharacter* Character; + + // --- 车辆信息 --- + bool bInVehicle = false; + SDK::ASTExtraVehicleBase* Vehicle = nullptr; + int VehicleSeatIdx = -1; +}; + +std::vector RegisteredPlayers; + +// 状态跟踪 +std::map LastSeatIndices; +std::map LastVehicles; +std::map PlayerInVehicleState; + +// ==================================================== +// 辅助函数 +// ==================================================== + +// 辅助函数:构建座位Socket名称 +std::string GetSeatSocketName(int SeatIndex) +{ + if (SeatIndex == 0) + return "seat_driver"; + else + return "seat_passenger_" + std::to_string(SeatIndex); +} + +inline std::string GetObjectClassNameEx(UObject* Object) +{ + if (!Object) return "NULL_OBJ"; + if (!Object->ClassPrivate) return "NULL_CLASS"; + + try + { + return Object->ClassPrivate->NamePrivate.GetName(); + } + catch (...) + { + return "ERR"; + } +} + +// ==================================================== +// 玩家管理函数 +// ==================================================== + +void RegisterPlayer(SDK::APlayerState* PS, SDK::ASTExtraBaseCharacter* C) +{ + PlayerInfo info; + info.PS = PS; + info.Name = PS->PlayerName.ToString(); + info.UID = PS->PlayerID; + info.Character = C; + info.Vehicle = C->CurrentVehicle; + info.VehicleSeatIdx = C->VehicleSeatIdx; + info.bInVehicle = (C->CurrentVehicle != nullptr); + + RegisteredPlayers.push_back(info); + + VEHICLE_LOG("[玩家管理] 注册玩家: %s (UID: %d) | 车辆: %s | 座位: %d", + info.Name.c_str(), + info.UID, + info.bInVehicle ? "是" : "否", + info.VehicleSeatIdx); +} + +bool IsHostPlayer(SDK::APlayerState* PS, SDK::UWorld* World) +{ + if (!PS || !World) return false; + + auto* GI = World->OwningGameInstance; + if (!GI || GI->LocalPlayers.Num() == 0) return false; + + auto* LocalPC = GI->LocalPlayers[0]->PlayerController; + if (!LocalPC) return false; + + return PS->Owner == LocalPC; +} + +SDK::ASTExtraBaseCharacter* GetCharacterFromController(SDK::APlayerController* PC) +{ + if (!PC) { + VEHICLE_LOG("[角色获取] 控制器为空指针"); + return nullptr; + } + + static SDK::ASTExtraPlayerController* CachedSTPC = nullptr; + static SDK::ASTExtraBaseCharacter* CachedCharacter = nullptr; + + if (CachedSTPC == PC && CachedCharacter) + return CachedCharacter; + + SDK::ASTExtraPlayerController* STPC = nullptr; + if (PC->IsA(SDK::ASTExtraPlayerController::StaticClass())) + { + STPC = (SDK::ASTExtraPlayerController*)PC; + if (STPC->STExtraBaseCharacter) + { + CachedSTPC = STPC; + CachedCharacter = STPC->STExtraBaseCharacter; + return CachedCharacter; + } + } + + SDK::ASTExtraBaseCharacter* fromUtil = SDK::USTExtraVehicleUtils::GetCharacter(STPC ? STPC : (SDK::ASTExtraPlayerController*)PC); + if (fromUtil) + { + CachedSTPC = STPC; + CachedCharacter = fromUtil; + return fromUtil; + } + + if (PC->Pawn && PC->Pawn->IsA(SDK::ASTExtraBaseCharacter::StaticClass())) + { + CachedSTPC = STPC; + CachedCharacter = (SDK::ASTExtraBaseCharacter*)PC->Pawn; + return CachedCharacter; + } + + return nullptr; +} + +bool IsKnown(SDK::APlayerState* ps) +{ + for (size_t i = 0; i < RegisteredPlayers.size(); i++) + { + if (!RegisteredPlayers[i].PS) + continue; + + if (RegisteredPlayers[i].PS == ps) + return true; + } + return false; +} + +inline float GetLocalTime() +{ + static auto start_time = std::chrono::high_resolution_clock::now(); + auto now = std::chrono::high_resolution_clock::now(); + return std::chrono::duration(now - start_time).count(); +} + +// ==================================================== +// 车辆调试函数 +// ==================================================== + +void DebugVehicleReplication(SDK::ASTExtraVehicleBase* Vehicle) +{ + if (!Vehicle) { + VEHICLE_LOG("[车辆调试] 车辆为空指针"); + return; + } + + VEHICLE_LOG("[车辆调试] 地址: %p | 引擎启动: %d | 反作弊: %d | 座位数量: %d", + Vehicle, + Vehicle->bIsEngineStarted, + Vehicle->bEnableAntiCheat, + (Vehicle->VehicleSeats ? Vehicle->VehicleSeats->SeatOccupiers.Num() : 0)); +} + +// ==================================================== +// 服务端车辆修复逻辑 +// ==================================================== + +void ProcessServerVehicleFix(SDK::ASTExtraPlayerController* STEPC, + SDK::ASTExtraBaseCharacter* Char, + SDK::ASTExtraVehicleBase* State_Vehicle) +{ + if (!STEPC) { + HandleVehicleFixError("STEPC为空指针"); + return; + } + + if (!Char) { + HandleVehicleFixError("角色为空指针"); + return; + } + + if (!State_Vehicle) { + HandleVehicleFixError("车辆为空指针", Char); + return; + } + + if (!STEPC->VehicleUserComp) { + HandleVehicleFixError("VehicleUserComp为空指针", Char, State_Vehicle); + return; + } + + // 确保VehicleUserComp的Character指向正确的角色 + if (!STEPC->VehicleUserComp->Character && Char) + { + STEPC->VehicleUserComp->Character = (SDK::ASTExtraPlayerCharacter*)Char; + VEHICLE_LOG("[服务端修复] 设置VehicleUserComp角色"); + } + + /* // 调试信息:打印当前车辆状态 + VEHICLE_LOG("[服务端修复] 玩家: %s | 车辆状态: %d | 当前座位: %d | 引擎已启动: %d", + Char->PlayerState ? Char->PlayerState->PlayerName.ToString().c_str() : "未知", + (int)STEPC->VehicleUserComp->VehicleUserState, + Char->VehicleSeatIdx, + State_Vehicle->bIsEngineStarted);*/ + + // 主要车辆修复逻辑 + if (STEPC->VehicleUserComp->VehicleUserState == SDK::ESTExtraVehicleUserState::ESTExtraVehicleUserState__EVUS_AsDriver && + State_Vehicle->VehicleSeats && + State_Vehicle->VehicleSeats->SeatOccupiers.Num() > 0) + { + // 检查驾驶员座位是否为空 + SDK::ASTExtraPlayerCharacter* CurrentDriver = State_Vehicle->VehicleSeats->SeatOccupiers[0]; + + if (CurrentDriver == nullptr) + { + // 驾驶员座位为空,执行完整的上车流程 + VEHICLE_LOG("[服务端修复] 驾驶员座位为空,开始修复..."); + + // 1. 请求进入车辆 + STEPC->VehicleUserComp->ReqEnterVehicle(State_Vehicle, SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_DriversSeat); + + // 2. 设置座位占用者 + State_Vehicle->VehicleSeats->SeatOccupiers[0] = (SDK::ASTExtraPlayerCharacter*)Char; + + // 3. 启动车辆引擎并禁用反作弊 + State_Vehicle->bIsEngineStarted = true; + State_Vehicle->bEnableAntiCheat = false; + + // 4. 调用车辆座位附加处理函数 + State_Vehicle->HandleOnSeatAttached( + (SDK::ASTExtraPlayerCharacter*)Char, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_DriversSeat, + 0 + ); + + // 5. 更新角色状态 + Char->ForcePlayerUpdateAnimation(); + Char->VehicleSeatIdx = 0; + Char->bWasOnVehicle = true; + Char->CurrentVehicle = State_Vehicle; + + // 6. 强制网络更新 + Char->ForceNetUpdate(); + State_Vehicle->ForceNetUpdate(); + + VEHICLE_LOG("[服务端修复] 驾驶员座位已修复并占用"); + } + else if (CurrentDriver != (SDK::ASTExtraPlayerCharacter*)Char) + { + // 驾驶员座位已被其他角色占用,处理座位冲突 + VEHICLE_LOG("[服务端修复] 驾驶员座位已被其他玩家占用,尝试寻找空座位..."); + + // 寻找其他空座位 + bool bFoundEmptySeat = false; + for (int seatIdx = 1; seatIdx < State_Vehicle->VehicleSeats->SeatOccupiers.Num(); seatIdx++) + { + if (State_Vehicle->VehicleSeats->SeatOccupiers[seatIdx] == nullptr) + { + // 找到空座位,作为乘客上车 + STEPC->VehicleUserComp->ReqEnterVehicle( + State_Vehicle, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat + ); + + State_Vehicle->VehicleSeats->SeatOccupiers[seatIdx] = (SDK::ASTExtraPlayerCharacter*)Char; + + // 调用乘客座位附加处理 + State_Vehicle->HandleOnSeatAttached( + (SDK::ASTExtraPlayerCharacter*)Char, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat, + seatIdx + ); + + Char->ForcePlayerUpdateAnimation(); + Char->VehicleSeatIdx = seatIdx; + Char->bWasOnVehicle = true; + Char->CurrentVehicle = State_Vehicle; + + Char->ForceNetUpdate(); + State_Vehicle->ForceNetUpdate(); + + VEHICLE_LOG("[服务端修复] 玩家已放置到乘客座位 %d", seatIdx); + bFoundEmptySeat = true; + break; + } + } + + if (!bFoundEmptySeat) + { + VEHICLE_LOG("[服务端修复] 没有可用空座位"); + } + } + else + { + // 当前角色已经是驾驶员,确保状态正确 + Char->CurrentVehicle = State_Vehicle; + Char->bWasOnVehicle = true; + Char->ForceNetUpdate(); + State_Vehicle->ForceNetUpdate(); + VEHICLE_LOG("[服务端修复] 玩家已经是驾驶员,状态已更新"); + } + } + else if (STEPC->VehicleUserComp->VehicleUserState == SDK::ESTExtraVehicleUserState::ESTExtraVehicleUserState__EVUS_ASPassenger && + State_Vehicle->VehicleSeats && + State_Vehicle->VehicleSeats->SeatOccupiers.Num() > 0) + { + // 乘客状态逻辑 + bool bIsInVehicle = false; + int currentSeatIdx = -1; + + // 检查角色是否在车辆座位上 + for (int seatIdx = 0; seatIdx < State_Vehicle->VehicleSeats->SeatOccupiers.Num(); seatIdx++) + { + if (State_Vehicle->VehicleSeats->SeatOccupiers[seatIdx] == (SDK::ASTExtraPlayerCharacter*)Char) + { + bIsInVehicle = true; + currentSeatIdx = seatIdx; + break; + } + } + + if (bIsInVehicle) + { + // 角色在车辆上,确保状态正确 + Char->VehicleSeatIdx = currentSeatIdx; + Char->bWasOnVehicle = true; + Char->CurrentVehicle = State_Vehicle; + Char->ForceNetUpdate(); + VEHICLE_LOG("[服务端修复] 玩家在乘客座位 %d,状态已更新", currentSeatIdx); + } + else + { + // 角色不在车辆上,尝试作为乘客上车 + VEHICLE_LOG("[服务端修复] 玩家不在车辆上,尝试作为乘客上车..."); + for (int seatIdx = 1; seatIdx < State_Vehicle->VehicleSeats->SeatOccupiers.Num(); seatIdx++) + { + if (State_Vehicle->VehicleSeats->SeatOccupiers[seatIdx] == nullptr) + { + STEPC->VehicleUserComp->ReqEnterVehicle( + State_Vehicle, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat + ); + + State_Vehicle->VehicleSeats->SeatOccupiers[seatIdx] = (SDK::ASTExtraPlayerCharacter*)Char; + + State_Vehicle->HandleOnSeatAttached( + (SDK::ASTExtraPlayerCharacter*)Char, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat, + seatIdx + ); + + Char->ForcePlayerUpdateAnimation(); + Char->VehicleSeatIdx = seatIdx; + Char->bWasOnVehicle = true; + Char->CurrentVehicle = State_Vehicle; + + Char->ForceNetUpdate(); + State_Vehicle->ForceNetUpdate(); + + VEHICLE_LOG("[服务端修复] 玩家已作为乘客进入座位 %d", seatIdx); + break; + } + } + } + } + else + { + // 不在车辆上的状态处理 - 修复枚举错误 + VEHICLE_LOG("[服务端修复] 玩家不在车辆上,状态: %d", (int)STEPC->VehicleUserComp->VehicleUserState); + if (Char->CurrentVehicle) + { + // 清理旧车辆座位 + SDK::ASTExtraVehicleBase* OldVehicle = Char->CurrentVehicle; + int OldSeatIdx = Char->VehicleSeatIdx; + + if (OldSeatIdx >= 0 && OldSeatIdx < OldVehicle->VehicleSeats->SeatOccupiers.Num()) + { + if (OldVehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] == (SDK::ASTExtraPlayerCharacter*)Char) + { + OldVehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] = nullptr; + } + } + + Char->CurrentVehicle = nullptr; + Char->VehicleSeatIdx = -1; + Char->bWasOnVehicle = false; + + Char->ForceNetUpdate(); + OldVehicle->ForceNetUpdate(); + + VEHICLE_LOG("[服务端修复] 玩家已从车辆移除"); + } + } +} + +// ==================================================== +// 客户端车辆位置和视角修复 +// ==================================================== + +void ProcessClientVehicleFix(SDK::ASTExtraPlayerController* STEPC, + SDK::ASTExtraBaseCharacter* Char, + SDK::ASTExtraVehicleBase* Vehicle, + int SeatIdx, + bool bIsLocalPlayer) +{ + if (!STEPC) { + HandleVehicleFixError("STEPC为空指针"); + return; + } + + if (!Char) { + HandleVehicleFixError("角色为空指针"); + return; + } + + if (!Vehicle) { + HandleVehicleFixError("车辆为空指针", Char); + return; + } + + bool bIsDriver = (SeatIdx == 0); + + // 只有本地玩家才执行客户端特定的修复 + if (bIsLocalPlayer) + { + VEHICLE_LOG("[客户端修复] 本地玩家 | 座位: %d | 是驾驶员: %s", + SeatIdx, + bIsDriver ? "是" : "否"); + + // 1. 角色位置和附加修复 + if (Vehicle->RootComponent) + { + // 先分离角色(如果已附加) + Char->K2_DetachFromActor( + (SDK::EDetachmentRule)1, + (SDK::EDetachmentRule)1, + (SDK::EDetachmentRule)1); + + // 使用K2_AttachToComponent将角色附加到车辆的根组件 + SDK::FName SocketName = SDK::FName(); + Char->K2_AttachToComponent(Vehicle->RootComponent, SocketName, + (SDK::EAttachmentRule)1, + (SDK::EAttachmentRule)1, + (SDK::EAttachmentRule)1, + false); + + // 设置相对位置和旋转 + SDK::FTransform RelativeTransform; + + // 根据座位设置不同的相对位置 + if (bIsDriver) + { + // 驾驶员位置:使用用户调节的偏移 + RelativeTransform.Translation.X = 驾驶员X偏移; // 前方 + RelativeTransform.Translation.Y = 驾驶员Y偏移; // 中心 + RelativeTransform.Translation.Z = 驾驶员Z偏移; // 高度 + } + else + { + // 乘客位置:根据座位索引调整 + RelativeTransform.Translation.X = 乘客X偏移; // 稍微靠前 + RelativeTransform.Translation.Y = (SeatIdx % 2 == 0 ? 乘客Y偏移 : -乘客Y偏移); // 左右交替 + RelativeTransform.Translation.Z = 乘客Z偏移; // 高度 + } + + // 设置旋转 + RelativeTransform.Rotation.X = 0.0f; + RelativeTransform.Rotation.Y = 0.0f; + RelativeTransform.Rotation.Z = 0.0f; + RelativeTransform.Rotation.W = 1.0f; + + // 缩放 + RelativeTransform.Scale3D.X = 1.0f; + RelativeTransform.Scale3D.Y = 1.0f; + RelativeTransform.Scale3D.Z = 1.0f; + + // 应用相对变换 + SDK::FHitResult SweepHitResult; + Char->K2_SetActorRelativeTransform(RelativeTransform, false, true, &SweepHitResult); + + // 更新座位索引 + Char->VehicleSeatIdx = SeatIdx; + + VEHICLE_LOG("[客户端修复] 角色已附加到车辆,相对位置: (%.1f, %.1f, %.1f)", + RelativeTransform.Translation.X, + RelativeTransform.Translation.Y, + RelativeTransform.Translation.Z); + } + + // 2. 控制权转移 + if (Char->Controller) + { + if (bIsDriver) + { + // 驾驶员:控制权转移给车辆 + Char->Controller->Possess(Vehicle); + + // 设置摄像机跟随车辆 + STEPC->SetViewTargetWithBlend(Vehicle, 0.2f, + (SDK::EViewTargetBlendFunction)0, 0.0f, false); + + VEHICLE_LOG("[客户端修复] 控制权已转移给车辆"); + } + else + { + // 乘客:控制权保持在角色 + Char->Controller->Possess(Char); + + // 设置摄像机跟随角色 + STEPC->SetViewTargetWithBlend(Char, 0.2f, + (SDK::EViewTargetBlendFunction)0, 0.0f, false); + + VEHICLE_LOG("[客户端修复] 控制权保持在角色"); + } + } + + // 3. 视角控制设置 - 修复视角滑动问题 + STEPC->SetIgnoreLookInput(false); // 允许视角滑动 + STEPC->ResetIgnoreLookInput(); // 重置视角输入 + // STEPC->bIgnoreLookInput = false; // 直接设置成员变量 + + // 4. 鼠标控制设置 + STEPC->bShowMouseCursor = false; // 隐藏鼠标光标 + STEPC->bEnableClickEvents = false; // 禁用点击事件 + STEPC->bEnableMouseOverEvents = false; // 禁用鼠标悬停事件 + + VEHICLE_LOG("[客户端修复] 视角控制已启用,鼠标控制已设置"); + } +} + +// ==================================================== +// 客户端下车处理 +// ==================================================== + +void ProcessClientExitVehicle(SDK::ASTExtraPlayerController* STEPC, + SDK::ASTExtraBaseCharacter* Char, + SDK::ASTExtraVehicleBase* OldVehicle, + int OldSeatIdx, + bool bIsLocalPlayer) +{ + if (!STEPC) { + HandleVehicleFixError("STEPC为空指针"); + return; + } + + if (!Char) { + HandleVehicleFixError("角色为空指针"); + return; + } + + // 1. 分离角色 + Char->K2_DetachFromActor( + (SDK::EDetachmentRule)1, + (SDK::EDetachmentRule)1, + (SDK::EDetachmentRule)1); + + VEHICLE_LOG("[客户端修复] 角色已从车辆分离"); + + // 只有本地玩家需要处理控制权和摄像机 + if (bIsLocalPlayer) + { + VEHICLE_LOG("[客户端修复] 本地玩家下车,原座位: %d", OldSeatIdx); + + // 2. 恢复控制权到角色 + if (Char->Controller) + { + Char->Controller->Possess(Char); + + // 3. 设置摄像机跟随角色 + STEPC->SetViewTargetWithBlend(Char, 0.2f, + (SDK::EViewTargetBlendFunction)0, 0.0f, false); + + // 4. 重置视角控制 - 修复下车后视角问题 + STEPC->SetIgnoreLookInput(false); + STEPC->ResetIgnoreLookInput(); + // STEPC->bIgnoreLookInput = false; + + // 5. 重置鼠标控制 + STEPC->bShowMouseCursor = false; + STEPC->bEnableClickEvents = false; + STEPC->bEnableMouseOverEvents = false; + + VEHICLE_LOG("[客户端修复] 控制权已恢复,摄像机已重置"); + } + } + + // 6. 清理座位占用 + if (OldVehicle && OldVehicle->VehicleSeats && + OldSeatIdx >= 0 && OldSeatIdx < OldVehicle->VehicleSeats->SeatOccupiers.Num()) + { + if (OldVehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] == (SDK::ASTExtraPlayerCharacter*)Char) + { + OldVehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] = nullptr; + OldVehicle->ForceNetUpdate(); + VEHICLE_LOG("[客户端修复] 原座位 %d 已清空", OldSeatIdx); + } + } + + // 7. 强制下车请求 + if (STEPC->VehicleUserComp) + { + SDK::FVector ClientVehicleVelocity = {0.0f, 0.0f, 0.0f}; + STEPC->VehicleUserComp->ReqExitVehicle(ClientVehicleVelocity); + VEHICLE_LOG("[客户端修复] 发送下车请求"); + } + + // 8. 更新角色状态 + Char->CurrentVehicle = nullptr; + Char->VehicleSeatIdx = -1; + Char->bWasOnVehicle = false; + Char->ForceNetUpdate(); + + VEHICLE_LOG("[客户端修复] 玩家已完全下车"); +} + +// ==================================================== +// 客户端切换座位处理 +// ==================================================== + +void ProcessClientSwitchSeat(SDK::ASTExtraPlayerController* STEPC, + SDK::ASTExtraBaseCharacter* Char, + SDK::ASTExtraVehicleBase* Vehicle, + int OldSeatIdx, + int NewSeatIdx, + bool bIsLocalPlayer) +{ + if (!STEPC) { + HandleVehicleFixError("STEPC为空指针"); + return; + } + + if (!Char) { + HandleVehicleFixError("角色为空指针"); + return; + } + + if (!Vehicle) { + HandleVehicleFixError("车辆为空指针", Char); + return; + } + + if (!STEPC->VehicleUserComp) { + HandleVehicleFixError("VehicleUserComp为空指针", Char, Vehicle); + return; + } + + VEHICLE_LOG("[客户端修复] 切换座位 从 %d 到 %d", OldSeatIdx, NewSeatIdx); + + // 1. 清理旧座位 + if (OldSeatIdx >= 0 && OldSeatIdx < Vehicle->VehicleSeats->SeatOccupiers.Num()) + { + if (Vehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] == (SDK::ASTExtraPlayerCharacter*)Char) + { + Vehicle->VehicleSeats->SeatOccupiers[OldSeatIdx] = nullptr; + VEHICLE_LOG("[客户端修复] 旧座位 %d 已清空", OldSeatIdx); + } + } + + // 2. 请求进入新座位 + if (NewSeatIdx == 0) + { + // 切换到驾驶员座位 + STEPC->VehicleUserComp->ReqEnterVehicle( + Vehicle, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_DriversSeat + ); + + Vehicle->VehicleSeats->SeatOccupiers[0] = (SDK::ASTExtraPlayerCharacter*)Char; + Vehicle->HandleOnSeatAttached( + (SDK::ASTExtraPlayerCharacter*)Char, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_DriversSeat, + 0 + ); + + VEHICLE_LOG("[客户端修复] 已切换到驾驶员座位"); + } + else + { + // 切换到乘客座位 + STEPC->VehicleUserComp->ReqEnterVehicle( + Vehicle, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat + ); + + Vehicle->VehicleSeats->SeatOccupiers[NewSeatIdx] = (SDK::ASTExtraPlayerCharacter*)Char; + Vehicle->HandleOnSeatAttached( + (SDK::ASTExtraPlayerCharacter*)Char, + SDK::ESTExtraVehicleSeatType::ESTExtraVehicleSeatType__ESeatType_PassengersSeat, + NewSeatIdx + ); + + VEHICLE_LOG("[客户端修复] 已切换到乘客座位 %d", NewSeatIdx); + } + + // 3. 更新角色状态 + Char->VehicleSeatIdx = NewSeatIdx; + Char->CurrentVehicle = Vehicle; + Char->bWasOnVehicle = true; + Char->ForcePlayerUpdateAnimation(); + + // 4. 强制网络更新 + Char->ForceNetUpdate(); + Vehicle->ForceNetUpdate(); + + // 5. 客户端特定的位置和视角修复 + ProcessClientVehicleFix(STEPC, Char, Vehicle, NewSeatIdx, bIsLocalPlayer); + + VEHICLE_LOG("[客户端修复] 座位切换完成"); +} + + +// ==================================================== +// 服务端逻辑 +// ==================================================== + +void ProcessServerLogic(SDK::UWorld* World, SDK::AGameStateBase* GS) +{ + auto& Players = GS->PlayerArray; + + static float LastVehicleFixTime = 0.0f; + float CurrentTime = GetLocalTime(); + if (CurrentTime - LastVehicleFixTime < 1.0f) + return; + LastVehicleFixTime = CurrentTime; + + for (int i = 0; i < Players.Num(); i++) + { + SDK::APlayerState* PS = Players[i]; + if (!PS) continue; + + if (IsHostPlayer(PS, World)) continue; + if (!PS->Owner) continue; + + SDK::ASTExtraPlayerController* STEPC = nullptr; + SDK::APlayerController* PC = (SDK::APlayerController*)PS->Owner; + + if (PS->Owner->IsA(SDK::ASTExtraPlayerController::StaticClass())) + STEPC = (SDK::ASTExtraPlayerController*)PS->Owner; + else if (PC && PC->IsA(SDK::ASTExtraPlayerController::StaticClass())) + STEPC = (SDK::ASTExtraPlayerController*)PC; + if (!STEPC) continue; + + SDK::ASTExtraBaseCharacter* Char = STEPC->STExtraBaseCharacter; + if (!Char) + Char = GetCharacterFromController(PC); + if (!Char) continue; + + // 注册玩家 + if (!IsKnown(PS)) + RegisterPlayer(PS, Char); + + // 服务端车辆修复逻辑 + if (!STEPC->VehicleUserComp) + continue; + + SDK::ASTExtraVehicleBase* State_Vehicle = nullptr; + + if (STEPC->STExtraBaseCharacter && STEPC->STExtraBaseCharacter->CurrentVehicle) + { + State_Vehicle = STEPC->STExtraBaseCharacter->CurrentVehicle; + } + else if (PC->Pawn && PC->Pawn->IsA(SDK::ASTExtraVehicleBase::StaticClass())) + { + State_Vehicle = (SDK::ASTExtraVehicleBase*)PC->Pawn; + } + + if (State_Vehicle) + { + ProcessServerVehicleFix(STEPC, Char, State_Vehicle); + } + } +} + +// ==================================================== +// 客户端逻辑 +// ==================================================== + +void ProcessClientLogic(SDK::UWorld* World, SDK::AGameStateBase* GS) +{ + auto& Players = GS->PlayerArray; + + static float LastClientUpdateTime = 0.0f; + float CurrentTime = GetLocalTime(); + if (CurrentTime - LastClientUpdateTime < 0.1f) + return; + LastClientUpdateTime = CurrentTime; + + // 获取本地玩家控制器 + SDK::APlayerController* LocalPC = SDK::UGameplayStatics::GetPlayerController(World, 0); + if (!LocalPC) return; + + for (int i = 0; i < Players.Num(); i++) + { + SDK::APlayerState* PS = Players[i]; + if (!PS) continue; + + if (!PS->Owner) continue; + + SDK::ASTExtraPlayerController* STEPC = nullptr; + SDK::APlayerController* PC = (SDK::APlayerController*)PS->Owner; + + if (PS->Owner->IsA(SDK::ASTExtraPlayerController::StaticClass())) + STEPC = (SDK::ASTExtraPlayerController*)PS->Owner; + else if (PC && PC->IsA(SDK::ASTExtraPlayerController::StaticClass())) + STEPC = (SDK::ASTExtraPlayerController*)PC; + if (!STEPC) continue; + + SDK::ASTExtraBaseCharacter* Char = STEPC->STExtraBaseCharacter; + if (!Char) + Char = GetCharacterFromController(PC); + if (!Char) continue; + + // 判断是否是本地玩家 + bool bIsLocalPlayer = (PC == LocalPC); + + // 客户端车辆控制逻辑 + if (!STEPC->VehicleUserComp) + continue; + + SDK::ASTExtraVehicleBase* Vehicle = Char->CurrentVehicle; + if (!Vehicle && PC->Pawn && PC->Pawn->IsA(SDK::ASTExtraVehicleBase::StaticClass())) + Vehicle = (SDK::ASTExtraVehicleBase*)PC->Pawn; + + int SeatIdx = Char->VehicleSeatIdx; + int LastSeatIdx = -1; + bool bWasInVehicle = false; + + // 获取上一次的座位索引和车辆状态 + if (LastSeatIndices.find(PC) != LastSeatIndices.end()) + { + LastSeatIdx = LastSeatIndices[PC]; + } + if (PlayerInVehicleState.find(PC) != PlayerInVehicleState.end()) + { + bWasInVehicle = PlayerInVehicleState[PC]; + } + + bool bCurrentlyInVehicle = (Vehicle != nullptr && SeatIdx >= 0); + + // 处理状态变化 + if (bCurrentlyInVehicle) + { + // 角色在车辆上 + if (!bWasInVehicle) + { + // 新上车 + VEHICLE_LOG("[客户端修复] 新上车,座位: %d", SeatIdx); + ProcessClientVehicleFix(STEPC, Char, Vehicle, SeatIdx, bIsLocalPlayer); + } + else if (LastSeatIdx != SeatIdx) + { + // 切换座位 + VEHICLE_LOG("[客户端修复] 切换座位 从 %d 到 %d", LastSeatIdx, SeatIdx); + ProcessClientSwitchSeat(STEPC, Char, Vehicle, LastSeatIdx, SeatIdx, bIsLocalPlayer); + } + else + { + // 保持原座位,修复位置和视角 + ProcessClientVehicleFix(STEPC, Char, Vehicle, SeatIdx, bIsLocalPlayer); + } + } + else if (bWasInVehicle) + { + // 刚下车 + SDK::ASTExtraVehicleBase* LastVehicle = nullptr; + if (LastVehicles.find(PC) != LastVehicles.end()) + { + LastVehicle = LastVehicles[PC]; + } + + VEHICLE_LOG("[客户端修复] 下车,原座位: %d", LastSeatIdx); + ProcessClientExitVehicle(STEPC, Char, LastVehicle, LastSeatIdx, bIsLocalPlayer); + } + + // 更新状态记录 + LastSeatIndices[PC] = SeatIdx; + PlayerInVehicleState[PC] = bCurrentlyInVehicle; + if (Vehicle) + { + LastVehicles[PC] = Vehicle; + } + else + { + // 确保不在车上时清空车辆记录 + if (LastVehicles.find(PC) != LastVehicles.end()) + { + LastVehicles.erase(PC); + } + } + } +} +// ==================================================== +// 主逻辑处理函数 +// ==================================================== + +void ProcessPlayers() +{ + SDK::UWorld* World = GetWorld(); + if (!World) { + VEHICLE_LOG("[主逻辑] 世界为空指针"); + return; + } + + SDK::AGameStateBase* GS = World->GameState; + if (!GS) { + VEHICLE_LOG("[主逻辑] 游戏状态为空指针"); + return; + } + + static int frameCounter = 0; + frameCounter++; + + // 每100帧记录一次状态 + if (frameCounter % 100 == 0) { + VEHICLE_LOG("[系统状态] 处理玩家数量: %d | 已注册玩家: %d", + GS->PlayerArray.Num(), + RegisteredPlayers.size()); + } + + // 获取本地玩家控制器 + SDK::APlayerController* MyController = SDK::UGameplayStatics::GetPlayerController(World, 0); + + if (MyController && MyController->HasAuthority()) { + // 服务端逻辑 + VEHICLE_LOG("[网络模式] 当前运行于: 服务端模式"); + ProcessServerLogic(World, GS); + } else { + // 客户端逻辑:执行服务端和客户端逻辑 + VEHICLE_LOG("[网络模式] 当前运行于: 客户端模式"); + ProcessServerLogic(World, GS); // 客户端也执行服务端逻辑 + ProcessClientLogic(World, GS); // 客户端执行客户端逻辑 + } +} + + + +// ==================== 头文件包含 ==================== +#include +#include +#include +#include +#include +#include +#include + +// ==================== 玩家信息结构体 ==================== +struct SimplePlayerInfo { + SDK::ASTExtraBaseCharacter* PlayerCharacter; +}; + +// ==================== 全局变量 ==================== +static bool bIsTeleporting = false; +static std::string sStatusMessage = ""; +static float fStatusDisplayTime = 0.0f; +static std::mutex g_TeleportMutex; +static std::mutex g_WorldAccessMutex; +static std::atomic s_TeleportCounter(0); + +// ==================== 辅助函数 ==================== + +// 创建零向量 +SDK::FVector MakeZeroVector() { + SDK::FVector vec; + vec.X = 0.0f; + vec.Y = 0.0f; + vec.Z = 0.0f; + return vec; +} + +// 改进的指针有效性检查 +template +bool IsValidPointer(T* ptr) { + if (!ptr) return false; + + // 检查指针是否指向有效地址范围(简化版) + uintptr_t addr = reinterpret_cast(ptr); + + // 基本地址范围检查 + if (addr < 0x10000 || addr > 0xFFFFFFFFFFFFFF00) return false; + + // 检查指针是否对齐(可选) + if (addr % sizeof(void*) != 0) return false; + + return true; +} + +// 检查基础指针(兼容旧代码) +bool IsPointerValid(void* ptr) { + return IsValidPointer(ptr); +} + +// 获取服务端玩家位置 +SDK::FVector GetServerPlayerPositionSafe() { + std::lock_guard lock(g_WorldAccessMutex); + + try { + SDK::UWorld* world = GetWorld(); + if (!IsValidPointer(world)) return MakeZeroVector(); + + // 获取玩家控制器 + SDK::APlayerController* playerCtrl = SDK::UGameplayStatics::GetPlayerController(world, 0); + if (!IsValidPointer(playerCtrl)) return MakeZeroVector(); + + // 检查是否是服务端 + if (!playerCtrl->HasAuthority()) return MakeZeroVector(); + + // 获取角色 + SDK::ASTExtraBaseCharacter* character = nullptr; + if (IsValidPointer(playerCtrl->Pawn)) { + try { + if (playerCtrl->Pawn->IsA(SDK::ASTExtraBaseCharacter::StaticClass())) { + character = static_cast(playerCtrl->Pawn); + } + } catch (...) { + return MakeZeroVector(); + } + } + + if (!IsValidPointer(character)) return MakeZeroVector(); + + // 获取服务端玩家位置 + SDK::FVector result; + try { + result = character->K2_GetActorLocation(); + } catch (...) { + return MakeZeroVector(); + } + + return result; + } catch (...) { + return MakeZeroVector(); + } +} + +// 获取服务端玩家旋转 +SDK::FRotator GetServerPlayerRotationSafe() { + std::lock_guard lock(g_WorldAccessMutex); + + try { + SDK::UWorld* world = GetWorld(); + if (!IsValidPointer(world)) return SDK::FRotator(); + + // 获取玩家控制器 + SDK::APlayerController* playerCtrl = SDK::UGameplayStatics::GetPlayerController(world, 0); + if (!IsValidPointer(playerCtrl)) return SDK::FRotator(); + + // 检查是否是服务端 + if (!playerCtrl->HasAuthority()) return SDK::FRotator(); + + // 获取角色 + SDK::ASTExtraBaseCharacter* character = nullptr; + if (IsValidPointer(playerCtrl->Pawn)) { + try { + if (playerCtrl->Pawn->IsA(SDK::ASTExtraBaseCharacter::StaticClass())) { + character = static_cast(playerCtrl->Pawn); + } + } catch (...) { + return SDK::FRotator(); + } + } + + if (!IsValidPointer(character)) return SDK::FRotator(); + + // 获取服务端玩家旋转 + SDK::FRotator result; + try { + result = character->K2_GetActorRotation(); + } catch (...) { + return SDK::FRotator(); + } + + return result; + } catch (...) { + return SDK::FRotator(); + } +} + +// 修复的获取所有玩家角色的函数(不跳过任何玩家) +SDK::ASTExtraBaseCharacter* GetAllPlayerCharacter(SDK::APlayerState* playerState) { + if (!IsValidPointer(playerState)) return nullptr; + + try { + // 获取玩家控制器 + SDK::APlayerController* playerCtrl = nullptr; + if (IsValidPointer(playerState->Owner)) { + try { + if (playerState->Owner->IsA(SDK::APlayerController::StaticClass())) { + playerCtrl = static_cast(playerState->Owner); + } + } catch (...) { + return nullptr; + } + } + + if (!IsValidPointer(playerCtrl)) return nullptr; + + // 获取角色 + SDK::ASTExtraBaseCharacter* character = nullptr; + if (IsValidPointer(playerCtrl->Pawn)) { + try { + if (playerCtrl->Pawn->IsA(SDK::ASTExtraBaseCharacter::StaticClass())) { + character = static_cast(playerCtrl->Pawn); + } + } catch (...) { + return nullptr; + } + } + + if (!IsValidPointer(character)) return nullptr; + + return character; + } catch (...) { + return nullptr; + } +} + +// 安全的获取所有玩家列表副本(包括服务端和客户端) +std::vector GetAllPlayersList() { + std::vector safeList; + std::lock_guard lock(g_WorldAccessMutex); + + try { + SDK::UWorld* world = GetWorld(); + if (!IsValidPointer(world)) return safeList; + + SDK::AGameStateBase* gameState = world->GameState; + if (!IsValidPointer(gameState)) return safeList; + + int playerCount = 0; + try { + playerCount = gameState->PlayerArray.Num(); + } catch (...) { + return safeList; + } + + safeList.reserve(playerCount); + + // 获取当前玩家的控制器,用于判断是否是服务端 + SDK::APlayerController* myCtrl = SDK::UGameplayStatics::GetPlayerController(world, 0); + bool isServer = IsValidPointer(myCtrl) && myCtrl->HasAuthority(); + + for (int i = 0; i < playerCount; i++) { + try { + SDK::APlayerState* playerState = gameState->PlayerArray[i]; + if (!IsValidPointer(playerState)) continue; + + SDK::ASTExtraBaseCharacter* character = GetAllPlayerCharacter(playerState); + if (!IsValidPointer(character)) continue; + + // 如果是服务端,不要传送自己(可以跳过自己的角色) + if (isServer) { + // 检查这个角色是否属于当前玩家 + SDK::APlayerController* charCtrl = SDK::UGameplayStatics::GetPlayerController(world, i); + if (IsValidPointer(charCtrl) && charCtrl == myCtrl) { + // 跳过当前玩家自己的角色 + continue; + } + } + + SimplePlayerInfo info; + info.PlayerCharacter = character; + safeList.push_back(info); + } catch (...) { + continue; + } + } + } catch (...) { + safeList.clear(); + } + + return safeList; +} + +// 获取可传送的玩家列表(非服务端玩家) +std::vector GetSafePlayerList() { + std::vector safeList; + std::lock_guard lock(g_WorldAccessMutex); + + try { + SDK::UWorld* world = GetWorld(); + if (!IsValidPointer(world)) return safeList; + + SDK::AGameStateBase* gameState = world->GameState; + if (!IsValidPointer(gameState)) return safeList; + + // 获取当前玩家的控制器,判断是否是服务端 + SDK::APlayerController* myCtrl = SDK::UGameplayStatics::GetPlayerController(world, 0); + bool isServer = IsValidPointer(myCtrl) && myCtrl->HasAuthority(); + + // 如果是客户端,则不能传送任何人 + if (!isServer) { + return safeList; + } + + int playerCount = 0; + try { + playerCount = gameState->PlayerArray.Num(); + } catch (...) { + return safeList; + } + + safeList.reserve(playerCount); + + for (int i = 0; i < playerCount; i++) { + try { + SDK::APlayerState* playerState = gameState->PlayerArray[i]; + if (!IsValidPointer(playerState)) continue; + + SDK::ASTExtraBaseCharacter* character = GetAllPlayerCharacter(playerState); + if (!IsValidPointer(character)) continue; + + // 检查这个角色是否属于当前服务端玩家 + SDK::APlayerController* charCtrl = SDK::UGameplayStatics::GetPlayerController(world, i); + if (IsValidPointer(charCtrl) && charCtrl == myCtrl) { + // 跳过服务端玩家自己的角色 + continue; + } + + SimplePlayerInfo info; + info.PlayerCharacter = character; + safeList.push_back(info); + } catch (...) { + continue; + } + } + } catch (...) { + safeList.clear(); + } + + return safeList; +} + +// 安全的传送单个玩家 +bool SafeTeleportPlayerDelayed(SDK::ASTExtraBaseCharacter* playerChar, SDK::FVector targetPos, SDK::FRotator targetRot) { + if (!IsValidPointer(playerChar)) return false; + + int currentCount = s_TeleportCounter.fetch_add(1); + + if (currentCount % 5 == 0) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + + try { + // 尝试获取当前角色位置(确认角色可访问) + SDK::FVector currentPos; + try { + currentPos = playerChar->K2_GetActorLocation(); + } catch (...) { + return false; + } + + // 设置新位置(分步进行以避免碰撞) + SDK::FVector safePos = targetPos; + safePos.Z += 200.0f; + + try { + playerChar->K2_SetActorLocation(safePos, false, false, nullptr); + } catch (...) { + return false; + } + + std::this_thread::sleep_for(std::chrono::microseconds(500)); + + // 设置最终位置 + try { + playerChar->K2_SetActorLocation(targetPos, false, false, nullptr); + playerChar->K2_SetActorRotation(targetRot, false); + } catch (...) { + return false; + } + + return true; + } catch (...) { + return false; + } +} + +// 兼容旧版本的传送函数 +bool SafeTeleportPlayer(SDK::ASTExtraBaseCharacter* playerChar, SDK::FVector targetPos, SDK::FRotator targetRot) { + return SafeTeleportPlayerDelayed(playerChar, targetPos, targetRot); +} + +// ==================== 主功能函数 ==================== + +// 初始化传送系统 +void InitializeTeleportSystem() { + std::lock_guard lock1(g_TeleportMutex); + std::lock_guard lock2(g_WorldAccessMutex); + + bIsTeleporting = false; + sStatusMessage = ""; + fStatusDisplayTime = 0.0f; + s_TeleportCounter.store(0); +} + +// 清理传送系统 +void CleanupTeleportSystem() { + std::lock_guard lock1(g_TeleportMutex); + std::lock_guard lock2(g_WorldAccessMutex); + + bIsTeleporting = false; + s_TeleportCounter.store(0); + sStatusMessage = ""; +} + +// 一键传送所有玩家 +void SafeTeleportAllPlayers() { + if (bIsTeleporting) { + sStatusMessage = "传送已在执行中,请等待..."; + fStatusDisplayTime = ImGui::GetTime(); + return; + } + + static std::mutex executionMutex; + if (!executionMutex.try_lock()) { + sStatusMessage = "传送已在执行中..."; + fStatusDisplayTime = ImGui::GetTime(); + return; + } + + std::lock_guard lock(executionMutex, std::adopt_lock); + bIsTeleporting = true; + s_TeleportCounter.store(0); + + sStatusMessage = "开始传送玩家..."; + fStatusDisplayTime = ImGui::GetTime(); + + auto startTime = std::chrono::steady_clock::now(); + + try { + SDK::FVector serverPos = GetServerPlayerPositionSafe(); + SDK::FRotator serverRot = GetServerPlayerRotationSafe(); + + auto currentTime = std::chrono::steady_clock::now(); + auto elapsedMs = std::chrono::duration_cast(currentTime - startTime).count(); + if (elapsedMs > 5000) { + sStatusMessage = "错误: 获取服务端位置超时"; + bIsTeleporting = false; + return; + } + + if (serverPos.X == 0.0f && serverPos.Y == 0.0f && serverPos.Z == 0.0f) { + sStatusMessage = "错误: 无法获取服务端位置"; + bIsTeleporting = false; + return; + } + + sStatusMessage = "正在获取玩家列表..."; + fStatusDisplayTime = ImGui::GetTime(); + + // 使用新的函数获取可传送的玩家列表 + std::vector playerList = GetSafePlayerList(); + + currentTime = std::chrono::steady_clock::now(); + elapsedMs = std::chrono::duration_cast(currentTime - startTime).count(); + if (elapsedMs > 10000) { + sStatusMessage = "错误: 获取玩家列表超时"; + bIsTeleporting = false; + return; + } + + if (playerList.empty()) { + sStatusMessage = "没有找到可传送的玩家"; + bIsTeleporting = false; + return; + } + + int teleportedCount = 0; + int totalPlayers = static_cast(playerList.size()); + + sStatusMessage = "开始传送 " + std::to_string(totalPlayers) + " 名玩家..."; + fStatusDisplayTime = ImGui::GetTime(); + + for (int i = 0; i < totalPlayers; i++) { + if (i % 10 == 0) { + currentTime = std::chrono::steady_clock::now(); + elapsedMs = std::chrono::duration_cast(currentTime - startTime).count(); + if (elapsedMs > 30000) { + sStatusMessage = "警告: 传送超时,已传送 " + std::to_string(teleportedCount) + "/" + std::to_string(totalPlayers); + break; + } + } + + SimplePlayerInfo& info = playerList[i]; + + if (!IsValidPointer(info.PlayerCharacter)) continue; + + SDK::FVector finalPos = serverPos; + finalPos.X += (teleportedCount % 5) * 300.0f; + finalPos.Y += (teleportedCount / 5) * 300.0f; + finalPos.Z += 150.0f; + + if (SafeTeleportPlayerDelayed(info.PlayerCharacter, finalPos, serverRot)) { + teleportedCount++; + + if (teleportedCount % 10 == 0 || teleportedCount == totalPlayers) { + sStatusMessage = "已传送: " + std::to_string(teleportedCount) + + "/" + std::to_string(totalPlayers); + fStatusDisplayTime = ImGui::GetTime(); + + std::this_thread::sleep_for(std::chrono::milliseconds(20)); + std::this_thread::yield(); + } + } + } + + sStatusMessage = "传送完成: " + std::to_string(teleportedCount) + + "/" + std::to_string(totalPlayers) + " 名玩家"; + + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } catch (...) { + sStatusMessage = "传送过程中发生严重错误"; + } + + fStatusDisplayTime = ImGui::GetTime(); + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + bIsTeleporting = false; +} + + +void ApplyStableActorConfig(SDK::AActor* Actor) +{ + if (!Actor) + { + return; + } + + + if (Actor->bActorIsBeingDestroyed) + { + return; + } + + if (Actor->Role != static_cast(3)) + { + + return; + } + + if (!Actor->HasAuthority()) + { + return; + } + + if (Actor->GetGameTimeSinceCreation() < 0.1f) + { + return; + } + + bool isPlayerState = Actor->IsA(SDK::APlayerState::StaticClass()); + bool isController = Actor->IsA(SDK::AController::StaticClass()); + + if (!isPlayerState && !isController) + { + return; + } + + Actor->bReplicates = true; + Actor->bReplicateMovement = true; + + Actor->Role = static_cast(3); + Actor->RemoteRole = static_cast(1); + + Actor->NetUpdateFrequency = 100.f; + Actor->MinNetUpdateFrequency = 30.f; + + Actor->NetDormancy = static_cast(3); + + Actor->bAlwaysRelevant = true; + + Actor->bOnlyRelevantToOwner = false; + Actor->bNetUseOwnerRelevancy = false; + Actor->NetCullDistanceSquared = 900000000; + + Actor->bAllowTickBeforeBeginPlay = true; + + Actor->bActorEnableCollision = true; + Actor->bHidden = false; + + Actor->SetLifeSpan(0.0f); + Actor->bAutoDestroyWhenFinished = false; + + // Tick + Actor->SetActorTickEnabled(true); + Actor->SetActorTickInterval(0.0f); + Actor->SetTickableWhenPaused(true); + + Actor->FlushNetDormancy(); + Actor->ForceNetUpdate(); + + // 时间 + Actor->CustomTimeDilation = 1.0f; + +} +void ApplyStableConfigToWorld(SDK::UWorld* World) +{ + if (!World) + return; + + if (World->PersistentLevel) + { + auto Actors = getActors(); + + for (int i = 0; i < Actors.size(); i++) + { + SDK::AActor* Actor = Actors[i]; + if (!Actor) continue; + ApplyStableActorConfig(Actor); + } + } + +} + +struct ServerInfo { + std::string name; + std::string ipPort; + int ping = -1; + int64_t lastPingTime = 0; +}; + +static std::vector g_Servers; + +//日志 +static void log_to_file(const char* fmt, ...) { + static int fd = -1; + if (fd == -1) + fd = open("/sdcard/Android/logs.txt", O_WRONLY | O_CREAT | O_APPEND, 0666); + if (fd < 0) return; + char buf[2048]; + va_list ap; + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + strcat(buf, "\n"); + write(fd, buf, strlen(buf)); + fsync(fd); +} + + + +void FetchServerListFromUrl() { + const char* filePath = "/sdcard/Download/server.txt"; + FILE* file = fopen(filePath, "r"); + + // 如果文件不存在,则创建文件并写入示例内容 + if (!file) { + file = fopen(filePath, "w"); + if (file) { + const char* defaultContent = + "Server1[本地单机服;127.0.0.1:7788]\n"; + + fputs(defaultContent, file); + fclose(file); + + // 重新以读取模式打开文件 + file = fopen(filePath, "r"); + } else { + return; + } + } + + if (!file) { + return; + } + + g_Servers.clear(); + + // 检查文件是否为空 + fseek(file, 0, SEEK_END); + long fileSize = ftell(file); + fseek(file, 0, SEEK_SET); + + if (fileSize == 0) { + fclose(file); + return; + } + + // 读取文件内容 + char line[256]; + + while (fgets(line, sizeof(line), file)) { + std::string lineStr(line); + + // 移除行尾的换行符 + if (!lineStr.empty() && lineStr.back() == '\n') { + lineStr.pop_back(); + } + + // 跳过空行 + if (lineStr.empty()) { + continue; + } + + // 使用英文字符替代中文字符进行解析 + // 查找 [ 和 ] 的位置 + size_t startBracket = lineStr.find('['); + size_t endBracket = lineStr.find(']'); + size_t separator = lineStr.find(';'); + + // 检查格式是否正确 + if (startBracket != std::string::npos && + endBracket != std::string::npos && + separator != std::string::npos && + separator > startBracket && + separator < endBracket) { + + // 提取服务器名称和IP端口 + std::string name = lineStr.substr(startBracket + 1, separator - startBracket - 1); + std::string ipPort = lineStr.substr(separator + 1, endBracket - separator - 1); + + // 添加到服务器列表 + g_Servers.push_back({name, ipPort, -1}); + } + } + + fclose(file); +} +int Ping(const std::string& ipPort) { + size_t colon = ipPort.find(':'); + if (colon == std::string::npos) return -1; + std::string host = ipPort.substr(0, colon); + int port = std::stoi(ipPort.substr(colon + 1)); + + int sock = socket(AF_INET, SOCK_STREAM, 0); + if (sock < 0) return -1; + + struct sockaddr_in addr {}; + addr.sin_family = AF_INET; + addr.sin_port = htons(port); + if (inet_pton(AF_INET, host.c_str(), &addr.sin_addr) <= 0) { + close(sock); return -1; + } + + fcntl(sock, F_SETFL, O_NONBLOCK); + auto t0 = std::chrono::steady_clock::now(); + connect(sock, (sockaddr*)&addr, sizeof(addr)); + + fd_set wfds; FD_ZERO(&wfds); FD_SET(sock, &wfds); + struct timeval tv {1, 500000}; + int ret = select(sock + 1, nullptr, &wfds, nullptr, &tv); + auto t1 = std::chrono::steady_clock::now(); + close(sock); + + int ms = (ret > 0) ? (int)std::chrono::duration_cast(t1 - t0).count() : -1; + log_to_file("[Ping] %s -> %d ms", ipPort.c_str(), ms); + return ms; +} + + + +// [NEW] 关卡管理相关变量 +std::vector g_LevelStreamingList; +int g_SelectedLevelIndex = -1; + +// [NEW] 刷新所有 ULevelStreaming 对象列表 +void RefreshLevelStreamingList() { + g_LevelStreamingList.clear(); + auto objs = UObject::GetGlobalObjects(); + for (int i = 0; i < objs.Num(); i++) { + auto obj = objs.GetByIndex(i); + if (!IsPtrValid(obj)) continue; + if (obj->IsA(ULevelStreaming::StaticClass())) { + g_LevelStreamingList.push_back((ULevelStreaming*)obj); + } + } + g_SelectedLevelIndex = -1; +} + +// [NEW] 隐藏选中的关卡(仅不可见) +void HideSelectedLevel() { + if (g_SelectedLevelIndex >= 0 && g_SelectedLevelIndex < (int)g_LevelStreamingList.size()) { + auto level = g_LevelStreamingList[g_SelectedLevelIndex]; + if (level) { + level->bShouldBeVisible = false; + } + } +} + +// [NEW] 移除选中的关卡(卸载) +void UnloadSelectedLevel() { + if (g_SelectedLevelIndex >= 0 && g_SelectedLevelIndex < (int)g_LevelStreamingList.size()) { + auto level = g_LevelStreamingList[g_SelectedLevelIndex]; + if (level) { + level->bShouldBeLoaded = false; + level->bShouldBeVisible = false; + } + } +} + +// [NEW] 恢复选中的关卡(重新加载并显示) +void RestoreSelectedLevel() { + if (g_SelectedLevelIndex >= 0 && g_SelectedLevelIndex < (int)g_LevelStreamingList.size()) { + auto level = g_LevelStreamingList[g_SelectedLevelIndex]; + if (level) { + level->bShouldBeLoaded = true; + level->bShouldBeVisible = true; + } + } +} + + // [NEW] 一键隐藏所有关卡(仅不可见) +void HideAllLevels() { + for (auto level : g_LevelStreamingList) { + if (level) { + level->bShouldBeVisible = false; + } + } +} + +// [NEW] 一键显示所有关卡(恢复可见,同时确保已加载) +void ShowAllLevels() { + for (auto level : g_LevelStreamingList) { + if (level) { + level->bShouldBeLoaded = true; + level->bShouldBeVisible = true; + } + } +} + +// [NEW] 随机隐藏一半关卡(使用 rand 实现) +void HideHalfLevels() { + if (g_LevelStreamingList.empty()) return; + + int total = (int)g_LevelStreamingList.size(); + int toHide = total / 2; // 向下取整 + if (toHide == 0) return; + + // 生成索引列表 + std::vector indices(total); + for (int i = 0; i < total; ++i) indices[i] = i; + + // 播种随机数(只播种一次) + static bool seeded = false; + if (!seeded) { + std::srand(static_cast(std::time(nullptr))); + seeded = true; + } + + // Fisher-Yates 洗牌 + for (int i = total - 1; i > 0; --i) { + int j = std::rand() % (i + 1); + std::swap(indices[i], indices[j]); + } + + // 隐藏前 toHide 个 + for (int i = 0; i < toHide; ++i) { + auto level = g_LevelStreamingList[indices[i]]; + if (level) { + level->bShouldBeVisible = false; + } + } +} + +struct 探测到的建筑 { + std::string 名称; + std::string 路径; + UClass* 类指针; +}; + +inline UClass* 缓存的建筑类 = nullptr; +inline bool 建筑线程运行 = false; +inline std::thread 建筑生成线程; + +static std::vector<探测到的建筑> 建筑列表; +static int 当前选中建筑索引 = -1; + +std::string 获取对象路径(UObject* Obj) +{ + if (!Obj) return ""; + return Obj->GetFullName(); +} + +void 探测并添加附近建筑(float Radius) +{ + 获取对象(); + if (!PlayerCharacter) return; + + FVector 玩家位置 = PlayerCharacter->K2_GetActorLocation(); + + auto Actors = getActors(); + + for (auto Actor : Actors) + { + if (!Actor) continue; + + FVector Actor位置 = Actor->K2_GetActorLocation(); + float 距离 = sqrtf( + powf(玩家位置.X - Actor位置.X, 2) + + powf(玩家位置.Y - Actor位置.Y, 2) + + powf(玩家位置.Z - Actor位置.Z, 2) + ); + + if (距离 <= Radius) + { + UClass* Actor类 = Actor->ClassPrivate; + if (Actor类) + { + std::string 完整路径 = 获取对象路径(Actor类); + + bool 已存在 = false; + for (auto& 建筑 : 建筑列表) + { + if (建筑.路径 == 完整路径) + { + 已存在 = true; + break; + } + } + + if (!已存在) + { + 探测到的建筑 新建筑; + 新建筑.名称 = Actor->GetName(); + 新建筑.路径 = 完整路径; + 新建筑.类指针 = Actor类; + 建筑列表.push_back(新建筑); + } + } + } + } +} + +void 清空建筑列表() +{ + 建筑列表.clear(); + 当前选中建筑索引 = -1; +} + +void 加载选中的建筑() +{ + if (当前选中建筑索引 >= 0 && 当前选中建筑索引 < (int)建筑列表.size()) + { + 缓存的建筑类 = 建筑列表[当前选中建筑索引].类指针; + } +} + +void 扫描所有蓝图类() +{ + 建筑列表.clear(); + + FUObjectArray* ObjectArray = UObject::GUObjectArray; + if (!ObjectArray) return; + + for (int i = 0; i < ObjectArray->ObjObjects.Num(); i++) + { + UObject* Obj = ObjectArray->ObjObjects.GetByIndex(i); + if (!Obj) continue; + + if (!Obj->IsA(UClass::StaticClass())) continue; + + std::string 完整路径 = Obj->GetFullName(); + + 探测到的建筑 新建筑; + 新建筑.名称 = Obj->GetName(); + 新建筑.路径 = 完整路径; + 新建筑.类指针 = (UClass*)Obj; + 建筑列表.push_back(新建筑); + } +} + +UClass* 探测附近建筑类(float Radius) +{ + 获取对象(); + if (!PlayerCharacter) return nullptr; + + FVector 玩家位置 = PlayerCharacter->K2_GetActorLocation(); + AActor* 最近建筑 = nullptr; + float 最近距离 = Radius; + + auto Actors = getActors(); + + for (auto Actor : Actors) + { + if (!Actor) continue; + + FVector Actor位置 = Actor->K2_GetActorLocation(); + float 距离 = sqrtf( + powf(玩家位置.X - Actor位置.X, 2) + + powf(玩家位置.Y - Actor位置.Y, 2) + + powf(玩家位置.Z - Actor位置.Z, 2) + ); + + if (距离 <= 最近距离) + { + 最近距离 = 距离; + 最近建筑 = Actor; + } + } + + if (最近建筑) + { + return 最近建筑->ClassPrivate; + } + + return nullptr; +} + +AActor* 生成建筑(UClass* 建筑类, const FVector& 位置) +{ + if (!建筑类) return nullptr; + + FTransform 生成变换; + 生成变换.Translation = 位置; + 生成变换.Rotation = FQuat{0, 0, 0, 1}; + 生成变换.Scale3D = FVector{1, 1, 1}; + + return UGameplayStatics::BeginDeferredActorSpawnFromClass( + GetWorld(), + 建筑类, + 生成变换, + ESpawnActorCollisionHandlingMethod::ESpawnActorCollisionHandlingMethod__AlwaysSpawn, + nullptr + ); +} + +void 在玩家前方生成建筑(UClass* 建筑类) +{ + 获取对象(); + if (!建筑类 || !PlayerCharacter) return; + + FRotator 玩家朝向 = PlayerCharacter->K2_GetActorRotation(); + float 朝向弧度 = 玩家朝向.Yaw * 3.14159f / 180.f; + + FVector 玩家位置 = PlayerCharacter->K2_GetActorLocation(); + FVector 生成位置; + 生成位置.X = 玩家位置.X + cosf(朝向弧度) * 建筑生成偏移; + 生成位置.Y = 玩家位置.Y + sinf(朝向弧度) * 建筑生成偏移; + 生成位置.Z = 玩家位置.Z; + + 生成建筑(建筑类, 生成位置); +} + +UClass* 通过路径加载建筑类(const char* 路径) +{ + if (!路径 || strlen(路径) == 0) return nullptr; + + return UObject::FindClass(std::string(路径)); +} + +void 建筑生成循环() +{ + while (建筑线程运行) + { + if (建筑跟随模式 && 缓存的建筑类) + { + 在玩家前方生成建筑(缓存的建筑类); + } + std::this_thread::sleep_for(std::chrono::milliseconds(150)); + } +} + +void 启动建筑线程() +{ + if (建筑线程运行) return; + 建筑线程运行 = true; + 建筑生成线程 = std::thread(建筑生成循环); +} + +void 停止建筑线程() +{ + 建筑线程运行 = false; + if (建筑生成线程.joinable()) + { + 建筑生成线程.join(); + } +} + +void 执行单次生成() +{ + if (缓存的建筑类) + { + 在玩家前方生成建筑(缓存的建筑类); + } +} + +void 更新建筑跟随状态() +{ + if (建筑跟随模式) + { + if (!建筑线程运行) + { + 启动建筑线程(); + } + } + else + { + if (建筑线程运行) + { + 停止建筑线程(); + } + } +} \ No newline at end of file