寻宝:协助次数&匹配范围修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { dicHero, dicMyHeroes, loadHero } from "./dictionary/DicHero";
|
||||
import { dicGoods, blueprtWithQuality, blueprtWithQualityAndStar, figureCondition, loadGoods } from "./dictionary/DicGoods";
|
||||
import { dicGoods, figureCondition, loadGoods } from "./dictionary/DicGoods";
|
||||
import { dicBlueprtCompose, loadBlueprtCompose } from "./dictionary/DicBlueprtCompose";
|
||||
import { dicBlueprtPossibility, loadBlueprtPossibility } from "./dictionary/DicBlueprtPossibility";
|
||||
import { dicDaily, loadDaily } from "./dictionary/DicDaily";
|
||||
@@ -18,7 +18,7 @@ import { dicTowerTask, loadTowerTask } from "./dictionary/DicTowerTask";
|
||||
import { dicWar, dicWarPvp, dicDailyWarByType, loadWar } from "./dictionary/DicWar";
|
||||
import { dicWarJson, loadWarJson } from "./dictionary/DicWarJson";
|
||||
import { dicXunbao, loadXunbao } from "./dictionary/DicXunbao";
|
||||
import { AUCTION_TIME, CONSUME_TYPE, ITID, SPECIAL_ATTR } from "../consts";
|
||||
import { AUCTION_TIME, CONSUME_TYPE, ITID } from "../consts";
|
||||
import { dicFashions, dicFashionsByHeroId, loadFashions } from "./dictionary/DicFashions";
|
||||
import { friendShips, friendShipHidAandIds, loadFriendShip } from "./dictionary/DicFriendShip";
|
||||
import { maxFriendShipLv, dicFriendShipLevelMap, loadFriendShipLevel } from "./dictionary/DicFriendShipLevel";
|
||||
@@ -101,7 +101,7 @@ import { dicServerConst, loadServerConst } from './dictionary/DicServerConst';
|
||||
import { pick } from "underscore";
|
||||
import _ = require("underscore");
|
||||
import { dicEquipById, dicEquipIdByJobClassAndEplace, loadEquip } from "./dictionary/DicEquip";
|
||||
import { dicJewel, loadJewel } from "./dictionary/DicJewel";
|
||||
import { dicBlueprt, dicBlueprtByLv, dicJewel, loadJewel } from "./dictionary/DicJewel";
|
||||
import { dicStone, loadStone } from './dictionary/DicStone';
|
||||
import { dicEquipStrength, loadEquipStrength } from "./dictionary/DicEquipStrength";
|
||||
import { dicEquipQuality, dicEquipQualityIdByEquipIdAndPoint, loadEquipQuality } from "./dictionary/DicEquipQuality";
|
||||
@@ -141,9 +141,6 @@ export const gameData = {
|
||||
xunbao: dicXunbao,
|
||||
btlBossHpSum: new Map<number, number>(),
|
||||
btlBossHp: new Map<number, Array<{ dataId: number, hp: number, actorId: number }>>(),
|
||||
blueprtToWar: new Map<number, number>(),
|
||||
blueprt: blueprtWithQuality,
|
||||
blueprtWithQualityAndStar: blueprtWithQualityAndStar,
|
||||
fashion: dicFashions,
|
||||
fashionBySkinId: dicFashionsByHeroId,
|
||||
friendShips: friendShips,
|
||||
@@ -270,6 +267,8 @@ export const gameData = {
|
||||
equipSuit: dicEquipSuit,
|
||||
equipSuitByJobClass: dicEquipSuitByJobClass,
|
||||
jewelCondition: dicJewelCondition,
|
||||
blueprt: dicBlueprt,
|
||||
blueprtByLv: dicBlueprtByLv,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -362,21 +361,6 @@ export function getBossHpByWarId(warId: number) {
|
||||
return { bossHpSum, bossHpArr };
|
||||
}
|
||||
|
||||
|
||||
export function getWarIdByBlueprtId(blueprtId: number) {
|
||||
let warId = gameData.blueprtToWar.get(blueprtId);
|
||||
if (!warId) {
|
||||
let blueprt = gameData.goods.get(blueprtId);
|
||||
if (blueprt) {
|
||||
const { specialAttr } = blueprt;
|
||||
warId = specialAttr.get(SPECIAL_ATTR.WAR_ID);
|
||||
if (warId)
|
||||
gameData.blueprtToWar.set(blueprtId, warId);
|
||||
}
|
||||
}
|
||||
return warId;
|
||||
}
|
||||
|
||||
export function getBossHpByBlueprtId(blueprtId: number) {
|
||||
let { dispatchJsonId } = getWarByBlueprtId(blueprtId);
|
||||
let bossHpInfo = getBossHpByWarId(dispatchJsonId);
|
||||
@@ -384,8 +368,8 @@ export function getBossHpByBlueprtId(blueprtId: number) {
|
||||
}
|
||||
|
||||
export function getWarByBlueprtId(blueprtId: number) {
|
||||
let warId = getWarIdByBlueprtId(blueprtId);
|
||||
return gameData.war.get(warId);
|
||||
let dicBlueprt = getDicBlueprtById(blueprtId);
|
||||
return gameData.war.get(dicBlueprt.gkId);
|
||||
}
|
||||
|
||||
export function getRewardByBlueprtId(blueprtId: number) {
|
||||
@@ -401,7 +385,7 @@ function parseComBtlLvRange() {
|
||||
}
|
||||
|
||||
export function comBtlRanges() {
|
||||
return Array.from(gameData.comBtlLvRange.keys());
|
||||
return Array.from(gameData.blueprtByLv.keys());
|
||||
}
|
||||
|
||||
|
||||
@@ -926,6 +910,11 @@ export function getJewelConditionByLvAndSeId(lv: number, randSeId: number) {
|
||||
return gameData.jewelCondition.get(`${lv}_${randSeId}`);
|
||||
}
|
||||
|
||||
export function getDicBlueprtById(id: number) {
|
||||
let jewel = gameData.blueprt.get(id);
|
||||
return gameData.jewel.get(jewel);
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
|
||||
Reference in New Issue
Block a user