void defaultFirstCharTimer_Tick(object sender, EventArgs e) { try { var defaultFirstCharacters = Settings.DefaultFirstCharacterLoader.DefaultFirstCharacters; foreach (var character in defaultFirstCharacters) { if (character.ZoneId == zonename && character.Server == server) { // Bypass movies/logos if (state == 1 || state == 2) { PostMessageTools.SendMouseClick(350, 100); } if (state == 3) { loginCharacterTools.LoginCharacter(character.CharacterName); } break; } } if (state >= 3) { defaultFirstCharTimer.Stop(); } state++; } catch (Exception ex) { Debug.LogException(ex); } }
void launcherChooseCharTimer_Tick(object sender, EventArgs e) { try { // Override - instead of using the plugin xml, use the launch file var launchInfo = LaunchControl.GetLaunchInfo(); if (launchInfo.IsValid) { TimeSpan FiveMinutes = new TimeSpan(0, 0, 5, 0); if (DateTime.UtcNow - launchInfo.LaunchTime < FiveMinutes) { var ourCharacter = new DefaultFirstCharacter(launchInfo.ServerName, zonename, launchInfo.CharacterName); log.WriteInfo("Character login requested: " + launchInfo.CharacterName); if (ourCharacter.ZoneId == zonename && ourCharacter.Server == server) { // Bypass movies/logos if (state == 1 || state == 2) { PostMessageTools.SendMouseClick(350, 100); } if (state == 3) { bool ok = loginCharacterTools.LoginCharacter(ourCharacter.CharacterName); if (ok) { Heartbeat.RecordCharacterName(ourCharacter.CharacterName); } } } } else { log.WriteInfo("launcherChooseCharTimer_Tick: LaunchInfo too old: " + launchInfo.LaunchTime.ToString()); } } else { log.WriteInfo("launcherChooseCharTimer_Tick: LaunchInfo not valid"); } if (state >= 3) { launcherChooseCharTimer.Stop(); } state++; } catch (Exception ex) { Debug.LogException(ex); } }
void defaultFirstCharTimer_Tick(object sender, EventArgs e) { try { loginNextCharTimer.Stop(); if (!String.IsNullOrEmpty(nextCharacter)) { loginCharacterTools.LoginCharacter(nextCharacter); nextCharacter = null; } else if (nextCharByInt >= 0 && nextCharByInt <= 10) { loginCharacterTools.LoginByIndex(nextCharByInt); nextCharByInt = -1; } } catch (Exception ex) { Debug.LogException(ex); } }
void defaultFirstCharTimer_Tick(object sender, EventArgs e) { try { var defaultFirstCharacters = Settings.SettingsManager.CharacterSelectionScreen.DefaultFirstCharacters; foreach (var character in defaultFirstCharacters) { if ((String.IsNullOrEmpty(character.AccountName) || character.AccountName == zonename) && character.Server == server) { // Bypass movies/logos if (state == 1 || state == 2) { PostMessageTools.SendMouseClick(350, 100); } if (state == 3) { if (!String.IsNullOrEmpty(character.CharacterName)) { loginCharacterTools.LoginCharacter(character.CharacterName); } else if (character.CharacterIndex != -1) { loginCharacterTools.LoginByIndex(character.CharacterIndex); } } break; } } if (state >= 3) { defaultFirstCharTimer.Stop(); } state++; } catch (Exception ex) { Debug.LogException(ex); } }