mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-08 18:33:37 +08:00
feat(Network): Region Switcher (#580)
This commit is contained in:
parent
6c65b534ec
commit
65493fc5cb
21
src/core/data/region_codes.hpp
Normal file
21
src/core/data/region_codes.hpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
struct RegionType {
|
||||||
|
uint32_t id;
|
||||||
|
const char name[22];
|
||||||
|
};
|
||||||
|
|
||||||
|
const RegionType regions[] = {
|
||||||
|
{ 0, "CIS" },
|
||||||
|
{ 1, "Africa" },
|
||||||
|
{ 2, "East" },
|
||||||
|
{ 3, "Europe" },
|
||||||
|
{ 4, "China" },
|
||||||
|
{ 5, "Australia" },
|
||||||
|
{ 6, "West" },
|
||||||
|
{ 7, "Japan" },
|
||||||
|
{ 8, "Unknown" },
|
||||||
|
};
|
||||||
|
}
|
@ -14,6 +14,11 @@ namespace big
|
|||||||
m_resolution_y = ptr.add(4).rip().as<int*>();
|
m_resolution_y = ptr.add(4).rip().as<int*>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
main_batch.add("RC", "40 32 ED 83 25", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_region_code = ptr.add(5).rip().add(1).as<uint32_t*>();
|
||||||
|
});
|
||||||
|
|
||||||
// Max Wanted Level
|
// Max Wanted Level
|
||||||
main_batch.add("MWL", "8B 43 6C 89 05", [this](memory::handle ptr)
|
main_batch.add("MWL", "8B 43 6C 89 05", [this](memory::handle ptr)
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,8 @@ namespace big
|
|||||||
int* m_resolution_x;
|
int* m_resolution_x;
|
||||||
int* m_resolution_y;
|
int* m_resolution_y;
|
||||||
|
|
||||||
|
uint32_t* m_region_code;
|
||||||
|
|
||||||
memory::byte_patch* m_max_wanted_level;
|
memory::byte_patch* m_max_wanted_level;
|
||||||
memory::byte_patch* m_max_wanted_level_2;
|
memory::byte_patch* m_max_wanted_level_2;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "views/view.hpp"
|
#include "views/view.hpp"
|
||||||
#include "fiber_pool.hpp"
|
#include "fiber_pool.hpp"
|
||||||
#include "util/session.hpp"
|
#include "util/session.hpp"
|
||||||
|
#include "core/data/region_codes.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -26,6 +27,19 @@ namespace big
|
|||||||
ImGui::EndListBox();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
components::sub_title("Region Switcher");
|
||||||
|
if (ImGui::ListBoxHeader("###region_switch"))
|
||||||
|
{
|
||||||
|
for (const auto& region_type : regions)
|
||||||
|
{
|
||||||
|
components::selectable(region_type.name, *g_pointers->m_region_code == region_type.id, [®ion_type]
|
||||||
|
{
|
||||||
|
*g_pointers->m_region_code = region_type.id;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
ImGui::EndListBox();
|
||||||
|
}
|
||||||
|
|
||||||
components::sub_title("Chat");
|
components::sub_title("Chat");
|
||||||
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
|
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
|
||||||
ImGui::Checkbox("Log Chat Messages", &g->session.log_chat_messages);
|
ImGui::Checkbox("Log Chat Messages", &g->session.log_chat_messages);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user