Skip to content

Commit

Permalink
Updated c_gui_player_select_screen_widget
Browse files Browse the repository at this point in the history
  • Loading branch information
twist84 committed Jan 21, 2025
1 parent 0e76019 commit 93482aa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ HOOK_DECLARE_CLASS_MEMBER(0x00B08A10, c_gui_player_select_screen_widget, initial
bool __cdecl parse_target_player_name(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string = this_->m_player_data.host.name.get_string();
c_static_wchar_string<256> string = this_->m_target_player_configuration.host.name.get_string();
string.copy_to(buffer, MAX(buffer_length, 256));

return true;
Expand All @@ -44,7 +44,7 @@ bool __cdecl user_interface_get_player_grade_string(long rank, long grade, bool
bool __cdecl parse_player_rank(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<1024> string;
user_interface_get_player_rank_string(13, 3, &string);
Expand All @@ -58,7 +58,7 @@ bool __cdecl parse_player_rank(void* this_ptr, wchar_t* buffer, long buffer_leng
bool __cdecl parse_player_grade(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<1024> string;
user_interface_get_player_grade_string(13, 3, false, true, &string);
Expand All @@ -72,7 +72,7 @@ bool __cdecl parse_player_grade(void* this_ptr, wchar_t* buffer, long buffer_len
bool __cdecl parse_xp_value(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string;
string.print(L"%d", 69420);
Expand All @@ -86,7 +86,7 @@ bool __cdecl parse_xp_value(void* this_ptr, wchar_t* buffer, long buffer_length)
bool __cdecl parse_skill_value(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string;
string.print(L"%d", 69420);
Expand All @@ -100,7 +100,7 @@ bool __cdecl parse_skill_value(void* this_ptr, wchar_t* buffer, long buffer_leng
bool __cdecl parse_ranked_value(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string;
string.print(L"%d", 69420);
Expand All @@ -114,7 +114,7 @@ bool __cdecl parse_ranked_value(void* this_ptr, wchar_t* buffer, long buffer_len
bool __cdecl parse_social_value(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string;
string.print(L"%d", 69420);
Expand All @@ -128,7 +128,7 @@ bool __cdecl parse_social_value(void* this_ptr, wchar_t* buffer, long buffer_len
bool __cdecl parse_custom_value(void* this_ptr, wchar_t* buffer, long buffer_length)
{
c_gui_player_select_screen_widget* this_ = static_cast<c_gui_player_select_screen_widget*>(this_ptr);
if (this_ && this_->__unknown30D0 && this_ptr != (void*)-0x1AB0)
if (this_ && this_->m_target_player_configuration_valid && this_ptr != (void*)-0x1AB0)
{
c_static_wchar_string<256> string;
string.print(L"%d", 69420);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ struct c_gui_player_select_screen_widget :
//protected:
s_player_identifier m_current_player_id;
s_player_identifier m_target_player_id;
s_player_configuration m_player_data;
s_player_configuration m_target_player_configuration;

bool __unknown30D0;
bool __unknown30D1;
bool m_target_player_configuration_valid;
bool m_full_details;
byte __data30D2[0x2];

c_string_id m_biggest_kill_name;

byte __data30D8[0x4];

long m_damage_reporting_type;
long m_implement_of_destruction;

long __unknown30E0;
byte __data30E4[0x4];
long __unknown30E8;
byte __data30EC[0x4];
long m_killed_most_player_index;
short m_killed_count;
long m_killed_most_by_player_index;
short m_killed_by_count;
};
static_assert(sizeof(c_gui_player_select_screen_widget) == sizeof(c_gui_screen_widget) + 0x1650);

0 comments on commit 93482aa

Please sign in to comment.