feat(character/pvp): add pvp page
This commit is contained in:
parent
4c051e316c
commit
05706007f1
145 changed files with 302 additions and 107 deletions
|
|
@ -3,6 +3,14 @@ export enum EFaction {
|
|||
Alliance = 1,
|
||||
}
|
||||
|
||||
export interface IEmblem {
|
||||
icon: string;
|
||||
iconColor: string;
|
||||
border: string;
|
||||
borderColor: string;
|
||||
background: string;
|
||||
}
|
||||
|
||||
export class Utils {
|
||||
public static raceNames = {
|
||||
1: "human",
|
||||
|
|
@ -32,4 +40,15 @@ export class Utils {
|
|||
public static getFactionFromRaceId(race: number): EFaction {
|
||||
return [1, 3, 4, 7, 11].includes(race) ? EFaction.Alliance : EFaction.Horde;
|
||||
}
|
||||
|
||||
public static makeEmblemObject(obj: any, padWithZeroes: boolean = true): IEmblem {
|
||||
const padLength = padWithZeroes ? 2 : 0;
|
||||
return {
|
||||
icon: obj.emblemStyle.toString().padStart(padLength, "0"),
|
||||
iconColor: obj.emblemColor.toString().padStart(padLength, "0"),
|
||||
border: obj.borderStyle.toString().padStart(padLength, "0"),
|
||||
borderColor: obj.borderColor.toString().padStart(padLength, "0"),
|
||||
background: obj.background.toString().padStart(padLength, "0"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue