寻宝:协助次数&匹配范围修改
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();
|
||||
|
||||
@@ -66,7 +66,8 @@ export const ARMY = {
|
||||
export const TREASURE = {
|
||||
CAPTAIN_DROP: 5, // 普通套装图纸队长必掉落次数
|
||||
TEAMMATE_DROP: 10, // 普通套装图纸队员必掉落次数
|
||||
TREASURE_ASSIST_LIMITED: '1&1&999|2&21&999|3&41&999|4&61&999|5&81&999|6&100&999', // 协助寻宝星级开启玩家等级限制
|
||||
TREASURE_ASSIST_LIMITED: '1&1&999|2&20&999|3&30&999|4&40&999|5&50&999|6&60&999|7&70&999|8&80&999|9&90&999', // 协助寻宝星级开启玩家等级限制
|
||||
TREASURE_ASSIST_TIME: 6, // 协助寻宝总次数
|
||||
};
|
||||
export const FRIEND = {
|
||||
FRIEND_CLOSEPOINT_ADD: 5, // 每赠送/领取一次增加的亲密度
|
||||
|
||||
@@ -109,14 +109,10 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
equipLvl: true
|
||||
}
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
export const blueprtWithQuality = new Map<number, Array<number>>();
|
||||
export const blueprtWithQualityAndStar = new Map<string, Array<number>>();
|
||||
export const figureCondition = new Map<number, { params: number[], id: number, gid: number }[]>(); // type => {params, id, gid}
|
||||
|
||||
export function loadGoods() {
|
||||
dicGoods.clear();
|
||||
blueprtWithQuality.clear();
|
||||
blueprtWithQualityAndStar.clear();
|
||||
figureCondition.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_GOODS);
|
||||
@@ -145,15 +141,6 @@ export function loadGoods() {
|
||||
o.jobLimited = parseNumberList(o.jobLimited);
|
||||
o.charLimited = parseNumberList(o.charLimited);
|
||||
dicGoods.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
|
||||
|
||||
if (o.itid == IT_TYPE.BLUEPRT) {
|
||||
let arr = blueprtWithQualityAndStar.get(`${o.quality}_${o.equipLvl}`) || new Array<number>();
|
||||
arr.push(o.good_id);
|
||||
blueprtWithQualityAndStar.set(`${o.quality}_${o.equipLvl}`, arr);
|
||||
let arr2 = blueprtWithQuality.get(o.quality) || new Array<number>();
|
||||
arr.push(o.good_id);
|
||||
blueprtWithQuality.set(o.quality, arr2);
|
||||
}
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
|
||||
@@ -24,10 +24,13 @@ export interface DicJewel {
|
||||
readonly mapGoodId: number;
|
||||
// 淬炼消耗
|
||||
readonly quenchConsume: RewardInter[];
|
||||
// 寻宝关卡id
|
||||
readonly gkId: number;
|
||||
}
|
||||
|
||||
|
||||
export const dicJewel = new Map<number, DicJewel>();
|
||||
export const dicBlueprt = new Map<number, number>();
|
||||
export const dicBlueprtByLv = new Map<number, number[]>();
|
||||
export function loadJewel() {
|
||||
dicJewel.clear();
|
||||
|
||||
@@ -37,6 +40,11 @@ export function loadJewel() {
|
||||
o.randomEffect = parseNumberList(o.randomEffect);
|
||||
o.quenchConsume = parseGoodStr(o.quenchConsume);
|
||||
dicJewel.set(o.good_id, o);
|
||||
dicBlueprt.set(o.mapGoodId, o.good_id);
|
||||
if(!dicBlueprtByLv.has(o.lv)) {
|
||||
dicBlueprtByLv.set(o.lv, []);
|
||||
}
|
||||
dicBlueprtByLv.get(o.lv).push(o.mapGoodId);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user