✨ feat(服务器): 服务器命名路径修改
This commit is contained in:
@@ -844,21 +844,6 @@ function getCeRatio() {
|
||||
});
|
||||
}
|
||||
|
||||
// 根据服务器id获得当前大区名
|
||||
export function getServerName(id: number) {
|
||||
let name = gameData.serverNames.get(id);
|
||||
if(!name) {
|
||||
let maxId = 0;
|
||||
gameData.serverNames.forEach((sname, id) => {
|
||||
if(id > maxId) {
|
||||
maxId = id;
|
||||
name = sname;
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
export function getDicApByLv(level: number) {
|
||||
if(level > gameData.apMaxLevel.max) {
|
||||
return gameData.ap.get(gameData.apMaxLevel.max);
|
||||
@@ -1278,6 +1263,13 @@ function parseQuitGuildTime() {
|
||||
}
|
||||
}
|
||||
|
||||
export function getDicServerName(env: string, serverId: number) {
|
||||
let dic = gameData.serverNames.get(env);
|
||||
if(!dic) dic = gameData.serverNames.get('default');
|
||||
if(!dic) return null;
|
||||
return dic.get(serverId);
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
|
||||
Reference in New Issue
Block a user