remove getLog(), add GameSelectPhase "GAME_STARTING"

This commit is contained in:
mrbesen 2022-08-18 13:02:37 +02:00
parent 65b91f8d5a
commit ffc83a175f
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
3 changed files with 3 additions and 22 deletions

View File

@ -39,6 +39,7 @@ public:
enum class ChampSelectPhase : uint32_t {
INVALID = 0,
GAME_STARTING,
PLANNING,
BAN_PICK,
FINALIZATION
@ -157,7 +158,6 @@ public:
ChampSelectSession getChampSelectSession();
bool setChampSelectAction(int32_t actionid, int32_t champid, bool completed);
PlayerInfo getSelf();
std::vector<std::string> getLog();
std::vector<int32_t> getBannableChampIDs();
std::vector<int32_t> getPickableChampIDs();

View File

@ -108,25 +108,6 @@ ClientAPI::PlayerInfo ClientAPI::getSelf() {
return {};
}
std::vector<std::string> ClientAPI::getLog() {
std::vector<std::string> out;
QJsonDocument doc = request("LoggingGetEntries");
if(doc.isArray()) {
QJsonArray arr = doc.array();
for(auto it : arr) {
std::string message;
if(it.isObject()) {
QJsonObject logobj = it.toObject();
message = getValue<std::string>(logobj, "severity");
message += getValue<std::string>(logobj, "message");
}
out.push_back(message);
}
}
return out;
}
static std::vector<int32_t> fromArrayToVector(const QJsonArray& arr) {
std::vector<int32_t> out;
out.reserve(arr.size());

View File

@ -15,7 +15,7 @@
ARR(ReadyCheckState, "Invalid", "None", "InProgress", "Accepted", "Declined");
ARR(GameflowPhase, "None", "Lobby", "Matchmaking", "CheckedIntoTournament", "ReadyCheck", "ChampSelect", "GameStart", "FailedToLaunch", "InProgress", "Reconnect", "WaitingForStats", "PreEndOfGame", "EndOfGame", "TerminatedInError");
ARR(ChampSelectPhase, "Invalid", "PLANNING", "BAN_PICK", "FINALIZATION");
ARR(ChampSelectPhase, "Invalid", "GAME_STARTING", "PLANNING", "BAN_PICK", "FINALIZATION");
ARR(Position, "Invalid", "top", "jungle", "middle", "bottom", "utility");
ARR(ShortPosition, "", "Top", "Jgl", "Mid", "Bot", "Sup");
ARR(ChampSelectActionType, "Invalid", "ban", "pick", "ten_bans_reveal");
@ -30,7 +30,7 @@ static T mapEnum(const std::string& input, const std::string* names, uint32_t co
}
}
Log::warn << "no mapping of enum-string: " << std::quoted(input);
Log::warn << "no mapping of enum-string: " << std::quoted(input) << " using default: " << defaul << " type: " << typeid(T).name();
return defaul;
}