33#include " logger.h"
44#include " state.hpp"
55
6- static bool isRestrictedGuestAccount = false ;
6+ static bool isGuestAccount = false ;
77
88void fakeSuccessfulLogin (EOSManager* eosManager)
99{
@@ -27,7 +27,7 @@ void dEOSManager_StartInitialLoginFlow(EOSManager* __this, MethodInfo* method) {
2727 return ;
2828 }
2929 EOSManager_StartTempAccountFlow (__this, method);
30- isRestrictedGuestAccount = true ;
30+ isGuestAccount = true ;
3131 EOSManager_CloseStartupWaitScreen (__this, method);
3232}
3333
@@ -51,14 +51,14 @@ void dEOSManager_InitializePlatformInterface(EOSManager* __this, MethodInfo* met
5151
5252bool dEOSManager_IsFreechatAllowed (EOSManager* __this, MethodInfo* method)
5353{
54- bool ret = !isRestrictedGuestAccount || IsInGame () || IsInLobby ();
54+ bool ret = !isGuestAccount || IsInGame () || IsInLobby ();
5555 if (State.ShowHookLogs ) LOG_DEBUG (" Hook dEOSManager_IsFreechatAllowed executed" );
5656 return ret;
5757}
5858
5959QuickChatModes__Enum dMultiplayerSettingsData_get_ChatMode (MultiplayerSettingsData* __this, QuickChatModes__Enum value, MethodInfo* method) {
6060 if (IsInGame () || IsInLobby ()) return QuickChatModes__Enum::FreeChatOrQuickChat;
61- return !isRestrictedGuestAccount || IsInGame () || IsInLobby () ? MultiplayerSettingsData_get_ChatMode (__this, value, method) : QuickChatModes__Enum::QuickChatOnly;
61+ return !isGuestAccount || IsInGame () || IsInLobby () ? MultiplayerSettingsData_get_ChatMode (__this, value, method) : QuickChatModes__Enum::QuickChatOnly;
6262}
6363
6464bool dEOSManager_IsFriendsListAllowed (EOSManager* __this, MethodInfo* method)
@@ -173,14 +173,13 @@ void dPlatformSpecificData_Serialize(PlatformSpecificData* __this, MessageWriter
173173
174174void dEditAccountUsername_SaveUsername (EditAccountUsername* __this, MethodInfo* method) {
175175 if (State.ShowHookLogs ) LOG_DEBUG (" Hook dEditAccountUsername_SaveUsername executed" );
176- if (State.UseGuestFriendCode && State.GuestFriendCode != " " ) {
176+ if (State.UseNewFriendCode && State.NewFriendCode != " " ) {
177177 std::string newFriendCode = " " ;
178- for (auto i : State.GuestFriendCode ) {
179- newFriendCode += tolower (i);
178+ for (auto i : State.NewFriendCode ) {
180179 if (newFriendCode.ends_with (" " )) {
181- isRestrictedGuestAccount = false ;
182180 break ;
183181 }
182+ newFriendCode += tolower (i);
184183 }
185184 TMP_Text_set_text ((TMP_Text*)__this->fields .UsernameText , convert_to_string (newFriendCode), NULL );
186185 }
@@ -201,7 +200,6 @@ void dEditAccountUsername_SaveUsername(EditAccountUsername* __this, MethodInfo*
201200 }
202201 TMP_Text_set_text ((TMP_Text*)__this->fields .UsernameText , convert_to_string (newFriendCode), NULL );
203202 }
204- isRestrictedGuestAccount = true ;
205203 }
206204 EditAccountUsername_SaveUsername (__this, method);
207205}
0 commit comments