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

◆ OnLobbyEntered()

void Terraria.Social.Steam.NetClientSocialModule.OnLobbyEntered ( LobbyEnter_t result,
bool failure )
inlineprivate

Definition at line 217 of file NetClientSocialModule.cs.

218 {
219 //IL_001d: Unknown result type (might be due to invalid IL or missing references)
220 //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
221 //IL_00c9: Unknown result type (might be due to invalid IL or missing references)
222 //IL_00da: Unknown result type (might be due to invalid IL or missing references)
223 //IL_0126: Unknown result type (might be due to invalid IL or missing references)
224 //IL_00b1: Unknown result type (might be due to invalid IL or missing references)
225 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
226 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
227 //IL_0093: Unknown result type (might be due to invalid IL or missing references)
228 WeGameHelper.WriteDebugString(" OnLobbyEntered");
229 SteamNetworking.AllowP2PPacketRelay(true);
231 int num = 0;
233 while (SteamNetworking.GetP2PSessionState(_lobby.Owner, ref pConnectionState) && pConnectionState.m_bConnectionActive != 1)
234 {
235 switch (pConnectionState.m_eP2PSessionError)
236 {
237 case 2:
239 return;
240 case 1:
242 return;
243 case 3:
245 return;
246 case 5:
248 return;
249 case 4:
250 if (++num > 5)
251 {
253 return;
254 }
255 SteamNetworking.CloseP2PSessionWithUser(_lobby.Owner);
257 break;
258 }
259 }
261 SteamFriends.SetPlayedWith(_lobby.Owner);
262 SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame"));
263 Main.clrInput();
264 Netplay.ServerPassword = "";
265 Main.GetInputText("");
266 Main.autoPass = false;
267 Main.netMode = 1;
268 Netplay.OnConnectedToSocialServer(new SocialSocket(new SteamAddress(_lobby.Owner)));
269 }
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
ConcurrentDictionary< CSteamID, ConnectionState > _connectionStateMap
static void WriteDebugString(string format, params object[] args)

References Terraria.Social.Steam.NetSocialModule._connectionStateMap, Terraria.Social.Steam.NetSocialModule._lobby, Terraria.Social.Steam.NetClientSocialModule.ClearAuthTicket(), Terraria.Main.clrInput(), Terraria.Main.GetInputText(), Terraria.Localization.Language.GetTextValue(), Terraria.Netplay.OnConnectedToSocialServer(), Terraria.Social.Steam.Lobby.Owner, Terraria.Social.Steam.NetClientSocialModule.SendAuthTicket(), and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().

Referenced by Terraria.Social.Steam.NetClientSocialModule.ConnectToLobby(), and Terraria.Social.Steam.NetClientSocialModule.OnLobbyJoinRequest().

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