/// <summary> /// Sets the bot to a ready status. /// </summary> public bool SetReady(bool ready) { // testing ValidateLocalTradeItems(); bool ok = session.SetReadyWebCmd(ready); if (!ok) { throw new TradeException("The web command to set trade ready state failed."); } return(true); }
/// <summary> /// Sets the bot to a ready status. /// </summary> public bool SetReady(bool ready) { //If the bot calls SetReady(false) and the call fails, we still want meIsReady to be //set to false. Otherwise, if the call to SetReady() was a result of a callback //from Trade.Poll() inside of the OnTradeAccept() handler, the OnTradeAccept() //handler might think the bot is ready, when really it's not! if (!ready) { MeIsReady = false; } ValidateLocalTradeItems(); return(RetryWebRequest(() => session.SetReadyWebCmd(ready))); }