军团:添加活跃排行榜
This commit is contained in:
@@ -47,6 +47,7 @@ import { dicGuildAuth } from './dictionary/DicGuildAuth';
|
||||
import { dicCenterBase, dicEquipPriduceBase, dicBossBase, dicTrainBase, dicDonateBase, dicWishPoolBase, dicStoreBase, dicStructureConsume } from "./dictionary/DicStructure";
|
||||
import { dicGuildActiveDayReward } from './dictionary/DicGuildActiveDayReward';
|
||||
import { dicGuildActiveWeekReward } from './dictionary/DicGuildActiveWeekReward';
|
||||
import { dicGuildActiveWays } from './dictionary/DicGuildActiveWays';
|
||||
import { dicGuildPosition } from "./dictionary/DicGuildPosition";
|
||||
import { dicMail } from "./dictionary/DicMail";
|
||||
import { dicArmyTrainJuDian } from './dictionary/DicArmyTrainJuDian';
|
||||
@@ -126,7 +127,8 @@ export const gameData = {
|
||||
guildPosition: dicGuildPosition,
|
||||
armyTrainJuDian: dicArmyTrainJuDian,
|
||||
trainSoloReward: dicTrainSoloReward,
|
||||
mail: dicMail
|
||||
mail: dicMail,
|
||||
guildActiveWays: dicGuildActiveWays
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -362,3 +364,9 @@ export function getGuildActiveWeekReward(point: number) {
|
||||
if(result) reward = result.reward;
|
||||
return reward;
|
||||
}
|
||||
|
||||
export function getGuildActiveByIdAndType(id: number, type: number) {
|
||||
let dicWay = gameData.guildActiveWays.get(id);
|
||||
if(!dicWay) return 0;
|
||||
return dicWay.activePoint.get(type.toString());
|
||||
}
|
||||
|
||||
25
shared/pubUtils/dictionary/DicGuildActiveWays.ts
Normal file
25
shared/pubUtils/dictionary/DicGuildActiveWays.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
// 各种操作可以增加的活跃
|
||||
import { readJsonFile, decodeIdCntArrayStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicGuildActiveWays {
|
||||
|
||||
// id
|
||||
readonly id: number;
|
||||
// 最大次数
|
||||
readonly count: number;
|
||||
// 奖励
|
||||
readonly activePoint: Map<string, number>;
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_ARMY_ACTIVE_POINT_WAYS);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicGuildActiveWays = new Map<number, DicGuildActiveWays>();
|
||||
|
||||
arr.forEach(o => {
|
||||
o.activePoint = decodeIdCntArrayStr(o.activePoint, 1);
|
||||
dicGuildActiveWays.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
@@ -122,6 +122,43 @@ export class RankParam {
|
||||
}
|
||||
}
|
||||
|
||||
export class GuildRankParam {
|
||||
icon: number;
|
||||
name: string;
|
||||
lv: number;
|
||||
leader: {
|
||||
roleName: string;
|
||||
title: number;
|
||||
lv: number;
|
||||
headHid: number;
|
||||
sHid: number;
|
||||
}
|
||||
|
||||
constructor(icon: number, name: string, lv: number, leader: {roleName: string, title: number, lv: number, headHid: number, sHid: number}) {
|
||||
this.icon = icon;
|
||||
this.name = name;
|
||||
this.lv = lv;
|
||||
let _leader = new GuildLeader(leader);
|
||||
this.leader = _leader;
|
||||
}
|
||||
}
|
||||
|
||||
export class GuildLeader {
|
||||
roleName: string;
|
||||
title: number;
|
||||
lv: number;
|
||||
headHid: number;
|
||||
sHid: number;
|
||||
|
||||
constructor(leader: {roleName: string, title: number, lv: number, headHid: number, sHid: number}) {
|
||||
this.roleName = leader.roleName;
|
||||
this.title = leader.title;
|
||||
this.lv = leader.lv;
|
||||
this.headHid = leader.headHid;
|
||||
this.sHid = leader.sHid;
|
||||
}
|
||||
}
|
||||
|
||||
export class PlayerDetailHero {
|
||||
actorId: number;
|
||||
lv: number;
|
||||
|
||||
Reference in New Issue
Block a user