public void FilterCore_ClientDispatch(object sender, NetworkMessageEventArgs e) { if (e.Message.Type == 0xF7C8) // Enter Game { freshLogin = true; try { LaunchControl.RecordLaunchResponse(DateTime.UtcNow); } catch { log.WriteInfo("FilterCore_ClientDispatch: Exception trying to record launch response"); } Heartbeat.LaunchHeartbeat(); } if (freshLogin && e.Message.Type == 0xF7B1 && Convert.ToInt32(e.Message["action"]) == 0xA1) // Character Materialize (Any time is done portalling in, login or portal) { freshLogin = false; if (loginMessageQueue.Count > 0) { sendingLastEnter = false; CoreManager.Current.RenderFrame += new EventHandler <EventArgs>(Current_RenderFrame); } } }
public void FilterCore_ClientDispatch(object sender, NetworkMessageEventArgs e) { if (e.Message.Type == 0xF7C8) // Enter Game { freshLogin = true; } if (freshLogin && e.Message.Type == 0xF7B1 && Convert.ToInt32(e.Message["action"]) == 0xA1) // Character Materialize (Any time is done portalling in, login or portal) { freshLogin = false; string characterName = GameRepo.Game.Character; if (string.IsNullOrEmpty(characterName)) { // Do not know why GameRepo.Game.Character is not yet populated, but it isn't var launchInfo = LaunchControl.GetLaunchInfo(); if (launchInfo.IsValid) { characterName = launchInfo.CharacterName; } } var persister = new LoginCommandPersister(GameRepo.Game.Account, GameRepo.Game.Server, characterName); log.WriteDebug("FilterCore_ClientDispatch: Character: '{0}'", GameRepo.Game.Character); _loginCmds = persister.ReadAndCombineQueues(); if (_loginCmds.Commands.Count > 0) { loginCompleteTime = DateTime.Now; sendingLastEnter = false; CoreManager.Current.RenderFrame += new EventHandler <EventArgs>(Current_RenderFrame); } } }