feat(TabOnline): Added set session weather
This commit is contained in:
parent
b998a299ea
commit
d201c5de7e
@ -13,6 +13,7 @@ namespace big::functions
|
||||
using increment_stat_event = bool(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
||||
using get_player_name = char*(Player player);
|
||||
using script_event_handler = bool(void* events, CNetGamePlayer* sourcePlayer, CNetGamePlayer* targetPlayer);
|
||||
using set_session_weather = void(char a1, int a2, int a3, int64_t a4);
|
||||
using sync_local_time = void(int h, int m);
|
||||
using trigger_script_event = int(bool unk0, uint64_t* args, int argCount, int bitFlags);
|
||||
}
|
||||
|
@ -4,6 +4,24 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
const char* weatherTypes[] = {
|
||||
"Sunny",
|
||||
"Clear",
|
||||
"Clouds",
|
||||
"Smog",
|
||||
"Fog",
|
||||
"Overcast",
|
||||
"Rain",
|
||||
"Thunder",
|
||||
"Clearing",
|
||||
"Neatral (weird)",
|
||||
"Snow",
|
||||
"Blizzard",
|
||||
"Light Snow",
|
||||
"Christmas",
|
||||
"Halloween"
|
||||
};
|
||||
|
||||
void tabbar::render_online()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Online"))
|
||||
@ -79,6 +97,25 @@ namespace big
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::Text("Weather:");
|
||||
ImGui::BeginCombo("##weather", weatherTypes[g_temp.weather_type]);
|
||||
for (uint8_t i = 0; i < IM_ARRAYSIZE(weatherTypes); i++)
|
||||
{
|
||||
bool is_selected = (g_temp.weather_type == i);
|
||||
if (ImGui::Selectable(weatherTypes[i], is_selected))
|
||||
{
|
||||
g_temp.weather_type = i;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(=)
|
||||
{
|
||||
g_pointers->m_set_session_weather(1, i, 76, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
if (is_selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,11 @@ namespace big
|
||||
m_sync_local_time = ptr.as<decltype(m_sync_local_time)>();
|
||||
});
|
||||
|
||||
main_batch.add("Session Weather", "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 40 8A E9", [this](memory::handle ptr)
|
||||
{
|
||||
m_set_session_weather = ptr.as<decltype(m_set_session_weather)>();
|
||||
});
|
||||
|
||||
main_batch.add("Get Player Name", "40 53 48 83 EC 20 80 3D ? ? ? ? ? 8B D9 74 22", [this](memory::handle ptr)
|
||||
{
|
||||
m_get_player_name = ptr.as<decltype(m_get_player_name)>();
|
||||
|
@ -39,6 +39,7 @@ namespace big
|
||||
functions::get_player_name* m_get_player_name{};
|
||||
functions::increment_stat_event* m_increment_stat_event{};
|
||||
functions::script_event_handler* m_script_event_handler{};
|
||||
functions::set_session_weather* m_set_session_weather{};
|
||||
functions::sync_local_time* m_sync_local_time{};
|
||||
functions::trigger_script_event* m_trigger_script_event{};
|
||||
};
|
||||
|
Reference in New Issue
Block a user