Skip to content

Commit

Permalink
New Login delay. Exception handling on client none
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCheatsrichter committed Feb 28, 2022
1 parent 1eb1df6 commit 5822f46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gw2 Launchbuddy/Modifiers/Loginfiller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public static void Login(string email,string passwd,Process pro, bool clearfield
public static void PressLoginButton(Account acc)
{
ModuleReader.WaitForModule("WINNSI.DLL", acc.Client.Process);
Thread.Sleep(1800+(750*ClientManager.ActiveClients.Count));

//Wait between clients
int timetowait = 1800 + (ClientManager.ActiveClients.Count * ClientManager.ActiveClients.Count * 80);
Thread.Sleep(timetowait);
if(!acc.Client.Process.HasExited)
{
PressKeyDown(Keys.Enter, acc.Client.Process);
Expand Down
7 changes: 7 additions & 0 deletions Gw2 Launchbuddy/ObjectManagers/ClientManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public static void Add(Client client)
public static void UpdateActiveList(object sender, EventArgs e)
{
Client client = sender as Client;

if(client == null)
{
return;
}

Console.WriteLine(client.account.Nickname + " status changed to: " + client.Status + " = " + ((int)client.Status).ToString());

if (ActiveClients.Contains(client) && client.Status < ActiveStatus_Threshold)
Expand Down Expand Up @@ -601,6 +607,7 @@ private void WaitForLogin()

public void Launch()
{

try
{
Helpers.FileWatchDog localdatwatcher = new Helpers.FileWatchDog(EnviromentManager.GwLocaldatPath,4,count_negativeflank:true);
Expand Down

0 comments on commit 5822f46

Please sign in to comment.