体力:修改体力逻辑
This commit is contained in:
@@ -85,6 +85,7 @@ import { loadRMB, dicRMB } from './dictionary/DicRMB';
|
||||
import { dicActivityType, loadActivityType } from './dictionary/DicActivityType';
|
||||
import { dicTaskTypeDesc, loadTaskType } from './dictionary/DicTaskType';
|
||||
import { dicServerName, dicServerGroupName, loadServerName } from "./dictionary/DicServerName";
|
||||
import { dicAp, loadAp, dicApMaxLevel } from './dictionary/DicAp';
|
||||
|
||||
export const gameData = {
|
||||
blurprtCompose: dicBlueprtCompose,
|
||||
@@ -208,6 +209,8 @@ export const gameData = {
|
||||
taskTypeDesc: dicTaskTypeDesc,
|
||||
serverNames: dicServerName,
|
||||
serverGroupNames: dicServerGroupName,
|
||||
ap: dicAp,
|
||||
apMaxLevel: dicApMaxLevel
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -701,6 +704,14 @@ export function getServerName(id: number) {
|
||||
return name;
|
||||
}
|
||||
|
||||
export function getDicApByLv(level: number) {
|
||||
if(level > gameData.apMaxLevel.max) {
|
||||
return gameData.ap.get(gameData.apMaxLevel.max);
|
||||
} else {
|
||||
return gameData.ap.get(level);
|
||||
}
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
@@ -799,6 +810,7 @@ function loadDatas() {
|
||||
loadActivityType();
|
||||
loadTaskType();
|
||||
loadServerName();
|
||||
loadAp();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
Reference in New Issue
Block a user