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

◆ LaunchLocalServer()

override void Terraria.Social.WeGame.NetClientSocialModule.LaunchLocalServer ( Process process,
ServerMode mode )
inline

Definition at line 205 of file NetClientSocialModule.cs.

206 {
207 //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
208 if (_lobby.State != 0)
209 {
210 _lobby.Leave();
211 }
214 startInfo.Arguments = startInfo.Arguments + " -wegame -localwegameid " + ((RailComparableID)GetLocalPeer()).id_;
215 if (mode.HasFlag(ServerMode.Lobby))
216 {
217 _hasLocalHost = true;
218 if (mode.HasFlag(ServerMode.FriendsCanJoin))
219 {
220 process.StartInfo.Arguments += " -lobby friends";
221 }
222 else
223 {
224 process.StartInfo.Arguments += " -lobby private";
225 }
226 if (mode.HasFlag(ServerMode.FriendsOfFriends))
227 {
228 process.StartInfo.Arguments += " -friendsoffriends";
229 }
230 }
231 string text = default(string);
232 rail_api.RailFactory().RailUtils().GetLaunchAppParameters((EnumRailLaunchAppType)2, ref text);
234 startInfo2.Arguments = startInfo2.Arguments + " " + text;
235 WeGameHelper.WriteDebugString("LaunchLocalServer,cmd_line:" + process.StartInfo.Arguments);
236 AsyncSetMyMetaData("status", Language.GetTextValue("Social.StatusInGame"));
237 Netplay.OnDisconnect += OnDisconnect;
238 process.Start();
239 }
static string GetTextValue(string key)
Definition Language.cs:15
void AsyncSetMyMetaData(string key, string value)

References Terraria.Social.WeGame.NetClientSocialModule._hasLocalHost, Terraria.Social.WeGame.NetSocialModule._lobby, Terraria.Social.WeGame.NetClientSocialModule.AsyncSetMyMetaData(), Terraria.Social.WeGame.NetSocialModule.GetLocalPeer(), Terraria.Localization.Language.GetTextValue(), Terraria.Social.WeGame.NetClientSocialModule.LazyCreateWeGameMsgServer(), Terraria.Social.WeGame.Lobby.Leave(), Terraria.Social.WeGame.NetClientSocialModule.OnDisconnect(), Terraria.Social.WeGame.Lobby.State, System.text, and Terraria.Social.WeGame.WeGameHelper.WriteDebugString().