战力:初步
This commit is contained in:
@@ -540,6 +540,7 @@ export const FILENAME = {
|
||||
DIC_STONE: 'dic_zyz_stone',
|
||||
DIC_JEWEL_CONDITION: 'dic_zyz_jewel_condition',
|
||||
DIC_MAIN_STAR_BOX: 'dic_zyz_main_star_reward',
|
||||
DIC_EQUIP_STRENGTH_ATTR: 'dic_zyz_equipStrengthAttr',
|
||||
}
|
||||
|
||||
export const WAR_RELATE_TABLES = [
|
||||
|
||||
@@ -111,7 +111,7 @@ export class EPlace {
|
||||
@prop({ required: true })
|
||||
equipId: number;
|
||||
@prop({ required: true })
|
||||
lv: number = 1;
|
||||
lv: number = 0;
|
||||
@prop({ required: true })
|
||||
quality: number = 1;
|
||||
@prop({ required: true })
|
||||
|
||||
@@ -103,6 +103,7 @@ import { dicJewelCondition, loadJewelCondition } from './dictionary/DicJewelCond
|
||||
import { dicMainStarBox, dicMainStarBoxByChapter, loadMainStarBox } from './dictionary/DicMainStarBox';
|
||||
import { dicHeroTalent, initTalents, loadHeroTalent } from './dictionary/DicHeroTalent';
|
||||
import { Talent } from "../db/Hero";
|
||||
import { dicEquipStrengthAttr, loadEquipStrengthAttr } from './dictionary/DicEquipStrengthAttr';
|
||||
|
||||
export const gameData = {
|
||||
daily: dicDaily,
|
||||
@@ -257,6 +258,7 @@ export const gameData = {
|
||||
heroTalent: dicHeroTalent,
|
||||
initTalents: initTalents,
|
||||
talentPointOfJob: talentPointOfJob,
|
||||
equipStrengthAttr: dicEquipStrengthAttr
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -882,6 +884,11 @@ export function getHeroInitTalent(skinId: number) {
|
||||
return ids.map(id => (new Talent(id)));
|
||||
}
|
||||
|
||||
export function getEquipStrenthenAttr(equipId: number, lv: number) {
|
||||
let result = gameData.equipStrengthAttr.get(`${equipId}_${lv}`);
|
||||
return result
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
@@ -1049,6 +1056,7 @@ function loadDatas() {
|
||||
loadJewelCondition();
|
||||
loadMainStarBox();
|
||||
loadHeroTalent();
|
||||
loadEquipStrengthAttr();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
39
shared/pubUtils/dictionary/DicEquipStrengthAttr.ts
Normal file
39
shared/pubUtils/dictionary/DicEquipStrengthAttr.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// 装备强化表
|
||||
import { readFileAndParse, parseGoodStr, decodeArrayListStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicEquipStrengthAttr {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 装备id
|
||||
readonly equipId: number;
|
||||
// 等级
|
||||
readonly lv: number;
|
||||
// 属性
|
||||
readonly attr: {id: number, num: number}[];
|
||||
}
|
||||
|
||||
export const dicEquipStrengthAttr = new Map<string, DicEquipStrengthAttr>();
|
||||
export function loadEquipStrengthAttr() {
|
||||
dicEquipStrengthAttr.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_STRENGTH_ATTR);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.attr = parseAttr(o.attr);
|
||||
dicEquipStrengthAttr.set(`${o.equipId}_${o.lv}`, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{id: number, num: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, num] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), num: parseInt(num)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -5,8 +5,6 @@
|
||||
"jobClass": 1,
|
||||
"eplaceId": 1,
|
||||
"suitId": 1,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -16,8 +14,6 @@
|
||||
"jobClass": 1,
|
||||
"eplaceId": 2,
|
||||
"suitId": 1,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -27,8 +23,6 @@
|
||||
"jobClass": 1,
|
||||
"eplaceId": 3,
|
||||
"suitId": 1,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -38,8 +32,6 @@
|
||||
"jobClass": 1,
|
||||
"eplaceId": 4,
|
||||
"suitId": 1,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -49,8 +41,6 @@
|
||||
"jobClass": 2,
|
||||
"eplaceId": 1,
|
||||
"suitId": 2,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -60,8 +50,6 @@
|
||||
"jobClass": 2,
|
||||
"eplaceId": 2,
|
||||
"suitId": 2,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -71,8 +59,6 @@
|
||||
"jobClass": 2,
|
||||
"eplaceId": 3,
|
||||
"suitId": 2,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -82,8 +68,6 @@
|
||||
"jobClass": 2,
|
||||
"eplaceId": 4,
|
||||
"suitId": 2,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -93,8 +77,6 @@
|
||||
"jobClass": 3,
|
||||
"eplaceId": 1,
|
||||
"suitId": 3,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -104,8 +86,6 @@
|
||||
"jobClass": 3,
|
||||
"eplaceId": 2,
|
||||
"suitId": 3,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -115,8 +95,6 @@
|
||||
"jobClass": 3,
|
||||
"eplaceId": 3,
|
||||
"suitId": 3,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -126,8 +104,6 @@
|
||||
"jobClass": 3,
|
||||
"eplaceId": 4,
|
||||
"suitId": 3,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -137,8 +113,6 @@
|
||||
"jobClass": 4,
|
||||
"eplaceId": 1,
|
||||
"suitId": 4,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -148,8 +122,6 @@
|
||||
"jobClass": 4,
|
||||
"eplaceId": 2,
|
||||
"suitId": 4,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -159,8 +131,6 @@
|
||||
"jobClass": 4,
|
||||
"eplaceId": 3,
|
||||
"suitId": 4,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -170,8 +140,6 @@
|
||||
"jobClass": 4,
|
||||
"eplaceId": 4,
|
||||
"suitId": 4,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -181,8 +149,6 @@
|
||||
"jobClass": 5,
|
||||
"eplaceId": 1,
|
||||
"suitId": 5,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -192,8 +158,6 @@
|
||||
"jobClass": 5,
|
||||
"eplaceId": 2,
|
||||
"suitId": 5,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -203,8 +167,6 @@
|
||||
"jobClass": 5,
|
||||
"eplaceId": 3,
|
||||
"suitId": 5,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -214,8 +176,6 @@
|
||||
"jobClass": 5,
|
||||
"eplaceId": 4,
|
||||
"suitId": 5,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -225,8 +185,6 @@
|
||||
"jobClass": 6,
|
||||
"eplaceId": 1,
|
||||
"suitId": 6,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -236,8 +194,6 @@
|
||||
"jobClass": 6,
|
||||
"eplaceId": 2,
|
||||
"suitId": 6,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -247,8 +203,6 @@
|
||||
"jobClass": 6,
|
||||
"eplaceId": 3,
|
||||
"suitId": 6,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -258,8 +212,6 @@
|
||||
"jobClass": 6,
|
||||
"eplaceId": 4,
|
||||
"suitId": 6,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -269,8 +221,6 @@
|
||||
"jobClass": 7,
|
||||
"eplaceId": 1,
|
||||
"suitId": 7,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -280,8 +230,6 @@
|
||||
"jobClass": 7,
|
||||
"eplaceId": 2,
|
||||
"suitId": 7,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -291,8 +239,6 @@
|
||||
"jobClass": 7,
|
||||
"eplaceId": 3,
|
||||
"suitId": 7,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
@@ -302,8 +248,6 @@
|
||||
"jobClass": 7,
|
||||
"eplaceId": 4,
|
||||
"suitId": 7,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "50001&2",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
}
|
||||
|
||||
14002
shared/resource/jsons/dic_zyz_equipStrengthAttr.json
Normal file
14002
shared/resource/jsons/dic_zyz_equipStrengthAttr.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user