mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 20:03:17 +08:00
feat(recovery): Enable All DLC Vehicles (#62)
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
#include "core/commands/BoolCommand.hpp"
|
||||
#include "game/backend/ScriptPatches.hpp"
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class DLCVehicles : public BoolCommand
|
||||
{
|
||||
using BoolCommand::BoolCommand;
|
||||
|
||||
ScriptPatch m_VehiclePOSIXPatch{};
|
||||
ScriptPatch m_GetVehiclePricePatch{};
|
||||
ScriptPatch m_BuyVehiclePatch{};
|
||||
|
||||
virtual void OnEnable() override
|
||||
{
|
||||
if (!m_VehiclePOSIXPatch)
|
||||
{
|
||||
m_VehiclePOSIXPatch = ScriptPatches::AddPatch("appinternet"_J, "59 ? ? 72 2E 02 01", 0, {0x2B, 0x00, 0x00});
|
||||
}
|
||||
m_VehiclePOSIXPatch->Enable();
|
||||
|
||||
if (!m_GetVehiclePricePatch)
|
||||
{
|
||||
m_GetVehiclePricePatch = ScriptPatches::AddPatch("appinternet"_J, "56 ? ? 70 2E 04 01 38 01", 0, {0x55});
|
||||
}
|
||||
m_GetVehiclePricePatch->Enable();
|
||||
|
||||
if (!m_BuyVehiclePatch)
|
||||
{
|
||||
m_BuyVehiclePatch = ScriptPatches::AddPatch("appinternet"_J, "5D ? ? ? 06 56 ? ? 38 00 25 ? 50", 5, {0x55});
|
||||
}
|
||||
m_BuyVehiclePatch->Enable();
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
if (m_VehiclePOSIXPatch)
|
||||
{
|
||||
m_VehiclePOSIXPatch->Disable();
|
||||
}
|
||||
|
||||
if (m_GetVehiclePricePatch)
|
||||
{
|
||||
m_GetVehiclePricePatch->Disable();
|
||||
}
|
||||
|
||||
if (m_BuyVehiclePatch)
|
||||
{
|
||||
m_BuyVehiclePatch->Disable();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static DLCVehicles _DLCVehicles{"dlcvehicles", "Enable All DLC Vehicles", "Enables all the DLC vehicles on websites."};
|
||||
}
|
||||
@@ -11,6 +11,8 @@ namespace YimMenu::Submenus
|
||||
auto shopping = std::make_shared<Category>("Shopping");
|
||||
auto vehiclesGroup = std::make_shared<Group>("Vehicles");
|
||||
|
||||
vehiclesGroup->AddItem(std::make_shared<BoolCommandItem>("dlcvehicles"_J));
|
||||
|
||||
vehiclesGroup->AddItem(std::make_unique<ImGuiItem>([] {
|
||||
if (ImGui::Button("Save This Vehicle as Personal Vehicle"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user