全局:属性修改
This commit is contained in:
@@ -35,7 +35,6 @@ import { dicTeraph } from './dictionary/DicTeraph';
|
||||
import { dicSchool } from './dictionary/DicSchool';
|
||||
import { dicSchoolRate } from './dictionary/DicSchoolRate';
|
||||
import { dicHeroScroll, preHeroScroll } from './dictionary/DicHeroScroll';
|
||||
import { ABI_TYPE_TO_STAGE } from "../consts";
|
||||
import { dicPvpOpponent } from './dictionary/DicPvpOpponent';
|
||||
import { dicPvpTeamLevel } from './dictionary/DicPvpTeamLevel';
|
||||
import { dicPvpRefreshConsume, maxPvpRefreshCnt } from './dictionary/DicPvpRefreshConsume';
|
||||
@@ -58,6 +57,7 @@ import { dicArmyBossRank } from '../pubUtils/dictionary/DicArmyBossRank';
|
||||
import { dicArmyDonate } from '../pubUtils/dictionary/DicArmyDonateBoxReward';
|
||||
import { dicRoleFriend } from "./dictionary/DicRoleFriend";
|
||||
import { dicRoleFriendLv } from "./dictionary/DicRoleFriendLv";
|
||||
import { Attribute } from "../domain/roleField/attribute";
|
||||
|
||||
export const gameData = {
|
||||
blurprtCompose: dicBlueprtCompose,
|
||||
@@ -213,7 +213,10 @@ export function getBossHpByWarId(warId: number) {
|
||||
warInfo.forEach(hero => {
|
||||
let { attribute, dataId, relation, actorId } = hero;
|
||||
if (relation === 2) {
|
||||
const hp = attribute.hp||0;
|
||||
let attrJson = new Attribute();
|
||||
attrJson.setByWarJson(attribute, 1);
|
||||
|
||||
const hp = attrJson.hp||0;
|
||||
if (hp > 0) {
|
||||
bossHpArr.push({dataId, hp, actorId});
|
||||
bossHpSum += hp;
|
||||
@@ -300,17 +303,6 @@ export function getScollByStar(quality: number, star: number, curQuality: number
|
||||
return heroScroll;
|
||||
}
|
||||
|
||||
// 根据存在升星表等的stage字段的id对应17维id
|
||||
export function getFieldByStage(stage: number, jobid: number) {
|
||||
let targetAttrId = ABI_TYPE_TO_STAGE.get(stage);
|
||||
if(typeof targetAttrId === 'number') {
|
||||
return targetAttrId
|
||||
} else {
|
||||
const dicJob = gameData.job.get(jobid);
|
||||
return targetAttrId(dicJob.type);
|
||||
}
|
||||
}
|
||||
|
||||
export function getSuit(id: number) {
|
||||
const suitInfo = gameData.suit.get(id);
|
||||
return suitInfo;
|
||||
@@ -420,7 +412,7 @@ export function getArmyWishPoolBaseByLv(lv: number) {
|
||||
|
||||
export function getFriendLvByExp(exp: number) {
|
||||
let resultLv = 1;
|
||||
for(let [lv, {sum}] of gameData.roleFriendLv) {
|
||||
for(let [lv, {sum}] of gameData.roleFriendLv.entries()) {
|
||||
resultLv = lv;
|
||||
if(exp < sum) break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user