public void Connect() { if (!connection.IsConnected()) { connection.Connect(userName, password, region, Properties.Settings.Default.clientVer); } }
public void levelUp() { updateStatus("Level Up: " + sumLevel, Accountname); rpBalance = loginPacket.RpBalance; if (sumLevel >= Program.maxLevel) { connection.Disconnect(); //bool connectStatus = await connection.IsConnected(); if (!connection.IsConnected()) { Program.lognNewAccount(); } } if (rpBalance == 400.0 && Program.buyBoost) { updateStatus("Buying XP Boost", Accountname); try { Task t = new Task(buyBoost); t.Start(); } catch (Exception exception) { updateStatus("Couldn't buy RP Boost.\n" + exception, Accountname); } } }
private void levelUp() { updateStatus("Level Up: " + sumLevel, Accountname); rpBalance = loginPacket.RpBalance; if (sumLevel >= parent.maxLevel) { connection.Disconnect(); if (!connection.IsConnected()) { parent.lognNewAccount(); } } if (rpBalance == 400.0 && parent.buyBoost && sumLevel < 5) { updateStatus("Buying XP Boost", Accountname); try { Task t = new Task(buyBoost); t.Start(); } catch (Exception exception) { updateStatus("Couldn't buy RP Boost.\n" + exception, Accountname); } } }
public void levelUp() { updateStatus("Level Up: " + sumLevel, Accountname); rpBalance = loginPacket.RpBalance; if (sumLevel >= Program.maxLevel) { connection.Disconnect(); //bool connectStatus = await connection.IsConnected(); if (!connection.IsConnected()) { Program.lognNewAccount(); } } }
private void Dispose(bool disposing) { if (!m_disposed) { if (disposing) { } m_disposed = true; if (connection.IsConnected()) { connection.Disconnect(); } } }