Skip to content

Commit

Permalink
Merge pull request #3 from tylerthardy/icc
Browse files Browse the repository at this point in the history
Icc
  • Loading branch information
tylerthardy authored Oct 9, 2023
2 parents dd051a5 + 9e2bd46 commit b8f57b5
Show file tree
Hide file tree
Showing 5 changed files with 4,819 additions and 7 deletions.
16 changes: 12 additions & 4 deletions api/src/warcraft-logs/warcraft-logs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,18 @@ export class WarcraftLogsService {
}
`;

const result: ApolloQueryResult<CharacterData> = await this.apollo.query({
query: GET_CHARACTER_ZONE_RANKINGS,
fetchPolicy: 'network-only'
});
let result: ApolloQueryResult<CharacterData>;
console.log('querying wcl for character');
try {
result = await this.apollo.query({
query: GET_CHARACTER_ZONE_RANKINGS,
fetchPolicy: 'network-only'
});
} catch (err) {
console.error(err);
throw err;
}
console.log('query complete');

// FIXME: Hacky. There should be more defined types
return {
Expand Down
28 changes: 26 additions & 2 deletions core/src/raids/raids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ export class Instances {
holdOverSlug: 'toc',
hardModeCount: 5
});
public static IcecrownCitadel = new Instance({
name: 'Icecrown Citadel',
zoneId: 1020,
sizes: [10, 25],
holdOverSlug: 'icc',
hardModeCount: 12
});

public static All: Instance[] = [
Instances.VaultOfArchavon,
Expand All @@ -93,7 +100,8 @@ export class Instances {
Instances.EyeOfEternity,
Instances.Onyxia,
Instances.Ulduar,
Instances.ToGC
Instances.ToGC,
Instances.IcecrownCitadel
];
private static instanceByZoneId: Map<number, Instance> = new Map(
Instances.All.map((instance) => [instance.zoneId, instance])
Expand Down Expand Up @@ -240,6 +248,20 @@ export class Raids {
softresSlug: 'toc25',
lfgName: 'ToGC 25'
});
public static ICC10 = new Raid({
slug: 'ICC10',
instance: Instances.IcecrownCitadel,
size: 10,
softresSlug: 'icc10',
lfgName: 'ICC 10'
});
public static ICC25 = new Raid({
slug: 'ICC25',
instance: Instances.IcecrownCitadel,
size: 25,
softresSlug: 'icc25',
lfgName: 'ICC 25'
});

public static All = [
Raids.VoA10,
Expand All @@ -255,7 +277,9 @@ export class Raids {
Raids.Onyxia10,
Raids.Onyxia25,
Raids.ToGC10,
Raids.ToGC25
Raids.ToGC25,
Raids.ICC10,
Raids.ICC25
];
private static raidBySoftRes: Map<string, Raid> = new Map(Raids.All.map((raid) => [raid.softresSlug, raid]));
private static raidBySizeInstance: Map<RaidSize, Map<Instance, Raid>> = new Map([
Expand Down
Loading

0 comments on commit b8f57b5

Please sign in to comment.