mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: player evolution
This commit is contained in:
1 parent
e49bd6aa68
commit
91da65196d
10 files changed
+193
-71
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { BlitzServer } from '../../constants/servers.js';
|
||||
import { AllStats } from '../../types/accountInfo.js';
|
||||
import getTankHistories, {
|
||||
TankHistories,
|
||||
TankHistory,
|
||||
TankHistoriesRaw,
|
||||
TankHistoryRaw,
|
||||
} from './getTankHistories.js';
|
||||
|
||||
export const emptyAllStats: AllStats = {
|
||||
@@ -25,7 +25,7 @@ export const emptyAllStats: AllStats = {
|
||||
wins: 0,
|
||||
};
|
||||
|
||||
export const emptyTankHistoryNode: TankHistory = {
|
||||
export const emptyTankHistoryNode: TankHistoryRaw = {
|
||||
account_id: 0,
|
||||
battle_life_time: 0,
|
||||
last_battle_time: 0,
|
||||
@@ -45,7 +45,7 @@ export default async function getTankStatsOverTime(
|
||||
});
|
||||
|
||||
// sort them even though most won't be used
|
||||
const tankSortedHistory: Record<number, TankHistories> = {};
|
||||
const tankSortedHistory: Record<number, TankHistoriesRaw> = {};
|
||||
const tankIds: number[] = [];
|
||||
history.forEach((node) => {
|
||||
if (!tankSortedHistory[node.tank_id]) {
|
||||
|
||||
Reference in new issue
Block a user