TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ OnLobbyJoinRequest()

void Terraria.Social.Steam.NetClientSocialModule.OnLobbyJoinRequest ( GameLobbyJoinRequested_t result)
inlineprivate

Definition at line 179 of file NetClientSocialModule.cs.

180 {
181 //IL_000d: Unknown result type (might be due to invalid IL or missing references)
182 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
183 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
184 WeGameHelper.WriteDebugString(" OnLobbyJoinRequest");
185 if (_lobby.State != 0)
186 {
187 _lobby.Leave();
188 }
189 string friendName = SteamFriends.GetFriendPersonaName(result.m_steamIDFriend);
190 Main.QueueMainThreadAction(delegate
191 {
192 Action action = delegate
193 {
194 Main.OpenPlayerSelect(delegate(PlayerFileData playerData)
195 {
196 //IL_003c: Unknown result type (might be due to invalid IL or missing references)
197 Main.ServerSideCharacter = false;
198 playerData.SetAsActive();
199 Main.menuMode = 882;
200 Main.statusText = Language.GetTextValue("Social.JoiningFriend", friendName);
201 _lobby.Join(result.m_steamIDLobby, OnLobbyEntered);
202 });
203 };
204 if (Terraria.ModLoader.ModLoader.Mods.Length == 0 || Main.menuMode == 10002)
205 {
206 Logging.tML.Info((object)"OnLobbyJoinRequest: Delay joinAction via OnSuccessfulLoad");
207 Terraria.ModLoader.ModLoader.OnSuccessfulLoad = (Action)Delegate.Combine(Terraria.ModLoader.ModLoader.OnSuccessfulLoad, action);
208 }
209 else
210 {
211 Logging.tML.Info((object)"OnLobbyJoinRequest: Running joinAction directly");
212 action();
213 }
214 });
215 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static Action OnSuccessfulLoad
Definition ModLoader.cs:73
This serves as the central class which loads mods. It contains many static fields and methods related...
Definition ModLoader.cs:30
void Join(CSteamID lobbyId, APIDispatchDelegate< LobbyEnter_t > callResult)
Definition Lobby.cs:62
void OnLobbyEntered(LobbyEnter_t result, bool failure)
static void WriteDebugString(string format, params object[] args)

References Terraria.Social.Steam.NetSocialModule._lobby, Terraria.Localization.Language.GetTextValue(), Terraria.Social.Steam.Lobby.Join(), Terraria.Social.Steam.Lobby.Leave(), Terraria.Main.menuMode, Terraria.ModLoader.ModLoader.Mods, Terraria.Social.Steam.NetClientSocialModule.OnLobbyEntered(), Terraria.ModLoader.ModLoader.OnSuccessfulLoad, Terraria.Main.OpenPlayerSelect(), Terraria.Main.QueueMainThreadAction(), Terraria.Social.Steam.Lobby.State, Terraria.ModLoader.Logging.tML, and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().

Referenced by Terraria.Social.Steam.NetClientSocialModule.Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: