Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add neutral_token drops data #2808

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ interface ParsedPlayer extends Player {
obs: any;
sen: any;
lane_role: number | null;
neutral_tokens_log: any[];

party_size?: number;

Expand Down
18 changes: 18 additions & 0 deletions routes/responses/MatchResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,24 @@ export default {
'Object containing information on certain benchmarks like GPM, XPM, KDA, tower damage, etc',
type: 'object',
},
neutral_tokens_log: {
description:
'Object containing information on neutral tokens drops',
type: 'array',
items: {
type: 'object',
properties: {
time: {
description: 'Time in seconds at which the token was dropped',
type: 'integer',
},
key: {
description: 'Type of token dropped',
type: 'string',
}
},
},
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ CREATE TABLE IF NOT EXISTS player_matches (
roshans_killed int,
observers_placed int,
party_size int,
net_worth int
net_worth int,
neutral_tokens_log json[]
Antosik marked this conversation as resolved.
Show resolved Hide resolved
);
CREATE INDEX IF NOT EXISTS player_matches_account_id_idx on player_matches(account_id) WHERE account_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS player_matches_hero_id_idx on player_matches(hero_id);
Expand Down