Add companions (little legends) models

This commit is contained in:
BlossomiShymae
2024-06-10 15:18:58 -05:00
parent 35a3d25bf7
commit c99668cb37
2 changed files with 40 additions and 1 deletions

View File

@@ -291,4 +291,34 @@ export class Rarity extends CommunityDragonObject {
this.region = json.region;
this.rarity = json.rarity;
}
}
export class Companion extends CommunityDragonObject {
contentId: string;
itemId: number;
name: string;
loadoutsIcon: string;
description: string;
level: number;
speciesName: string;
speciesId: string;
rarity: string;
constructor(json: any) {
super();
this.contentId = json.contentId;
this.itemId = json.itemId;
this.name = json.name;
this.loadoutsIcon = json.loadoutsIcon;
this.description = json.description;
this.level = json.level;
this.speciesName = json.speciesName;
this.speciesId = json.speciesId;
this.rarity = json.rarity;
}
getLoadoutsIcon(version: string): string {
return this.resolveGamePath({path: this.loadoutsIcon, version: version});
}
}