后台:更新开服邮件
This commit is contained in:
@@ -83,7 +83,7 @@ import { dicRecruit, loadRecruit } from './dictionary/DicRecruit';
|
||||
import { loadRMB, dicRMB } from './dictionary/DicRMB';
|
||||
import { dicActivityType, loadActivityType } from './dictionary/DicActivityType';
|
||||
import { DicTaskType, dicTaskTypeDesc, loadTaskType } from './dictionary/DicTaskType';
|
||||
import { dicServerName, dicServerGroupName, loadServerName } from "./dictionary/DicServerName";
|
||||
import { dicServerName, loadServerName } from "./dictionary/DicServerName";
|
||||
import { dicAp, loadAp, dicApMaxLevel } from './dictionary/DicAp';
|
||||
import { dicApBuy, dicApMaxBuyTimes, loadApBuy } from "./dictionary/DicApBuy";
|
||||
import { dicKingExpRatio, loadKingExpRatio } from './dictionary/DicKingExpRatio';
|
||||
@@ -224,7 +224,6 @@ export const gameData = {
|
||||
activityType: dicActivityType,
|
||||
taskTypeDesc: dicTaskTypeDesc,
|
||||
serverNames: dicServerName,
|
||||
serverGroupNames: dicServerGroupName,
|
||||
ap: dicAp,
|
||||
apMaxLevel: dicApMaxLevel,
|
||||
apBuy: dicApBuy,
|
||||
@@ -718,22 +717,6 @@ function getCeRatio() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 根据groupId获得当前大区名
|
||||
export function getServerGroupName(groupId: number) {
|
||||
let name = gameData.serverGroupNames.get(groupId);
|
||||
if(!name) {
|
||||
let maxId = 0;
|
||||
gameData.serverGroupNames.forEach((gname, id) => {
|
||||
if(id > maxId) {
|
||||
maxId = id;
|
||||
name = gname;
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
// 根据服务器id获得当前大区名
|
||||
export function getServerName(id: number) {
|
||||
let name = gameData.serverNames.get(id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 武将特技表
|
||||
// 服务器名
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
@@ -6,32 +6,21 @@ export interface DicServerName {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 小区名
|
||||
readonly name: string;
|
||||
readonly sname: string;
|
||||
// 大区id
|
||||
readonly groupId: number;
|
||||
// 大区名
|
||||
readonly groupName: string;
|
||||
}
|
||||
|
||||
export const dicServerName = new Map<number, string>();
|
||||
export const dicServerGroupName = new Map<number, string>();
|
||||
export const dicServerName = new Map<number, DicServerName>();
|
||||
export function loadServerName() {
|
||||
dicServerName.clear();
|
||||
dicServerGroupName.clear();
|
||||
|
||||
{
|
||||
let arr = readFileAndParse(FILENAME.DIC_SERVER_NAME);
|
||||
|
||||
arr.forEach(o => {
|
||||
let { id, sname } = o;
|
||||
dicServerName.set(id, sname);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
let arr = readFileAndParse(FILENAME.DIC_SERVER_NAME);
|
||||
|
||||
{
|
||||
let arr = readFileAndParse(FILENAME.DIC_SERVER_GROUP_NAME);
|
||||
|
||||
arr.forEach(o => {
|
||||
let { id, groupName } = o;
|
||||
dicServerGroupName.set(id, groupName);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
arr.forEach(o => {
|
||||
dicServerName.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user