From a30d6feab718a887edc7eb5b0470faa77677a8c3 Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 28 Jul 2026 19:37:29 +0200 Subject: feat: added a very-very basic total rewards thingy, still needs to do detection through the special packet sent by client and there's a lot of placeholder things and not the best code there. Also - normal items don't stack and they definitely should - that's gonna be a bit of refactoring :))))))))))) --- analyzer/analyzer.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'analyzer/analyzer.h') diff --git a/analyzer/analyzer.h b/analyzer/analyzer.h index 1b8d2f9..15bddf2 100644 --- a/analyzer/analyzer.h +++ b/analyzer/analyzer.h @@ -1,7 +1,32 @@ // analyzer.h // functions for analyzing the packets received from the game server +#include "structures/hashmap.h" +#include "structures/array.h" +#include "parser/fight_results/fight_results.h" + +#ifndef ANALYZER_H +#define ANALYZER_H + +#define MAX_NAME_LENGTH 11 + +typedef struct { + int exp; + int gold; + DynArray items[MAX_ITEM_TYPE]; // item type -> dynamic array of items + int psycho; + HashMap *saturations; // saturation type -> total gained +} TotalRewards; + +typedef struct { + size_t fight_count; + char curr_character[MAX_NAME_LENGTH+1]; + HashMap *characters; // nick -> TotalRewards +} FileAnalState; + // analyze file // params: // - path - path to the file to analyze extern void analyze_file(char *path); + +#endif -- cgit v1.2.3