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

◆ OnLobbyEntered()

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

Definition at line 195 of file NetClientSocialModule.cs.

196 {
197 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
198 //IL_00a4: Unknown result type (might be due to invalid IL or missing references)
199 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
200 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
201 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
202 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
203 //IL_002c: Unknown result type (might be due to invalid IL or missing references)
204 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
205 //IL_0094: Unknown result type (might be due to invalid IL or missing references)
206 WeGameHelper.WriteDebugString(" OnLobbyEntered");
207 SteamNetworking.AllowP2PPacketRelay(true);
209 int num = 0;
210 P2PSessionState_t val = default(P2PSessionState_t);
211 while (SteamNetworking.GetP2PSessionState(_lobby.Owner, ref val) && val.m_bConnectionActive != 1)
212 {
213 switch (val.m_eP2PSessionError)
214 {
215 case 2:
217 return;
218 case 1:
220 return;
221 case 3:
223 return;
224 case 5:
226 return;
227 case 4:
228 if (++num > 5)
229 {
231 return;
232 }
233 SteamNetworking.CloseP2PSessionWithUser(_lobby.Owner);
235 break;
236 }
237 }
239 SteamFriends.SetPlayedWith(_lobby.Owner);
240 SteamFriends.SetRichPresence("status", Language.GetTextValue("Social.StatusInGame"));
241 Main.clrInput();
242 Netplay.ServerPassword = "";
243 Main.GetInputText("");
244 Main.autoPass = false;
245 Main.netMode = 1;
246 Netplay.OnConnectedToSocialServer(new SocialSocket(new SteamAddress(_lobby.Owner)));
247 }
static string GetTextValue(string key)
Definition Language.cs:15
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().