#pragma once #include #include #include "clientapi.h" class LolAutoAccept { protected: struct Stage { Stage(); virtual ~Stage(); std::vector champids; // not every stage has a champ bool enabled = false; }; std::vector stages; bool shouldrun = false; std::thread lolaathread; std::shared_ptr clientapi; int64_t summonerid = -1; public: enum class State { LOBBY = 0, PREPICK = 1, BAN = 2, PICK = 3, GAME = 4 }; LolAutoAccept(); ~LolAutoAccept(); void setChamps(std::vector champs, State s); void setEnabled(bool b, State s); bool init(); // returns true on success void run(); void stop(); private: void stopJoinThread(); void innerRun(); using ownactions_t = std::vector; ownactions_t getOwnActions(int32_t cellid, const std::vector actions); void prepickPhase(const ownactions_t& ownactions); void banPhase(const ownactions_t& ownactions); void pickPhase( const ownactions_t& ownactions); void champSelect(); };