装备:清理旧代码
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import { dicHero, dicMyHeroes, loadHero } from "./dictionary/DicHero";
|
||||
import { dicHero, loadHero } from "./dictionary/DicHero";
|
||||
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";
|
||||
import { dicEvent, dicEventList, loadEvent } from "./dictionary/DicEvent";
|
||||
import { dicExpedition, DicExpedition, loadExpedition } from "./dictionary/DicExpedition";
|
||||
import { dicExpeditionPoint, loadExpeditionPoint } from "./dictionary/DicExpeditionPoint";
|
||||
import { dicFuncSwitch, loadFuncSwitch } from "./dictionary/DicFuncSwitch";
|
||||
import { dicHeroSkill, loadHeroSkill } from "./dictionary/DicHeroSkill";
|
||||
import { dicJob, jobClassAndgrades, jobClassMaxGrades, loadJob } from "./dictionary/DicJob";
|
||||
import { dicKingExp, maxPlayerLv, loadKingExp } from "./dictionary/DicKingExp";
|
||||
@@ -18,7 +15,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 } from "../consts";
|
||||
import { AUCTION_TIME } from "../consts";
|
||||
import { dicFashions, dicFashionsByHeroId, loadFashions } from "./dictionary/DicFashions";
|
||||
import { friendShips, friendShipHidAandIds, loadFriendShip } from "./dictionary/DicFriendShip";
|
||||
import { maxFriendShipLv, dicFriendShipLevelMap, loadFriendShipLevel } from "./dictionary/DicFriendShipLevel";
|
||||
@@ -26,10 +23,6 @@ import { dicHeroQualityUp, loadHeroQualityUp } from "./dictionary/DicHeroQuality
|
||||
import { dicHeroStar, loadHeroStar } from "./dictionary/DicHeroStar";
|
||||
import { dicHeroWake, loadHeroWake } from "./dictionary/DicHeroWake";
|
||||
import { dicRandomEffectPool, loadRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||
import { dicStrengthenCost, loadStrengthenCost } from './dictionary/DicStrengthenCost';
|
||||
import { dicRefine, loadRefine } from './dictionary/DicRefine';
|
||||
import { dicHeroEquip, loadHeroEquip } from './dictionary/DicHeroEquip';
|
||||
import { dicSuit, dicSuitByTypeAndLv, loadSuit } from './dictionary/DicSuit';
|
||||
import { dicTitle, loadTitle } from './dictionary/DicTitle';
|
||||
import { dicTeraph, loadTeraph } from './dictionary/DicTeraph';
|
||||
import { dicSchool, loadSchool } from './dictionary/DicSchool';
|
||||
@@ -87,8 +80,6 @@ import { dicServerName, loadServerName } from "./dictionary/DicServerName";
|
||||
import { dicAp, loadAp, dicApMaxLevel } from './dictionary/DicAp';
|
||||
import { dicApBuy, dicApMaxBuyTimes, loadApBuy } from "./dictionary/DicApBuy";
|
||||
import { dicKingExpRatio, loadKingExpRatio } from './dictionary/DicKingExpRatio';
|
||||
import { dicQuenchByQuality, dicQuenchRangeByQuality, dicQuenchRangeByQualityAndGrade, loadQuenchQuality } from './dictionary/DicQuenchQuality';
|
||||
import { dicQuenchConsume, loadQuenchConsume } from './dictionary/DicQuenchConsume';
|
||||
import { dicHoliday, loadHoliday } from './dictionary/DicHoliday';
|
||||
import { dicExpeditionSubAttr, loadExpeditionSubAttr } from './dictionary/DicExpeditionSubAttr';
|
||||
import { dicAuctionPool, loadAuctionReward } from './dictionary/DicAuctionReward';
|
||||
@@ -111,14 +102,11 @@ import { dicEquipSuit, dicEquipSuitByJobClass, loadEquipSuit } from "./dictionar
|
||||
import { dicJewelCondition, loadJewelCondition } from './dictionary/DicJewelCondition';
|
||||
|
||||
export const gameData = {
|
||||
blurprtCompose: dicBlueprtCompose,
|
||||
blueprtPossibility: dicBlueprtPossibility,
|
||||
daily: dicDaily,
|
||||
event: dicEvent,
|
||||
eventList: dicEventList,
|
||||
expedition: dicExpedition,
|
||||
expeditionPoint: dicExpeditionPoint,
|
||||
funcsSwitch: dicFuncSwitch,
|
||||
goods: dicGoods,
|
||||
hero: dicHero,
|
||||
heroQualityUp: dicHeroQualityUp,
|
||||
@@ -148,11 +136,6 @@ export const gameData = {
|
||||
maxFriendShipLv: maxFriendShipLv,
|
||||
friendShipLevelMap: dicFriendShipLevelMap,
|
||||
randomEffectPool: dicRandomEffectPool,
|
||||
strengthenCost: dicStrengthenCost,
|
||||
refine: dicRefine,
|
||||
dicHeroEquip: dicHeroEquip,
|
||||
suit: dicSuit,
|
||||
suitByTypeAndLv: dicSuitByTypeAndLv,
|
||||
title: dicTitle,
|
||||
teraphs: dicTeraph,
|
||||
school: dicSchool,
|
||||
@@ -209,7 +192,6 @@ export const gameData = {
|
||||
shop: dicShop,
|
||||
shopItem: dicShopItem,
|
||||
shopList: dicShopList,
|
||||
dicMyHeroes: dicMyHeroes,
|
||||
rank: dicRank,
|
||||
generalRankReward: dicRankReward,
|
||||
taskType: dicTaskType,
|
||||
@@ -239,10 +221,6 @@ export const gameData = {
|
||||
apBuy: dicApBuy,
|
||||
apMaxBuyTimes: dicApMaxBuyTimes,
|
||||
kingExpRaio: dicKingExpRatio,
|
||||
quenchRangeByQuality: dicQuenchRangeByQuality,
|
||||
quenchRangeByQualityAndGrade: dicQuenchRangeByQualityAndGrade,
|
||||
quenchConsume: dicQuenchConsume,
|
||||
quenchByQuality: dicQuenchByQuality,
|
||||
equipAttributeRatio: new Map<number, number>(),
|
||||
ceRatio: new Array<{type: number, val: number}>(),
|
||||
holiday: dicHoliday,
|
||||
@@ -414,10 +392,6 @@ export function getGoodById(gid: number) {
|
||||
return gameData.goods.get(gid);
|
||||
}
|
||||
|
||||
export function getHeroEquipByClassId(classId: number) {
|
||||
return gameData.dicHeroEquip.get(classId);
|
||||
}
|
||||
|
||||
export function getHeroJob(jobId: number) {
|
||||
const job = gameData.job.get(jobId);
|
||||
return job;
|
||||
@@ -443,16 +417,6 @@ export function getScollByStar(quality: number, star: number, curQuality: number
|
||||
return heroScroll;
|
||||
}
|
||||
|
||||
export function getSuit(id: number) {
|
||||
const suitInfo = gameData.suit.get(id);
|
||||
return suitInfo;
|
||||
}
|
||||
|
||||
export function getFuncsSwitch(id: number) {
|
||||
const funcInfo = gameData.funcsSwitch.get(id);
|
||||
return funcInfo;
|
||||
}
|
||||
|
||||
export function getPLvByScore(score: number) {
|
||||
let lv = 0;
|
||||
for (let { teamLv, topLineupMin, topLineupMax } of gameData.pvpTeamLevel) {
|
||||
@@ -750,50 +714,10 @@ export function getDicApByLv(level: number) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getDicSuitByTypeAndLv(suitType: number, starLevel: number) {
|
||||
return gameData.suitByTypeAndLv.get(`${suitType}_${starLevel}`);
|
||||
}
|
||||
|
||||
export function getQuenchGradeByValue(quality: number, value: number) {
|
||||
|
||||
let dicQuench = gameData.quenchByQuality.get(quality)||[];
|
||||
let grade = 0;
|
||||
for(let [_grade, { singleRatioMin, singleRatioMax }] of dicQuench) {
|
||||
if((value >= singleRatioMin && value < singleRatioMax) || (value == singleRatioMin && value == singleRatioMax) ) {
|
||||
grade = _grade;
|
||||
}
|
||||
}
|
||||
return grade;
|
||||
}
|
||||
|
||||
export function getWishPoolReward(id: number) {
|
||||
let dicGoods = gameData.goods.get(id);
|
||||
if(!dicGoods) return false;
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
let starLevel = 0;
|
||||
if(dicItid.type == CONSUME_TYPE.PIECE) {
|
||||
starLevel = dicGoods.equipLvl;
|
||||
}
|
||||
// console.log('*****', dicGoods.itid, starLevel, dicGoods.quality)
|
||||
return gameData.guildWishReward.get(`${dicGoods.itid}_${starLevel}_${dicGoods.quality}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根绝品质和品相获得上下限,当grade为0,获取该品质下全阶的上下限
|
||||
* @param quality 品质
|
||||
* @param grade 品相
|
||||
* @returns {{ min: number, max: number }}
|
||||
*/
|
||||
export function getQuenchByQualityAndGrade(quality: number, grade: number) {
|
||||
if(grade == 0) { // 这个品质的上下限
|
||||
return gameData.quenchRangeByQuality.get(quality);
|
||||
} else { // 该品质该品相的上下限
|
||||
return gameData.quenchRangeByQualityAndGrade.get(`${quality}_${grade}`);
|
||||
}
|
||||
}
|
||||
|
||||
export function getQuenchConsume(lvLimited: number, quality: number) {
|
||||
return gameData.quenchConsume.get(`${lvLimited}_${quality}`);
|
||||
return gameData.guildWishReward.get(`${dicGoods.itid}_${dicGoods.quality}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -988,13 +912,10 @@ function treatTaskGroup() {
|
||||
function loadDatas() {
|
||||
loadHero();
|
||||
loadGoods();
|
||||
loadBlueprtCompose();
|
||||
loadBlueprtPossibility();
|
||||
loadDaily();
|
||||
loadEvent();
|
||||
loadExpedition();
|
||||
loadExpeditionPoint();
|
||||
loadFuncSwitch();
|
||||
loadHeroSkill();
|
||||
loadJob();
|
||||
loadKingExp();
|
||||
@@ -1013,10 +934,6 @@ function loadDatas() {
|
||||
loadHeroStar();
|
||||
loadHeroWake();
|
||||
loadRandomEffectPool();
|
||||
loadStrengthenCost();
|
||||
loadRefine();
|
||||
loadHeroEquip();
|
||||
loadSuit();
|
||||
loadTitle();
|
||||
loadTeraph();
|
||||
loadSchool();
|
||||
@@ -1067,8 +984,6 @@ function loadDatas() {
|
||||
loadAp();
|
||||
loadApBuy();
|
||||
loadKingExpRatio();
|
||||
loadQuenchQuality();
|
||||
loadQuenchConsume();
|
||||
loadEquipAttributeRatio();
|
||||
loadHoliday();
|
||||
loadExpeditionSubAttr();
|
||||
|
||||
Reference in New Issue
Block a user