Add the ability to explicitly specify a login start location to pCampbot via the -start parameter

This commit is contained in:
Justin Clark-Casey (justincc)
2013-08-14 16:51:51 +01:00
parent 0feb5da31e
commit 2146b20169
3 changed files with 76 additions and 27 deletions

View File

@@ -97,6 +97,8 @@ namespace pCampBot
public string Name { get; private set; }
public string Password { get; private set; }
public string LoginUri { get; private set; }
public string StartLocation { get; private set; }
public string saveDir;
public string wear;
@@ -132,7 +134,7 @@ namespace pCampBot
/// <param name="behaviours"></param>
public Bot(
BotManager bm, List<IBehaviour> behaviours,
string firstName, string lastName, string password, string loginUri)
string firstName, string lastName, string password, string startLocation, string loginUri)
{
ConnectionState = ConnectionState.Disconnected;
@@ -146,6 +148,7 @@ namespace pCampBot
Name = string.Format("{0} {1}", FirstName, LastName);
Password = password;
LoginUri = loginUri;
StartLocation = startLocation;
Manager = bm;
Behaviours = behaviours;
@@ -209,7 +212,7 @@ namespace pCampBot
ConnectionState = ConnectionState.Connecting;
if (Client.Network.Login(FirstName, LastName, Password, "pCampBot", "Your name"))
if (Client.Network.Login(FirstName, LastName, Password, "pCampBot", StartLocation, "Your name"))
{
ConnectionState = ConnectionState.Connected;