From 8369d6f15f2007d3f8e07114062161a688571338 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Tue, 25 Apr 2023 11:01:07 +0200 Subject: [PATCH] auth: finish password implementation --- src/client/component/auth.cpp | 8 ++++++++ src/client/game/symbols.hpp | 1 + 2 files changed, 9 insertions(+) diff --git a/src/client/component/auth.cpp b/src/client/component/auth.cpp index 4ccbc1c4..951a9a9b 100644 --- a/src/client/component/auth.cpp +++ b/src/client/component/auth.cpp @@ -326,6 +326,12 @@ namespace auth } } + void info_set_value_for_key_stub(char* s, const char* key, const char* value) + { + game::Info_SetValueForKey.call_safe(s, key, value); + game::Info_SetValueForKey.call_safe(s, "password", password->current.value.string); + } + struct component final : generic_component { void post_unpack() override @@ -390,6 +396,8 @@ namespace auth utils::hook::call(0x14134BF7D_g, send_connect_data_stub); + utils::hook::call(0x14134BEFE_g, info_set_value_for_key_stub); + // Fix crash utils::hook::set(0x14134B970_g, 0xC3); } diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index fa4f2fe1..717af2ac 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -85,6 +85,7 @@ namespace game // Info WEAK symbol Info_ValueForKey{0x1422E87B0}; + WEAK symbol Info_SetValueForKey{0x1422E8410}; // MSG WEAK symbol MSG_ReadByte{0x142155450, 0x14050D1B0};