48 lines
746 B
C++
48 lines
746 B
C++
#pragma once
|
|
|
|
#include <thread>
|
|
#include <memory>
|
|
|
|
#include "clientapi.h"
|
|
|
|
class LolAutoAccept {
|
|
protected:
|
|
struct Stage {
|
|
Stage();
|
|
virtual ~Stage();
|
|
|
|
std::string champ; // not every stage has a champ
|
|
bool enabled = false;
|
|
virtual void action(LolAutoAccept& lolaa);
|
|
};
|
|
|
|
std::vector<Stage*> stages;
|
|
|
|
bool shouldrun = false;
|
|
std::thread lolaathread;
|
|
|
|
std::shared_ptr<ClientAPI> clientapi;
|
|
|
|
public:
|
|
enum class State {
|
|
LOBBY = 0,
|
|
PREPICK = 1,
|
|
BAN = 2,
|
|
PICK = 3,
|
|
GAME = 4
|
|
};
|
|
|
|
LolAutoAccept();
|
|
~LolAutoAccept();
|
|
|
|
void setChamp(const std::string& champ, State s);
|
|
void setEnabled(bool b, State s);
|
|
|
|
bool init(); // returns true on success
|
|
void run();
|
|
void stop();
|
|
|
|
private:
|
|
void stopJoinThread();
|
|
void innerRun();
|
|
}; |