✨ feat(gvg): 玩家驻扎排行榜
This commit is contained in:
@@ -10,6 +10,7 @@ import { EXTERIOR, GVG } from "../../pubUtils/dicParam";
|
||||
import { DicWarJson } from "../../pubUtils/dictionary/DicWarJson";
|
||||
import { gameData } from "../../pubUtils/data";
|
||||
import { HeroType } from "../../db/Hero";
|
||||
import { RoleRankInfo } from "../rank";
|
||||
|
||||
class LeagueLeaderInfo {
|
||||
name: string; // 盟主名
|
||||
@@ -520,4 +521,43 @@ export class GVGVestigeOppLineup {
|
||||
this.heroes.push(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class VestigeRank {
|
||||
rank: number;
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
guildName: string;
|
||||
serverName: string;
|
||||
lv: number;
|
||||
head: number;
|
||||
frame: number;
|
||||
lineupCe: number;
|
||||
score: number;
|
||||
|
||||
setByRankParam(obj: RoleRankInfo, serverName: string, lineupCe: number, score: number) {
|
||||
this.rank = obj.rank;
|
||||
this.roleId = obj.roleId;
|
||||
this.roleName = obj.roleName;
|
||||
this.guildName = obj.guildName;
|
||||
this.serverName = serverName;
|
||||
this.lv = obj.lv;
|
||||
this.head = obj.head;
|
||||
this.frame = obj.frame;
|
||||
this.lineupCe = lineupCe;
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
setByRole(role: RoleType, serverName: string) {
|
||||
this.rank = 0;
|
||||
this.roleId = role.roleId;
|
||||
this.roleName = role.roleName;
|
||||
this.guildName = role.guildName;
|
||||
this.serverName = serverName;
|
||||
this.lv = role.lv;
|
||||
this.head = role.head;
|
||||
this.frame = role.frame;
|
||||
this.lineupCe = 0;
|
||||
this.score = 0;
|
||||
}
|
||||
}
|
||||
@@ -301,6 +301,9 @@ export class KeyName {
|
||||
seasonNum?: number;
|
||||
activityId?: number;
|
||||
index?: number; // 军团活动第几期
|
||||
vestigeId?: number;
|
||||
groupId?: number;
|
||||
serverType?: number;
|
||||
|
||||
constructor(key: string, param: KeyNameParam) {
|
||||
this.key = key;
|
||||
@@ -311,6 +314,9 @@ export class KeyName {
|
||||
if(param.seasonNum) this.seasonNum = param.seasonNum;
|
||||
if(param.activityId) this.activityId = param.activityId;
|
||||
if(param.index) this.index = param.index;
|
||||
if(param.vestigeId) this.vestigeId = param.vestigeId;
|
||||
if(param.groupId) this.groupId = param.groupId;
|
||||
if(param.serverType) this.serverType = param.serverType;
|
||||
}
|
||||
|
||||
public getName() {
|
||||
@@ -343,6 +349,10 @@ export class KeyName {
|
||||
case REDIS_KEY.SUM_CE_SNAPSHOT:
|
||||
case REDIS_KEY.TOP_LINE_SNAPSHOT:
|
||||
return `${this.key}:${this.serverId}:${this.activityId}`;
|
||||
case REDIS_KEY.GVG_VESTIGE_MEMBER:
|
||||
return `${this.key}:${this.groupId}:${this.serverType}:${this.vestigeId}`;
|
||||
case REDIS_KEY.GVG_VESTIGE_MEMBER_ALL:
|
||||
return `${this.key}:${this.groupId}`;
|
||||
default:
|
||||
return this.key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user