解析修改:playerCeService
This commit is contained in:
@@ -124,11 +124,11 @@ export const ABI_TYPE_TO_STAGE = new Map<number, number | ((jobType: number) =>
|
||||
[ABI_STAGE.LUK, ABI_TYPE.ABI_LUK]
|
||||
]);
|
||||
|
||||
export function getAtrrNameById(attrId: number) {
|
||||
export function getAtrrNameById(attrId: number):string {
|
||||
return HERO_ATTR[attrId];
|
||||
};
|
||||
|
||||
export function getAttrCeRatio(attr: string) {
|
||||
export function getAttrCeRatio(attr: string):number {
|
||||
return CE_RATIO[attr];
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { dicXunbao } from "./dictionary/DicXunbao";
|
||||
import { SPECIAL_ATTR } from "../consts/consts";
|
||||
import { dicFashions } from "./dictionary/DicFashions";
|
||||
import { friendShips, friendShipHidAandIds } from "./dictionary/DicFriendShip";
|
||||
import { dicFriendShipLevel } from "./dictionary/DicFriendShipLevel";
|
||||
import { dicFriendShipLevel, dicFriendShipLevelMap } from "./dictionary/DicFriendShipLevel";
|
||||
import { dicHeroQualityUp } from "./dictionary/DicHeroQualityUp";
|
||||
import { dicHeroStar } from "./dictionary/DicHeroStar";
|
||||
import { dicHeroWake } from "./dictionary/DicHeroWake";
|
||||
@@ -59,7 +59,8 @@ export const gameData = {
|
||||
fashion: dicFashions,
|
||||
friendShips: friendShips,
|
||||
friendShipHidAandIds: friendShipHidAandIds,
|
||||
friendShipLevel: dicFriendShipLevel
|
||||
friendShipLevel: dicFriendShipLevel,
|
||||
friendShipLevelMap: dicFriendShipLevelMap
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
|
||||
@@ -8,9 +8,9 @@ export interface DicFashions {
|
||||
// 增加的被动技能
|
||||
readonly seid: Array<number>;
|
||||
// 全局加成
|
||||
readonly globalAttr: Array<{type: number, value: number}>;
|
||||
readonly globalAttr: Array<{id: number, number: number}>;
|
||||
// 单体加成
|
||||
readonly actorAttr: Array<{type: number, value: number}>;
|
||||
readonly actorAttr: Array<{id: number, number: number}>;
|
||||
// 角色id
|
||||
readonly actorId: number;
|
||||
}
|
||||
@@ -27,14 +27,14 @@ arr.forEach(o => {
|
||||
});
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{type: number, value: number}>();
|
||||
let result = new Array<{id: number, number: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [type, value] of decodeArr) {
|
||||
if(isNaN(parseInt(type)) || isNaN(parseInt(value))) {
|
||||
for(let [id, number] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(number))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({type: parseInt(type), value: parseInt(value)});
|
||||
result.push({id: parseInt(id), number: parseInt(number)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -16,7 +16,7 @@ export interface DicFriendShip {
|
||||
// 羁绊武将ID
|
||||
readonly hids: Array<number>;
|
||||
// 属性加成
|
||||
readonly attribute: Array<{id: number, number: number}>
|
||||
readonly attributes: Array<{id: number, number: number}>
|
||||
// 消耗铜币
|
||||
readonly costCoin: number;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ let arr = JSON.parse(str);
|
||||
export const friendShips = new Map<string, DicFriendShip>();
|
||||
export const friendShipHidAandIds = new Map<number, {actorId: number, level:number}>();
|
||||
arr.forEach(o => {
|
||||
o.attribute = parseAttribute(o.attribute);
|
||||
o.attributes = parseAttribute(o.attribute);
|
||||
o.hids = parseNumberList(o.memberId);
|
||||
friendShips.set(o.shipId + '_' + o.level, o);
|
||||
let fiendShipHidAandId = friendShipHidAandIds.get(o.shipId);
|
||||
|
||||
@@ -15,8 +15,10 @@ const str = readJsonFile(FILENAME.DIC_FRIEND_SHIP_LEVEL);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicFriendShipLevel = new Array<DicFriendShipLevel>();
|
||||
export const dicFriendShipLevelMap = new Map<number, DicFriendShipLevel>();
|
||||
arr.forEach(o => {
|
||||
dicFriendShipLevel.push(o);
|
||||
dicFriendShipLevelMap.set(o.level, o);
|
||||
});
|
||||
dicFriendShipLevel.sort(function(a, b) {
|
||||
return a.level - b.level;
|
||||
|
||||
@@ -7,13 +7,7 @@
|
||||
"level": 1,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&200|2&300",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
@@ -23,13 +17,7 @@
|
||||
"level": 2,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&300|2&400",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
@@ -39,13 +27,7 @@
|
||||
"level": 3,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&400|2&500",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
@@ -55,13 +37,7 @@
|
||||
"level": 4,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&600|2&700",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
@@ -71,13 +47,7 @@
|
||||
"level": 5,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&800|2&900",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
@@ -87,13 +57,7 @@
|
||||
"level": 6,
|
||||
"memberId": "2&3&4&5",
|
||||
"attribute": "1&1000|2&1000",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
@@ -103,13 +67,7 @@
|
||||
"level": 1,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&200|2&300",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
@@ -119,13 +77,7 @@
|
||||
"level": 2,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&300|2&400",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
@@ -135,13 +87,7 @@
|
||||
"level": 3,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&400|2&500",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
@@ -151,13 +97,7 @@
|
||||
"level": 4,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&600|2&700",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
@@ -167,13 +107,7 @@
|
||||
"level": 5,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&800|2&900",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
@@ -183,13 +117,7 @@
|
||||
"level": 6,
|
||||
"memberId": "6&7",
|
||||
"attribute": "1&1000|2&1000",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
@@ -199,13 +127,7 @@
|
||||
"level": 1,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&200|2&300",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
@@ -215,13 +137,7 @@
|
||||
"level": 2,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&300|2&400",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
@@ -231,13 +147,7 @@
|
||||
"level": 3,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&400|2&500",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
@@ -247,13 +157,7 @@
|
||||
"level": 4,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&600|2&700",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
@@ -263,13 +167,7 @@
|
||||
"level": 5,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&800|2&900",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
@@ -279,12 +177,6 @@
|
||||
"level": 6,
|
||||
"memberId": "8&",
|
||||
"attribute": "1&1000|2&1000",
|
||||
"costCoin": 5000,
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0,
|
||||
"__EMPTY_2": 0,
|
||||
"__EMPTY_3": 0,
|
||||
"__EMPTY_4": 0,
|
||||
"__EMPTY_5": 0
|
||||
"costCoin": 0
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user