Merge branch 'feature/equips'
This commit is contained in:
@@ -6,7 +6,7 @@ import { difference } from 'underscore';
|
||||
* @Last Modified by: 梁桐川
|
||||
* @Last Modified time: 2021-08-27 17:47:56
|
||||
*/
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, getChannelType, CHANNEL_PREFIX } from './../../../consts';
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, MSG_SOURCE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, getChannelType, CHANNEL_PREFIX } from './../../../consts';
|
||||
import Role, { RoleModel } from '../../../db/Role';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
import { Application, BackendSession } from 'pinus';
|
||||
@@ -15,7 +15,7 @@ import { RoleStatus, ComBattleTeamModel, ComBattleTeamType, BossHp, ComRoleStatu
|
||||
import { ItemModel, ItemType } from '../../../db/Item';
|
||||
import { addItems, handleCost } from '../../../services/rewardService';
|
||||
import { checkRoleInQueue, rmRoleFromQueue, setTeamSearchReq } from '../../../services/redisService';
|
||||
import { getRandBlueprtId, clearComBtlTimer, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, createComTeamData, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack, getAllAssistCnt, checkHasMyTeam } from '../../../services/comBattleService';
|
||||
import { getRandBlueprtId, clearComBtlTimer, getFrd, updateRobotHurtByTime, comBtlLvInvalid, clearRobotHurtTimer, setDismissTimer, dismissTeam, handleComBtlProgress, getComBattleFriendAdd, teammateInBlackList, blueprtIdValid, hasEnoughBlueprt, addRoleToTeam, addRoleStToTeam, addValidSearchingRoles, validToJoin, addRobotsToTeam, addRobotsLater, teamIsFullToStart, oneTeamNotInBlack, getAllAssistCnt, checkHasMyTeam } from '../../../services/comBattleService';
|
||||
import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
import { addUserToChannel, getSimpleRoleInfo } from '../../../services/roleService';
|
||||
@@ -72,7 +72,7 @@ export class ComBattleHandler {
|
||||
let channel = channelService.getChannel(teamCode, true);
|
||||
|
||||
// 创建队伍数据结构
|
||||
let comTeam: MemComBtlTeam = createComTeamData(teamCode, pub, blueprtId, roleId, ceLimit);
|
||||
let comTeam = new MemComBtlTeam(teamCode, pub, blueprtId, roleId, ceLimit);
|
||||
addRoleToTeam(comTeam, roleInfo, true, false);
|
||||
addUserToChannel(channel, new ChannelUser(roleId, sid));
|
||||
// 将正在匹配的符合要求的玩家加入队伍,并推送入队消息
|
||||
@@ -96,50 +96,50 @@ export class ComBattleHandler {
|
||||
|
||||
/**
|
||||
* @description 匹配队伍
|
||||
* @param {{qualityArr: [number]}} msg 要匹配的品质数组列表
|
||||
* @param {{ lv: number }} msg 要匹配藏宝图品阶
|
||||
* @param {BackendSession} session
|
||||
* @returns
|
||||
* @memberof ComBattleHandler
|
||||
*/
|
||||
async searchTeam(msg: {qualityArr: [number], lvRange: number}, session: BackendSession) {
|
||||
async searchTeam(msg: { lv: number }, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let sid = session.get('sid');
|
||||
const { qualityArr, lvRange = 1 } = msg;
|
||||
const { lv = 1 } = msg;
|
||||
const roleInfo = await RoleModel.findByRoleId(roleId, null, true);
|
||||
const { lv } = roleInfo;
|
||||
const { lv: playerLv } = roleInfo;
|
||||
let { topLineupCe = 1000 } = roleInfo;
|
||||
|
||||
if(await checkHasMyTeam(roleId)) {
|
||||
return resResult(STATUS.COM_BATTLE_IS_RUNNING);
|
||||
}
|
||||
|
||||
if (comBtlLvInvalid(lv, lvRange)) {
|
||||
if (comBtlLvInvalid(playerLv, lv)) {
|
||||
return resResult(STATUS.COM_BATTLE_ASSIST_LV_NOT_ENOUGH);
|
||||
}
|
||||
if (difference(qualityArr, COM_BTL_QUALITY).length !== 0) {
|
||||
|
||||
if (!gameData.blueprtByLv.has(lv)) {
|
||||
return resResult(STATUS.COM_BLUEPRT_QUALITY_ERROR);
|
||||
}
|
||||
|
||||
const teams = await ComBattleTeamModel.getOtherTeamByQualityAndSt(roleId, qualityArr, COM_TEAM_STATUS.DEFAULT, lvRange, topLineupCe);
|
||||
const teams = await ComBattleTeamModel.getOtherTeamByLvAndSt(roleId, lv, COM_TEAM_STATUS.DEFAULT, topLineupCe);
|
||||
const team: ComBattleTeamType = await oneTeamNotInBlack(teams, roleId);
|
||||
if (team && team.roleIds.length < 3 && team.status === COM_TEAM_STATUS.DEFAULT && team.roleIds.indexOf(roleId) === -1 && team.blacklist && team.blacklist.indexOf(roleId) === -1) {
|
||||
return resResult(STATUS.SUCCESS, {teamCode: team.teamCode});
|
||||
}
|
||||
|
||||
let teamCode = session.get('teamCode');
|
||||
await setTeamSearchReq(roleId, sid, qualityArr, lvRange);
|
||||
await setTeamSearchReq(roleId, sid, lv);
|
||||
let thiz = this;
|
||||
// 倒计时匹配两个机器人
|
||||
setTimeout(async () => {
|
||||
let inQueue = await checkRoleInQueue(roleId, sid, qualityArr, lvRange);
|
||||
let inQueue = await checkRoleInQueue(roleId, sid, lv);
|
||||
if (!inQueue) return;
|
||||
await rmRoleFromQueue(roleId, sid, qualityArr, lvRange);
|
||||
await rmRoleFromQueue(roleId, sid, lv);
|
||||
// 创建队伍
|
||||
let blueprtId = getRandBlueprtId(qualityArr, lvRange).pop();
|
||||
let comTeam: MemComBtlTeam = createComTeamData(teamCode, false, blueprtId, 'robot', 0)
|
||||
let blueprtId = getRandBlueprtId(lv).pop();
|
||||
let comTeam = new MemComBtlTeam(teamCode, false, blueprtId, 'robot', 0)
|
||||
|
||||
let { quality } = gameData.goods.get(blueprtId);
|
||||
let isFrd = await getFrd(roleId, quality);
|
||||
let isFrd = await getFrd(roleId);
|
||||
// 将玩家加入队伍
|
||||
addRoleToTeam(comTeam, roleInfo, false, isFrd);
|
||||
let channelService = thiz.app.get('channelService');
|
||||
@@ -169,7 +169,7 @@ export class ComBattleHandler {
|
||||
let roleId = session.get('roleId');
|
||||
let sid = session.get('sid');
|
||||
|
||||
await rmRoleFromQueue(roleId, sid, COM_BTL_QUALITY, null);
|
||||
await rmRoleFromQueue(roleId, sid);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -194,17 +194,16 @@ export class ComBattleHandler {
|
||||
|
||||
let { lv = 1, head = EXTERIOR.EXTERIOR_FACE, topLineupCe = 0, frame = EXTERIOR.EXTERIOR_FACECASE, spine = EXTERIOR.EXTERIOR_APPEARANCE } = await Role.findByRoleId(roleId, null, true);
|
||||
|
||||
let { quality } = gameData.goods.get(teamStatus.blueprtId);
|
||||
if (lv < COM_BTL_CONST.ENABLE_LV) {
|
||||
return resResult(STATUS.COM_BATTLE_LV_NOT_ENOUGH);
|
||||
} else if (comBtlLvInvalid(lv, teamStatus.lvRange)) {
|
||||
} else if (comBtlLvInvalid(lv, teamStatus.lv)) {
|
||||
return resResult(STATUS.COM_BATTLE_ASSIST_LV_NOT_ENOUGH);
|
||||
} else if (topLineupCe < teamStatus.ceLimit) {
|
||||
return resResult(STATUS.COM_BATTLE_CE_LIMIT);
|
||||
}
|
||||
|
||||
if (!isFrd) {
|
||||
isFrd = await getFrd(roleId, quality);
|
||||
isFrd = await getFrd(roleId);
|
||||
}
|
||||
|
||||
// 加入队伍
|
||||
@@ -242,7 +241,7 @@ export class ComBattleHandler {
|
||||
if (!teamStatus || teamStatus.status !== COM_TEAM_STATUS.DEFAULT) return resResult(STATUS.COM_BATTLE_TEAM_INVALID);
|
||||
if (teamStatus.capId === roleId) return resResult(STATUS.COM_BATTLE_SET_FRD_ERR);
|
||||
if (!isFrd) {
|
||||
isFrd = await getFrd(roleId, teamStatus.quality);
|
||||
isFrd = await getFrd(roleId);
|
||||
}
|
||||
if (isFrd !== isFrdPre) {
|
||||
return resResult(STATUS.COM_BATTLE_ASSIST_NOT_ENOUGH);
|
||||
@@ -466,7 +465,7 @@ export class ComBattleHandler {
|
||||
updateRobotHurtByTime(teamStatus, st, COM_BTL_CONST.ROBOT_BASE_TIME_INTERVAL + idx, channel, this.robotHurtTimer, this.teamMap);
|
||||
}
|
||||
});
|
||||
await checkTaskInComBattleStart(teamStatus.roleStatus, teamStatus.capId, teamStatus.quality);
|
||||
await checkTaskInComBattleStart(teamStatus.roleStatus, teamStatus.capId, teamStatus.lv);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -774,61 +773,4 @@ export class ComBattleHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, { list: result });
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 藏宝图合成
|
||||
* @param {{original: Array<{id: number, count: number}>}} msg
|
||||
* @param {BackendSession} session
|
||||
* @returns
|
||||
* @memberof ComBattleHandler
|
||||
*/
|
||||
async composeBlueprt(msg: {original: Array<{id: number, count: number}>}, session: BackendSession) {
|
||||
const roleId = session.get('roleId');
|
||||
const roleName = session.get('roleName');
|
||||
const sid = session.get('sid');
|
||||
const serverId = session.get('serverId');
|
||||
|
||||
|
||||
const { original } = msg;
|
||||
|
||||
// 原材料检查
|
||||
let originalQuality: number, originalSum: number = 0;
|
||||
for(let {id, count} of original) {
|
||||
const goodInfo = gameData.goods.get(id);
|
||||
if(!originalQuality) originalQuality = goodInfo.quality;
|
||||
if(originalQuality != goodInfo.quality) {
|
||||
return resResult(STATUS.COM_BLUEPRT_QUALITY_ERROR);
|
||||
}
|
||||
|
||||
if(goodInfo.itid == IT_TYPE.BLUEPRT) {
|
||||
originalSum += count;
|
||||
}
|
||||
}
|
||||
|
||||
const dicCompose = gameData.blurprtCompose.get(originalQuality);
|
||||
if(!dicCompose) {
|
||||
return resResult(STATUS.COM_BLUEPRT_QUALITY_CANNOT_COMPOSE);
|
||||
}
|
||||
if(originalSum != dicCompose.blueprtNum) {
|
||||
return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR);
|
||||
}
|
||||
// 添加寻宝币
|
||||
original.push(...dicCompose.coinNum);
|
||||
// 消耗藏宝图和寻宝币
|
||||
|
||||
let costResult = await handleCost(roleId, sid, original, ITEM_CHANGE_REASON.BLUEPRT_COMPOSE);
|
||||
if(!costResult) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
|
||||
|
||||
const targetList = gameData.blueprt.get(dicCompose.targetQuality);
|
||||
const target = getRandSingleEelm(targetList);
|
||||
const reward = [{id: target, count: 1}];
|
||||
const goods = await addItems(roleId, roleName, sid, reward, ITEM_CHANGE_REASON.BLUEPRT_COMPOSE);
|
||||
if (dicCompose.targetQuality >= QUALITY_TYPE.ORANGE) {
|
||||
const { name } = gameData.goods.get(target);
|
||||
pushNormalItemMsg(roleId, roleName, serverId, MSG_SOURCE.ORANGE_BLUEPRT_COMPOSE, target, name);
|
||||
}
|
||||
await checkTask(roleId, sid, TASK_TYPE.COM_BATTLE_BLUEPRT, 1, true, { quality: dicCompose.targetQuality });
|
||||
|
||||
return resResult(STATUS.SUCCESS, { goods, costGold: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { STATUS } from './../../../consts/statusCode';
|
||||
import { EquipModel } from './../../../db/Equip';
|
||||
import { RoleModel, RoleType } from './../../../db/Role';
|
||||
import { UserModel } from '../../../db/User';
|
||||
import { GMUserModel } from '../../../db/GMUser';
|
||||
@@ -17,7 +16,6 @@ import { rmRoleFromQueue, roleLeave, getRoleOnlineInfo, roleLogin } from '../../
|
||||
|
||||
import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leaveGuildAuctionChannel, leaveGuildChannel, leaveSysChannel, leaveWorldAuctionChannel, leaveWorldChannel, recentGuildMsgs, recentPrivateChatInfos, recentSysMsgs, recentWorldMsgs } from '../../../services/chatService';
|
||||
import { reportOneOnline, savePlayTime } from '../../../services/authenticateService';
|
||||
import { Rank } from '../../../services/rankService';
|
||||
import { checkTaskWithRole, } from '../../../services/taskService';
|
||||
import { pushData, everydayRefresh, kickUser } from '../../../services/connectorService';
|
||||
import { pick } from 'lodash';
|
||||
@@ -26,6 +24,7 @@ import Counter from '../../../db/Counter';
|
||||
import { getExpByLv } from '../../../pubUtils/data';
|
||||
import { reportTAUserSet } from '../../../services/sdkService';
|
||||
import { saveLoginAndOutLog } from '../../../pubUtils/logUtil';
|
||||
import { JewelModel } from '../../../db/Jewel';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -79,7 +78,7 @@ export class EntryHandler {
|
||||
addRoleToWorldChannel(role.roleId, self.app.get('serverId'), role.serverId);
|
||||
await self.app.rpc.chat.chatRemote.addWorldChannel.route(session)(role.roleId, serverId, self.app.get('serverId'));
|
||||
let heros = await HeroModel.findByRole(role.roleId, [], HERO_SELECT.ENTRY, true);
|
||||
let equips = await EquipModel.findbyRole(role.roleId);
|
||||
let jewels = await JewelModel.findbyRole(role.roleId);
|
||||
let items = await ItemModel.findbyRole(role.roleId);
|
||||
let skins = await SkinModel.findbyRole(role.roleId);
|
||||
reportOneOnline(role.roleId, user.userCode, self.app.get('serverId'), true, user);
|
||||
@@ -98,7 +97,7 @@ export class EntryHandler {
|
||||
pushData(role.hasInit, role, session);
|
||||
|
||||
role['heros'] = heros;
|
||||
role['equips'] = equips;
|
||||
role['jewels'] = jewels;
|
||||
role['consumeGoods'] = items;
|
||||
role['skins'] = skins;
|
||||
let ip = session.remoteAddress.ip.replace('::ffff:', '');
|
||||
@@ -212,7 +211,7 @@ export class EntryHandler {
|
||||
}
|
||||
});
|
||||
reportTAUserSet(TA_USERSET_TYPE.ADD, roleId, { total_play_time: nowSeconds() - loginTime });
|
||||
rmRoleFromQueue(roleId, sid, COM_BTL_QUALITY, null); // 删除redis中寻宝的匹配记录
|
||||
rmRoleFromQueue(roleId, sid); // 删除redis中寻宝的匹配记录
|
||||
let channelService = this.app.get('channelService');
|
||||
let channel = channelService.getChannel(roleId, true);
|
||||
channel.leave(roleId, sid);
|
||||
|
||||
@@ -3,7 +3,7 @@ import { UserGuildModel } from '../../../db/UserGuild';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { STATUS, GUILD_OPERATE, TASK_TYPE, ITEM_CHANGE_REASON, ITID, CONSUME_TYPE } from '../../../consts';
|
||||
import { GuildRefineModel } from '../../../db/GuildRefine';
|
||||
import { getArmyDevelopConsumeById, getGoodById } from '../../../pubUtils/data';
|
||||
import { gameData, getArmyDevelopConsumeById, getGoodById } from '../../../pubUtils/data';
|
||||
import { nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import { handleCost, addItems, checkGoods } from '../../../services/rewardService';
|
||||
import { GuildModel } from '../../../db/Guild';
|
||||
@@ -11,10 +11,11 @@ import { findIndex, findWhere } from 'underscore';
|
||||
import { lockData } from '../../../services/redLockService';
|
||||
import { ARMY } from '../../../pubUtils/dicParam';
|
||||
import { CURRENCY_BY_TYPE, CURRENCY_TYPE } from '../../../consts/constModules/itemConst';
|
||||
import { openGuildRefine } from '../../../services/guildRefineService';
|
||||
import { checkEquipProduceStructureLv, openGuildRefine, refreshRefinCnt } from '../../../services/guildRefineService';
|
||||
import { DATA_NAME } from '../../../consts/dataName';
|
||||
import { checkTask } from '../../../services/taskService';
|
||||
import { guildInter } from '../../../pubUtils/interface';
|
||||
import { DicArmyDevelopConsume } from '../../../pubUtils/dictionary/DicArmyDevelopConsume';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -37,46 +38,65 @@ export class GuildRefineHandler {
|
||||
if (!guildRefine) {
|
||||
guildRefine = await openGuildRefine(code);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, { scienceTrees: guildRefine.scienceTrees });
|
||||
let { refineCnt } = refreshRefinCnt(userGuild);
|
||||
return resResult(STATUS.SUCCESS, { scienceTrees: guildRefine.scienceTrees, refineCnt });
|
||||
}
|
||||
/**
|
||||
* 炼器
|
||||
* @param msg
|
||||
* @param session
|
||||
*/
|
||||
async refineEquip(msg: guildInter & { pid: number }, session: BackendSession) {
|
||||
let { pid, myUserGuild: userGuild } = msg;
|
||||
async refine(msg: guildInter & { id: number, count: number }, session: BackendSession) {
|
||||
let { id, count, myUserGuild: userGuild } = msg;
|
||||
const roleId: string = session.get('roleId');
|
||||
const sid: string = session.get('sid');
|
||||
const roleName: string = session.get('roleName');
|
||||
|
||||
let pieceInfo = getGoodById(pid);
|
||||
let dicGoods = gameData.goods.get(id);
|
||||
if(!dicGoods) return resResult(STATUS.DIC_DATA_NOT_FOUND);
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
console.log('####', dicItid.type, CONSUME_TYPE.DRAWING)
|
||||
if(!dicItid || dicItid.type != CONSUME_TYPE.DRAWING) return resResult(STATUS.GUILD_CANNOT_REFINE_THIS);
|
||||
|
||||
let { guildCode: code } = userGuild;
|
||||
|
||||
let { scienceTrees } = await GuildRefineModel.getRefine(code);
|
||||
let findDevelopConsume;
|
||||
//判断是否可以炼该兵器
|
||||
for (let scienceTree of scienceTrees) {
|
||||
if (scienceTree.endTime < nowSeconds()) {
|
||||
let developConsume = getArmyDevelopConsumeById(scienceTree.id);
|
||||
let dicItid = ITID.get(pieceInfo.itid);
|
||||
if (developConsume.quality >= pieceInfo.quality && (dicItid.type != CONSUME_TYPE.PIECE || (dicItid.type == CONSUME_TYPE.PIECE && pieceInfo.equipLvl >= developConsume.starLevel))) {
|
||||
findDevelopConsume = developConsume;
|
||||
break;
|
||||
}
|
||||
let guildRefine = await GuildRefineModel.getRefine(code);
|
||||
if(!guildRefine) return resResult(STATUS.GUILD_PERSITION_TREE_NOT_LIGHT);
|
||||
|
||||
let { scienceTrees } = guildRefine;
|
||||
let dicDevelopConsume: DicArmyDevelopConsume;
|
||||
for(let scienceTree of scienceTrees) {
|
||||
console.log('####', scienceTree.endTime)
|
||||
if(scienceTree.endTime && scienceTree.endTime >= nowSeconds()) continue; // 没有炼完
|
||||
let _dicDevelopConsume = getArmyDevelopConsumeById(scienceTree.id);
|
||||
console.log('####', _dicDevelopConsume.quality, dicGoods.quality)
|
||||
if(_dicDevelopConsume.quality != dicGoods.quality) continue; // 品质错误
|
||||
if(!dicDevelopConsume || dicDevelopConsume.qualityLevel < _dicDevelopConsume.qualityLevel) { // 选择等级最高的
|
||||
dicDevelopConsume = _dicDevelopConsume;
|
||||
}
|
||||
}
|
||||
if (!findDevelopConsume)
|
||||
return resResult(STATUS.GUILD_NOT_REFINE_THE_EQUIP);
|
||||
let result = await handleCost(roleId, sid, findDevelopConsume.honourConsume, ITEM_CHANGE_REASON.REFINE_EQUIP);
|
||||
if(!dicDevelopConsume) return resResult(STATUS.GUILD_CANNOT_REFINE_THIS);
|
||||
|
||||
let result = await handleCost(roleId, sid, dicDevelopConsume.honourConsume, ITEM_CHANGE_REASON.REFINE_EQUIP);
|
||||
if (!result)
|
||||
return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
|
||||
let goods = await addItems(roleId, roleName, sid, [{ id: pid, count: 1 }], ITEM_CHANGE_REASON.REFINE_EQUIP);
|
||||
|
||||
let { refineCnt, refRefineTime } = refreshRefinCnt(userGuild);
|
||||
let curQualityCnt = refineCnt.find(cur => cur.quality == dicGoods.quality);
|
||||
let myCnt = curQualityCnt?.count||0;
|
||||
if(myCnt + count > dicDevelopConsume.max) return resResult(STATUS.GUILD_REFINE_CNT_MAX);
|
||||
if(!curQualityCnt) {
|
||||
refineCnt.push({ quality: dicGoods.quality, count });
|
||||
} else {
|
||||
curQualityCnt.count += count;
|
||||
}
|
||||
await UserGuildModel.updateInfo(roleId, { refineCnt, refRefineTime }, {});
|
||||
|
||||
let goods = await addItems(roleId, roleName, sid, [{ id, count }], ITEM_CHANGE_REASON.REFINE_EQUIP);
|
||||
|
||||
// 任务
|
||||
await checkTask(roleId, sid, TASK_TYPE.GUILD_REFINE, 1, true, { quality: pieceInfo.lvLimited });
|
||||
return resResult(STATUS.SUCCESS, { goods });
|
||||
await checkTask(roleId, sid, TASK_TYPE.GUILD_REFINE, 1, true, { quality: dicGoods.quality });
|
||||
return resResult(STATUS.SUCCESS, { goods, refineCnt });
|
||||
}
|
||||
/**
|
||||
* 点亮科技树
|
||||
@@ -89,14 +109,21 @@ export class GuildRefineHandler {
|
||||
const { myUserGuild: userGuild } = msg
|
||||
|
||||
const { guildCode: code } = userGuild;
|
||||
let developConsume = getArmyDevelopConsumeById(id);
|
||||
if (!developConsume)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
let { structure } = await GuildModel.findByCode(code, serverId);
|
||||
let dicDevelopConsume = getArmyDevelopConsumeById(id);
|
||||
if (!dicDevelopConsume) return resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let res: any = await lockData(serverId, DATA_NAME.GUILD_REFINE, code);//加锁
|
||||
if (!!res.err)
|
||||
return resResult(STATUS.REDLOCK_ERR);
|
||||
if (!!res.err) return resResult(STATUS.REDLOCK_ERR);
|
||||
|
||||
if(!checkEquipProduceStructureLv(structure, id)) {
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.GUILD_EQUIP_PRODUCE_LV_NOT_ENOUGH);
|
||||
}
|
||||
|
||||
let guildRefine = await GuildRefineModel.getRefine(code);
|
||||
let nowTime = nowSeconds();
|
||||
|
||||
for (let scienceTree of guildRefine.scienceTrees) {
|
||||
if (scienceTree.id == id) {//检查是否点亮过
|
||||
res.releaseCallback();
|
||||
@@ -109,20 +136,20 @@ export class GuildRefineHandler {
|
||||
}
|
||||
}
|
||||
|
||||
for (let prePosition of developConsume.prePositions) {
|
||||
let scienceTree = findWhere(guildRefine.scienceTrees, { id: prePosition });
|
||||
if (!scienceTree || scienceTree.endTime > nowTime) {
|
||||
for (let prePosition of dicDevelopConsume.prePositions) {
|
||||
let preScieceTree = guildRefine.scienceTrees.find(cur => cur.id == prePosition);
|
||||
if (!preScieceTree || preScieceTree.endTime > nowTime) {
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.GUILD_PERSITION_TREE_NOT_LIGHT);//前置科技树未点亮
|
||||
}
|
||||
}
|
||||
//点亮消耗
|
||||
const costResult = await GuildModel.costFund(code, developConsume.fundConsume);
|
||||
const costResult = await GuildModel.costFund(code, dicDevelopConsume.fundConsume);
|
||||
if (!costResult) {
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.GUILD_FUND_NOT_ENOUGH);
|
||||
}
|
||||
let scienceTree = { id, endTime: nowTime + developConsume.timeConsume, assistRoleIds: [] }
|
||||
let scienceTree = { id, endTime: nowTime + dicDevelopConsume.timeConsume, assistRoleIds: [] }
|
||||
let { scienceTrees } = await GuildRefineModel.pushRefine(code, scienceTree);
|
||||
res.releaseCallback();
|
||||
return resResult(STATUS.SUCCESS, { scienceTrees });
|
||||
|
||||
@@ -5,8 +5,8 @@ import { WishPoolReportModel } from '../../../db/WishPoolReport';
|
||||
import { resResult, genCode } from '../../../pubUtils/util';
|
||||
import { ITEM_CHANGE_REASON, STATUS } from '../../../consts';
|
||||
import { getArmyWishPoolBaseByLv, getGoodById, getWishPoolReward } from '../../../pubUtils/data';
|
||||
import { addItems, checkGoods, checkHeroes } from '../../../services/rewardService';
|
||||
import { IT_TYPE } from '../../../consts/constModules/itemConst';
|
||||
import { addItems, checkGoods, checkHeroEquips, checkHeroes } from '../../../services/rewardService';
|
||||
import { ITID, CONSUME_TYPE } from '../../../consts/constModules/itemConst';
|
||||
import { GUILD_STRUCTURE } from '../../../consts/constModules/guildConst';
|
||||
import { refreshUserGuild, getWishPool, getUserGuildWithRefActive } from '../../../services/guildService';
|
||||
import { findIndex, findWhere } from 'underscore';
|
||||
@@ -40,23 +40,23 @@ export class WishPoolHandler {
|
||||
const { goodId, type, myUserGuild } = msg;
|
||||
const roleId: string = session.get('roleId');
|
||||
const serverId: number = parseInt(session.get('serverId'));
|
||||
let count;
|
||||
let goodInfo = getGoodById(goodId)
|
||||
if (!goodInfo)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
if (!(goodInfo.itid == IT_TYPE.HERO_PIECE && type == 2 ) && !(goodInfo.itid == IT_TYPE.EQUIP_PIECE && type == 1 ))
|
||||
let dicGoods = getGoodById(goodId)
|
||||
if (!dicGoods) return resResult(STATUS.WRONG_PARMS);
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
if (!(dicItid.type == CONSUME_TYPE.SOUL && type == 2 ) && !(dicItid.type == CONSUME_TYPE.DRAWING && type == 1 ))
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let userGuild = await refreshUserGuild(myUserGuild, roleId);
|
||||
if (!userGuild)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
if (!userGuild) return resResult(STATUS.WRONG_PARMS);
|
||||
|
||||
let result = await checkGoods(roleId, [goodId]);
|
||||
if (!result) {
|
||||
if (goodInfo.itid == IT_TYPE.HERO_PIECE ) {
|
||||
result = await checkHeroes(roleId, [goodInfo.hid]);
|
||||
if (dicItid.type == CONSUME_TYPE.SOUL ) {
|
||||
result = await checkHeroes(roleId, [dicGoods.hid]);
|
||||
if (!result)
|
||||
return resResult(STATUS.GUILD_WISH_POOL_NOT_OWN_HERO);
|
||||
} else if (goodInfo.itid == IT_TYPE.EQUIP_PIECE ) {
|
||||
result = await checkGoods(roleId, [goodInfo.equipId]);
|
||||
} else if (dicItid.type == CONSUME_TYPE.DRAWING ) {
|
||||
result = await checkHeroEquips(roleId, dicGoods.quality);
|
||||
if (!result)
|
||||
return resResult(STATUS.GUILD_WISH_POOL_NOT_OWN_EQUIP);
|
||||
}
|
||||
@@ -65,27 +65,23 @@ export class WishPoolHandler {
|
||||
|
||||
let { structure } = await GuildModel.findGuild(code, serverId, 'structure');
|
||||
let { lv } = findWhere(structure, {id: GUILD_STRUCTURE.WISH_POOL});
|
||||
let { wishGoodsEquips, wishGoodsHeros } = getArmyWishPoolBaseByLv(lv);
|
||||
let len = 0;
|
||||
wishGoods.map(({type: resType})=>{
|
||||
if (resType == type)
|
||||
len++;
|
||||
});
|
||||
let len = wishGoods.filter(cur => cur.type == type).length;
|
||||
|
||||
if(receivedWishPool.indexOf(type) != -1 && getSeconds(createdAt) > getZeroPoint()) {
|
||||
return resResult(STATUS.HAS_REACH_WISH_COUNT_LIMIT);
|
||||
}
|
||||
if (len >= ARMY.ARMY_WISH_TIMES) //今日已经许愿过
|
||||
return resResult(STATUS.HAS_REACH_WISH_COUNT_LIMIT);
|
||||
|
||||
let dicWishPool = getArmyWishPoolBaseByLv(lv);
|
||||
let count = 0;
|
||||
if (type == 1) {
|
||||
let wishGoodsEquip = findWhere(wishGoodsEquips, { quality: goodInfo.quality});
|
||||
if (!wishGoodsEquip)
|
||||
return resResult(STATUS.NOT_WISH_THE_QUALITY_GOODS);
|
||||
count = wishGoodsEquip.count;
|
||||
let wishGoodsDrawing = dicWishPool.wishgoodsDrawings.find(cur => cur.quality == dicGoods.quality);
|
||||
if (!wishGoodsDrawing) return resResult(STATUS.NOT_WISH_THE_QUALITY_GOODS);
|
||||
count = wishGoodsDrawing.count;
|
||||
} else {
|
||||
let wishGoodsHero = findWhere(wishGoodsHeros, { quality: goodInfo.quality});
|
||||
if (!wishGoodsHero)
|
||||
return resResult(STATUS.NOT_WISH_THE_QUALITY_GOODS);
|
||||
let wishGoodsHero = dicWishPool.wishGoodsHeros.find(cur => cur.quality == dicGoods.quality);
|
||||
if (!wishGoodsHero) return resResult(STATUS.NOT_WISH_THE_QUALITY_GOODS);
|
||||
count = wishGoodsHero.count;
|
||||
}
|
||||
const id = genCode(6);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ import { STATUS, ROLE_SELECT, FRIEND_DROP_TYPE, FRIEND_RELATION_TYPE, POPULATE_T
|
||||
import { RoleModel, RoleType } from "../../../db/Role";
|
||||
import { getTimeFun, getZeroPointD } from "../../../pubUtils/timeUtil";
|
||||
import { FriendApplyModel } from "../../../db/FriendApply";
|
||||
import { FriendListParam, FriendRecommendParams, BlackListParam, FriendValueListParam } from "../../../domain/roleField/friend";
|
||||
import { FriendListParam, FriendRecommendParams, BlackListParam, FriendValueListParam, HeroDetailParam } from "../../../domain/roleField/friend";
|
||||
import { FriendShipModel, FriendShipType } from "../../../db/FriendShip";
|
||||
import { FriendRelationModel, Relation } from "../../../db/FriendRelation";
|
||||
import { isRoleOnline, getServerName, getRoleOnlineInfo } from "../../../services/redisService";
|
||||
@@ -16,7 +16,6 @@ import { getFriendPointObject } from "../../../pubUtils/itemUtils";
|
||||
import { RewardInter } from "../../../pubUtils/interface";
|
||||
import { FriendPresentLogModel } from '../../../db/FriendPresentLog';
|
||||
import { HeroModel, EPlace } from "../../../db/Hero";
|
||||
import { EquipModel } from "../../../db/Equip";
|
||||
import { getPlayerMainAttribute } from "../../../services/pvpService";
|
||||
import { FRIEND } from "../../../pubUtils/dicParam";
|
||||
import { PlayerDetail, PlayerDetailHero } from "../../../domain/battleField/guild";
|
||||
@@ -24,6 +23,7 @@ import { createPrivateMsg, pushMsgToRole, pushPresent } from "../../../services/
|
||||
import { Rank } from "../../../services/rankService";
|
||||
import { checkTaskWithRoles, checkTask, checkActivityTask } from "../../../services/taskService";
|
||||
import { ComBattleTeamModel } from "../../../db/ComBattleTeam";
|
||||
import { JewelModel } from "../../../db/Jewel";
|
||||
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -730,25 +730,18 @@ export class FriendHandler {
|
||||
let heroList = await HeroModel.findByHidRange(hids, hisRoleId, HERO_SELECT.HERO_DETAIL, true);
|
||||
if (heroList.length <= 0) return resResult(STATUS.HERO_NOT_FIND);
|
||||
|
||||
let list = new Array();
|
||||
for (let { roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, skinId, attr: heroAttrs, ePlace } of heroList) {
|
||||
|
||||
let equips = await EquipModel.findListByHidAndRole(hisRoleId, hid, EQUIP_SELECT.HERO_DETAIL);
|
||||
|
||||
let attributes = getPlayerMainAttribute(heroAttrs, role.attr);
|
||||
|
||||
list.push({
|
||||
roleId, roleName, hid, hName, ce, lv, star, colorStar, quality, job, skinId,
|
||||
equips: equips.map(cur => {
|
||||
let curEplace = ePlace.find(ccur => cur.ePlaceId == ccur.id) || new EPlace();
|
||||
let { lv = 0, refineLv = 0 } = curEplace;
|
||||
return { ...cur, lv, refineLv }
|
||||
}), attributes
|
||||
});
|
||||
let jewels = await JewelModel.findMapbyRoleAndHids(hisRoleId, hids);
|
||||
console.log(jewels);
|
||||
|
||||
let list: HeroDetailParam[] = [];
|
||||
for (let hero of heroList) {
|
||||
let attributes = getPlayerMainAttribute(hero.attr, role.attr);
|
||||
let heroParam = new HeroDetailParam(hero);
|
||||
heroParam.setAttributes(attributes);
|
||||
heroParam.setJewels(jewels);
|
||||
list.push(heroParam);
|
||||
}
|
||||
|
||||
|
||||
return resResult(STATUS.SUCCESS, { list });
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,9 @@ import { gameData, getHeroExpByLv, getHeroStarByQuality, getHeroWakeByQuality, g
|
||||
import { ItemInter, RewardInter } from '../../../pubUtils/interface';
|
||||
import { getDropItems, FIGURE_UNLOCK_CONDITION } from '../../../consts/constModules/itemConst'
|
||||
import { pushComposeOrangeHero, pushHeroQualityUpMsg, pushHeroStarMax, pushHeroWakeUp } from '../../../services/chatService';
|
||||
import { calculatetopLineup, calEquipSeids } from '../../../pubUtils/playerCe';
|
||||
import { calculatetopLineup } from '../../../pubUtils/playerCe';
|
||||
import { PvpDefenseModel } from '../../../db/PvpDefense';
|
||||
import { checkTaskWithHero, checkTask, checkActivityTask } from '../../../services/taskService';
|
||||
import { EquipModel, EquipType } from '../../../db/Equip';
|
||||
import { checkEquipCanPut } from '../../../services/equipService';
|
||||
import { pick } from 'underscore';
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -567,9 +565,8 @@ export class HeroHandler {
|
||||
let dicSkin = gameData.fashion.get(id);
|
||||
// console.log('*****', id, dicSkin)
|
||||
if (!dicSkin) return resResult(STATUS.HERO_SKIN_NOT_FIND);
|
||||
let hero = await HeroModel.findByHidAndRoleWithEquip(dicSkin.actorId, roleId);
|
||||
let hero = await HeroModel.findByHidAndRole(dicSkin.actorId, roleId);
|
||||
if (!hero) return resResult(STATUS.HERO_NOT_FIND);
|
||||
let oldCount = hero.ePlace.filter(cur => cur.equip).length;
|
||||
|
||||
let newHeroSkins: HeroSkin[] = [];
|
||||
let result = false;
|
||||
@@ -591,34 +588,34 @@ export class HeroHandler {
|
||||
if (!result) {
|
||||
return resResult(STATUS.HERO_SKIN_NOT_FIND);
|
||||
}
|
||||
let oldEquipSeids = calEquipSeids(hero);
|
||||
|
||||
let dicHero = gameData.hero.get(dicSkin.heroId);
|
||||
let dicMyJob = gameData.job.get(hero.job);
|
||||
let dicNewJob = getJobByGradeAndClass(dicHero.jobClass, dicMyJob.grade);
|
||||
|
||||
let newEplace: EPlace[] = [], heroPutNum = 0, curEquips: {seqId: number, id: number, hid: number, ePlaceId: number}[] = [];
|
||||
for(let { id, equip, lv, refineLv } of hero.ePlace) {
|
||||
let e = <EquipType>equip;
|
||||
if(equip && !checkEquipCanPut({...hero, skinId: dicSkin.heroId}, e.id)) {
|
||||
await EquipModel.putOnOrOff(e._id, 0);
|
||||
heroPutNum -= 1;
|
||||
newEplace.push({ id, equip: null, lv, refineLv});
|
||||
curEquips.push({ seqId: e.seqId, id: e.id, hid: 0, ePlaceId: id });
|
||||
} else {
|
||||
newEplace.push({ id, equip: e?e._id: null, lv, refineLv});
|
||||
}
|
||||
}
|
||||
// let newEplace: EPlace[] = [], heroPutNum = 0, curEquips: {seqId: number, id: number, hid: number, ePlaceId: number}[] = [];
|
||||
// for(let { id, equip, lv, refineLv } of hero.ePlace) {
|
||||
// let e = <EquipType>equip;
|
||||
// if(equip && !checkEquipCanPut({...hero, skinId: dicSkin.heroId}, e.id)) {
|
||||
// await EquipModel.putOnOrOff(e._id, 0);
|
||||
// heroPutNum -= 1;
|
||||
// newEplace.push({ id, equip: null, lv, refineLv});
|
||||
// curEquips.push({ seqId: e.seqId, id: e.id, hid: 0, ePlaceId: id });
|
||||
// } else {
|
||||
// newEplace.push({ id, equip: e?e._id: null, lv, refineLv});
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
if(heroPutNum < 0) {
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP, sid, roleId, hero, {}, oldEquipSeids);
|
||||
await checkTask(roleId, sid, TASK_TYPE.EQUIP_SUM, heroPutNum, true, {});
|
||||
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.EQUIP_SUM, heroPutNum);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [heroPutNum, oldCount]);
|
||||
}
|
||||
// if(heroPutNum < 0) {
|
||||
// hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP, sid, roleId, hero, {}, oldEquipSeids);
|
||||
// await checkTask(roleId, sid, TASK_TYPE.EQUIP_SUM, heroPutNum, true, {});
|
||||
// await checkActivityTask(serverId, sid, roleId, TASK_TYPE.EQUIP_SUM, heroPutNum);
|
||||
// await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [heroPutNum, oldCount]);
|
||||
// }
|
||||
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.SKIN, sid, roleId, hero, { skins: newHeroSkins, skinId: dicSkin.heroId, job: dicNewJob.jobid, ePlace: newEplace });
|
||||
return resResult(STATUS.SUCCESS, { curHero: pick(hero, ['hid', 'skins', 'skinId', 'job']), curEquips });
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.SKIN, sid, roleId, hero, { skins: newHeroSkins, skinId: dicSkin.heroId, job: dicNewJob.jobid });
|
||||
return resResult(STATUS.SUCCESS, { curHero: pick(hero, ['hid', 'skins', 'skinId', 'job']) });
|
||||
}
|
||||
|
||||
// ! debug接口 一键全武将
|
||||
|
||||
@@ -110,7 +110,7 @@ export class MailHandler {
|
||||
let sid: string = session.get('sid');
|
||||
let serverId: number = session.get('serverId');
|
||||
let { id, type, mailType } = msg;
|
||||
let { equipCount } = await RoleModel.findByRoleId(roleId, 'equipCount');
|
||||
let { jewelCount } = await RoleModel.findByRoleId(roleId, 'jewelCount');
|
||||
|
||||
let originMails: {mailType: GM_MAIL_TYPE, mail: MailType|GroupMailType|ServerMailType}[] = []
|
||||
|
||||
@@ -156,7 +156,7 @@ export class MailHandler {
|
||||
|
||||
let mailGoods: ItemInter[] = [], mails: MailParam[] = [];
|
||||
for(let { mail, mailType } of originMails) {
|
||||
let { isEquipOver, equipCount: newEquipCount } = checkMailGoods(mail, equipCount);
|
||||
let { isEquipOver, jewelCount: newEquipCount } = checkMailGoods(mail, jewelCount);
|
||||
if(isEquipOver) {
|
||||
if(type == RECEIVE_MAIL_TYPE.SINGLE) {
|
||||
return resResult(STATUS.EQUIP_IS_OVER);
|
||||
@@ -164,7 +164,7 @@ export class MailHandler {
|
||||
continue; // 如果有装备数量超过,那么一键领取这条邮件就不领了
|
||||
}
|
||||
}
|
||||
equipCount = newEquipCount;
|
||||
jewelCount = newEquipCount;
|
||||
|
||||
if(mailType == GM_MAIL_TYPE.SINGLE) {
|
||||
mail = await MailModel.updateStatusWithCondition(mail._id, MAIL_STATUS.RECEIVED);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { GachaData, Floor, GachaResult, Hope, GachaListReturn } from "../../domain/activityField/gachaField";;
|
||||
import { ActivityModel } from "../../db/Activity";
|
||||
import { DicGacha } from "../../pubUtils/dictionary/DicGacha";
|
||||
import { UserGachaType, UserGachaModel } from "../../db/UserGacha";
|
||||
import { shouldRefresh, getRandEelm, getRandEelmWithWeight } from "../../pubUtils/util";
|
||||
@@ -221,15 +220,11 @@ export class GachaPull {
|
||||
} else {
|
||||
let pool: number[] = [];
|
||||
if (type == GACHA_CONTENT_TYPE.HERO_PIECE) {
|
||||
pool = getAllItemByQuality(IT_TYPE.HERO_PIECE, param[0], this.lv);
|
||||
} else if (type == GACHA_CONTENT_TYPE.BLUEPRT) {
|
||||
pool = getAllItemByQuality(IT_TYPE.BLUEPRT, param[0], this.lv);
|
||||
pool = getAllItemByQuality(IT_TYPE.HERO_PIECE, param[0]);
|
||||
} else if (type == GACHA_CONTENT_TYPE.JEWEL) {
|
||||
pool = getAllJewelByLv(param[0]);
|
||||
} else if (type == GACHA_CONTENT_TYPE.TERAPH_MATERIAL) {
|
||||
pool = param;
|
||||
} else if (type == GACHA_CONTENT_TYPE.SUIT_PAPER) {
|
||||
pool = getSuitPaper(this.lv);
|
||||
}
|
||||
|
||||
if(pool.length <= 0) {
|
||||
@@ -497,11 +492,11 @@ export function getAllHeroByQuality(quality: number) {
|
||||
return allHero;
|
||||
}
|
||||
|
||||
function getAllItemByQuality(itid: number, quality: number, lv: number) {
|
||||
function getAllItemByQuality(itid: number, quality: number) {
|
||||
let allPiece: number[] = [];
|
||||
for (let [id, dicGoods] of gameData.goods) {
|
||||
if (dicGoods.itid == itid) {
|
||||
if ((quality == 0 || dicGoods.quality == quality) && dicGoods.lvLimited <= lv) {
|
||||
if (quality == 0 || dicGoods.quality == quality) {
|
||||
allPiece.push(id);
|
||||
}
|
||||
}
|
||||
@@ -510,67 +505,9 @@ function getAllItemByQuality(itid: number, quality: number, lv: number) {
|
||||
}
|
||||
|
||||
function getAllJewelByLv(lv: number) {
|
||||
let itids: number[] = [];
|
||||
for (let [id, { type }] of ITID) {
|
||||
if (type == CONSUME_TYPE.JEWEL) itids.push(id);
|
||||
}
|
||||
let items: number[] = [];
|
||||
for (let [id, dicGoods] of gameData.goods) {
|
||||
if (itids.includes(dicGoods.itid)) {
|
||||
if (lv == 0 || dicGoods.lvLimited == lv) {
|
||||
items.push(id);
|
||||
}
|
||||
}
|
||||
for(let [id, dicStone] of gameData.stone) {
|
||||
if(dicStone.lv >= lv) items.push(id);
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
function getSuitPaper(lv: number) {
|
||||
let items: number[] = [];
|
||||
for (let [id, dicGoods] of gameData.goods) {
|
||||
if (dicGoods.itid == IT_TYPE.PAPER) {
|
||||
if (dicGoods.lvLimited <= lv) {
|
||||
items.push(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据contentId获得抽卡结果 新武将抽卡活动
|
||||
* @param contentId dic_zyz_gachaContent的id
|
||||
* @param lv 玩家等级
|
||||
* @param goodId 大于0指定id,0:随机
|
||||
*/
|
||||
export function getResultFromContentIdNewHeroActivity(contentId: number, goodId: number, lv: number,) {
|
||||
let dic = gameData.gachaContent.get(contentId);
|
||||
let { type, param, count } = dic;
|
||||
if (type == GACHA_CONTENT_TYPE.HERO) {
|
||||
let result = new GachaResult(contentId);
|
||||
result.setHero(goodId);
|
||||
return result
|
||||
} else {
|
||||
let pool: number[] = [];
|
||||
if (type == GACHA_CONTENT_TYPE.HERO_PIECE) {
|
||||
pool = getAllItemByQuality(IT_TYPE.HERO_PIECE, param[0], lv);
|
||||
} else if (type == GACHA_CONTENT_TYPE.BLUEPRT) {
|
||||
pool = getAllItemByQuality(IT_TYPE.BLUEPRT, param[0], lv);
|
||||
} else if (type == GACHA_CONTENT_TYPE.JEWEL) {
|
||||
pool = getAllJewelByLv(param[0]);
|
||||
} else if (type == GACHA_CONTENT_TYPE.TERAPH_MATERIAL) {
|
||||
pool = param;
|
||||
} else if (type == GACHA_CONTENT_TYPE.SUIT_PAPER) {
|
||||
pool = getSuitPaper(lv);
|
||||
}
|
||||
let item = getRandEelm(pool);
|
||||
let result = new GachaResult(contentId);
|
||||
result.setItem(item[0], count);
|
||||
if (goodId > 0) {
|
||||
result.setItem(goodId, count);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +1,33 @@
|
||||
import { MemComBtlTeam } from './../domain/battleField/ComBattleTeamField';
|
||||
import { ItemModel } from './../db/Item';
|
||||
import { ITEM_CHANGE_REASON, IT_TYPE } from './../consts';
|
||||
import { COM_BTL_QUALITY } from './../consts/constModules/itemConst';
|
||||
import { FriendRelationModel } from './../db/FriendRelation';
|
||||
import { RoleModel, RoleType } from './../db/Role';
|
||||
import { EquipPrintDropType, EquipPrintDropModel } from './../db/EquipPrintDrop';
|
||||
import { FriendPointModel } from './../db/FriendPoint';
|
||||
import { STATUS } from './../consts/statusCode';
|
||||
import { COM_TEAM_STATUS, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
|
||||
import { RoleStatus, ComBattleTeamModel, ComBattleTeamType } from './../db/ComBattleTeam';
|
||||
import { getRandEelm, getRandValue, resResult, ratioReward, getRandValueByMinMax, getRandEelmWithWeight, getRobotInfo } from "../pubUtils/util";
|
||||
import { getRandRobot, transBossHpArr } from "./battleService";
|
||||
import { difference, omit } from 'underscore';
|
||||
import { Channel, ChannelService, pinus } from 'pinus';
|
||||
import { TREASURE, EXTERIOR } from '../pubUtils/dicParam';
|
||||
import { getFriendLvAdd } from './friendService';
|
||||
import { getRoleIds } from '../pubUtils/friendUtil';
|
||||
import { getTeamSearchByQuality, rmRoleFromQueue } from './redisService';
|
||||
import { getTeamSearchByLv, rmRoleFromQueue } from './redisService';
|
||||
import { addUserToChannel } from './roleService';
|
||||
import { ChannelUser } from '../domain/ChannelUser';
|
||||
import { getRewardByBlueprtId, gameData, getBossHpByBlueprtId } from '../pubUtils/data';
|
||||
import { getFriendPointObject } from '../pubUtils/itemUtils';
|
||||
import { DicWar } from '../pubUtils/dictionary/DicWar';
|
||||
import { getRewardByBlueprtId, gameData, getBossHpByBlueprtId, getDicBlueprtById } from '../pubUtils/data';
|
||||
import { getZeroPointD, nowSeconds } from '../pubUtils/timeUtil';
|
||||
import { dispatch } from '../pubUtils/dispatcher';
|
||||
import { handleCost } from './rewardService';
|
||||
|
||||
/**
|
||||
* 在给定的品质列表中随机返回一定数量的藏宝图Id
|
||||
* @param qualityArr 品质数组,在所有给定品质的藏宝图中筛选1
|
||||
* @param lv 品质数组,在所有给定品质的藏宝图中筛选1
|
||||
* @param cnt 返回藏宝图数量
|
||||
*/
|
||||
export function getRandBlueprtId(qualityArr: number[], lvRange: number, cnt = 1) {
|
||||
if (!qualityArr || !qualityArr.length) return null;
|
||||
let blueprtIdArr: number[] = [];
|
||||
for (let q of qualityArr) {
|
||||
blueprtIdArr = blueprtIdArr.concat(gameData.blueprtWithQualityAndStar.get(`${q}_${lvRange}`));
|
||||
}
|
||||
if (blueprtIdArr.length === 0) return null;
|
||||
export function getRandBlueprtId(lv: number, cnt = 1) {
|
||||
if (!gameData.blueprtByLv.has(lv)) return null;
|
||||
let blueprtIdArr: number[] = gameData.blueprtByLv.get(lv)||[];
|
||||
|
||||
const res = getRandEelm(blueprtIdArr, cnt);
|
||||
// console.log('******** getRandBlueprtId', blueprtIdArr, cnt, res)
|
||||
@@ -167,37 +157,14 @@ export async function getRealReward(blueprtId: number, roleSt: RoleStatus) {
|
||||
}
|
||||
|
||||
export async function getAllAssistCnt(roleId: string) {
|
||||
let cntMap = await getAssistTimesByQuality(roleId);
|
||||
let cnt = [];
|
||||
for (let i = 0; i < COM_BTL_QUALITY.length; ++i) {
|
||||
cnt[i] = cntMap.get(i + 1) || 0;
|
||||
}
|
||||
return cnt;
|
||||
let teams = await ComBattleTeamModel.getAssistTeamsByTime(roleId, getZeroPointD(), true);
|
||||
return teams.length;
|
||||
}
|
||||
|
||||
export async function getAssistTimesByQuality(roleId: string, qualityArr?: number[]) {
|
||||
let teams = await ComBattleTeamModel.getAssistTeamsByTime(roleId, qualityArr, getZeroPointD(), true);
|
||||
let cntMap = new Map<number, number>();
|
||||
teams.forEach(team => {
|
||||
if (team && team.quality && team.roleStatus) {
|
||||
for (let st of team.roleStatus) {
|
||||
if (st.roleId !== roleId || st.isFrd) {
|
||||
continue;
|
||||
}
|
||||
let cnt = cntMap.get(team.quality) || 0;
|
||||
cntMap.set(team.quality, cnt + 1)
|
||||
}
|
||||
}
|
||||
});
|
||||
return cntMap;
|
||||
}
|
||||
|
||||
export async function getFrd(roleId: string, quality: number) {
|
||||
export async function getFrd(roleId: string) {
|
||||
let isFrd = false;
|
||||
let assistTimes = await getAssistTimesByQuality(roleId, [quality]);
|
||||
let assistTime = assistTimes.get(quality);
|
||||
let { assistanceTime } = gameData.xunbao.get(quality);
|
||||
if (assistTime >= assistanceTime) isFrd = true;
|
||||
let cnt = await getAllAssistCnt(roleId);
|
||||
if (cnt >= TREASURE.TREASURE_ASSIST_TIME) isFrd = true;
|
||||
return isFrd;
|
||||
}
|
||||
|
||||
@@ -242,7 +209,7 @@ function updateRobotKilled(bossHp: number, roleSt: RoleStatus) {
|
||||
}
|
||||
|
||||
export async function handleComBtlProgress(teamStatus: MemComBtlTeam, robotHurtTimer: Map<string, NodeJS.Timer>, teamMap: Map<string, MemComBtlTeam>, channel: Channel) {
|
||||
const { teamCode, roleIds, capId, quality } = teamStatus;
|
||||
const { teamCode } = teamStatus;
|
||||
// 判断战斗是否结束
|
||||
let battleSt = checkComBattleResult(teamStatus);
|
||||
teamStatus.status = battleSt;
|
||||
@@ -351,15 +318,15 @@ export function clearRobotHurtTimer(teamStatus, robotHurtTimer: Map<string, Node
|
||||
/**
|
||||
* @description 检查寻宝等级是否合法
|
||||
* @export
|
||||
* @param {number} lv 玩家等级
|
||||
* @param {number} lvRange 藏宝图等级范围
|
||||
* @param {number} playerLv 玩家等级
|
||||
* @param {number} blueprtLv 藏宝图等级
|
||||
* @returns
|
||||
*/
|
||||
export function comBtlLvInvalid(lv: number, lvRange: number) {
|
||||
const range = gameData.comBtlLvRange.get(lvRange);
|
||||
export function comBtlLvInvalid(playerLv: number, blueprtLv: number) {
|
||||
const range = gameData.comBtlLvRange.get(blueprtLv);
|
||||
if (!range) return true;
|
||||
let { min, max } = range;
|
||||
return lv < min || lv > max;
|
||||
return playerLv < min || playerLv > max;
|
||||
}
|
||||
|
||||
export async function dismissTeam(teamStatus: MemComBtlTeam, teamMap: Map<string, MemComBtlTeam>, roleId: string, teamDisTimer: Map<string, NodeJS.Timer>, channel) {
|
||||
@@ -501,18 +468,17 @@ async function teammateValid(roleInfo: Partial<RoleType>, roleId: string, roleId
|
||||
* @param {string} roleId 要加入玩家的信息
|
||||
* @param {string[]} roleIds 队伍中当前玩家列表
|
||||
* @param {number} ceLimit
|
||||
* @param {number} quality
|
||||
* @returns
|
||||
*/
|
||||
export async function getValidTeammateRoleSt(roleId: string, roleIds: string[], ceLimit: number, quality: number) {
|
||||
export async function getValidTeammateRoleSt(roleId: string, roleIds: string[], ceLimit: number) {
|
||||
let roleInfo = await RoleModel.findByRoleId(roleId, null, true);
|
||||
let { roleName, head = EXTERIOR.EXTERIOR_FACE, frame = EXTERIOR.EXTERIOR_FACECASE, spine = EXTERIOR.EXTERIOR_APPEARANCE, topLineupCe, lv } = roleInfo;
|
||||
let { roleName, head = EXTERIOR.EXTERIOR_FACE, frame = EXTERIOR.EXTERIOR_FACECASE, spine = EXTERIOR.EXTERIOR_APPEARANCE, topLineupCe, lv: playerLv } = roleInfo;
|
||||
|
||||
const valid = await teammateValid(roleInfo, roleId, roleIds, ceLimit);
|
||||
if (!valid) return null;
|
||||
|
||||
let isFrd = await getFrd(roleId, quality);
|
||||
const result = new RoleStatus(roleId, roleName, false, isFrd, head, frame, spine, topLineupCe, lv);
|
||||
let isFrd = await getFrd(roleId);
|
||||
const result = new RoleStatus(roleId, roleName, false, isFrd, head, frame, spine, topLineupCe, playerLv);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -532,36 +498,7 @@ export async function teammateInBlackList(roleId: string, roleIds: string[]) {
|
||||
}
|
||||
|
||||
export function blueprtIdValid(id: number) {
|
||||
const goodData = gameData.goods.get(id);
|
||||
return goodData && goodData.itid === IT_TYPE.BLUEPRT && COM_BTL_QUALITY.indexOf(goodData.quality) !== -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 创建 ComBattleTeam 的数据结构
|
||||
* @export
|
||||
* @param {string} teamCode
|
||||
* @param {boolean} pub
|
||||
* @param {number} blueprtId
|
||||
* @param {number} status
|
||||
* @param {string} capId
|
||||
* @param {number} ceLimit
|
||||
* @param {number} bossHp
|
||||
* @param {number} quality
|
||||
* @param {BossHp[]} bossHpArr
|
||||
* @returns
|
||||
*/
|
||||
export function createComTeamData(teamCode: string, pub: boolean, blueprtId: number, capId: string, ceLimit: number) {
|
||||
const { equipLvl, quality } = gameData.goods.get(blueprtId);
|
||||
const { bossHpSum, bossHpArr } = getBossHpByBlueprtId(blueprtId);
|
||||
const curRnd = 0;
|
||||
const roleCnt = 1;
|
||||
const timeout = false;
|
||||
const bossCurHp = bossHpSum;
|
||||
const bossHp = bossHpSum;
|
||||
const status = COM_TEAM_STATUS.DEFAULT;
|
||||
return {
|
||||
teamCode, pub, blueprtId, status, capId, ceLimit, bossHp, bossCurHp, quality, bossHpArr: transBossHpArr(bossHpArr), curRnd, roleCnt, timeout, lvRange: equipLvl, blacklist: []
|
||||
};
|
||||
return gameData.blueprt.has(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -619,14 +556,14 @@ export function addRoleStToTeam(comTeam: MemComBtlTeam, roleSt: RoleStatus) {
|
||||
* @returns
|
||||
*/
|
||||
export async function addValidSearchingRoles(comTeam: MemComBtlTeam, channelService: ChannelService) {
|
||||
const { quality, equipLvl } = gameData.goods.get(comTeam.blueprtId);
|
||||
let teammates = await getTeamSearchByQuality(quality, equipLvl);
|
||||
const { lv } = getDicBlueprtById(comTeam.blueprtId);
|
||||
let teammates = await getTeamSearchByLv(lv);
|
||||
if (teammates && teammates.length) {
|
||||
for (let teammate of teammates) {
|
||||
const { roleId: teammateRoleId, sid } = teammate;
|
||||
const st = await getValidTeammateRoleSt(teammateRoleId, comTeam.roleIds, comTeam.ceLimit, quality);
|
||||
const st = await getValidTeammateRoleSt(teammateRoleId, comTeam.roleIds, comTeam.ceLimit);
|
||||
if (!st) continue;
|
||||
await rmRoleFromQueue(teammateRoleId, sid, COM_BTL_QUALITY, null); // 匹配成功后删除redis中该用户的匹配记录
|
||||
await rmRoleFromQueue(teammateRoleId, sid); // 匹配成功后删除redis中该用户的匹配记录
|
||||
addRoleStToTeam(comTeam, st);
|
||||
const channel = channelService.getChannel(comTeam.teamCode, false);
|
||||
addUserToChannel(channel, new ChannelUser(teammateRoleId, sid));
|
||||
|
||||
@@ -1,200 +1,106 @@
|
||||
import { mergeSameGoods, getRandEelm, getRandValueByMinMax } from '../pubUtils/util';
|
||||
import { EquipModel, RandMain, RandSe } from "../db/Equip";
|
||||
import { HeroModel, HeroType } from "../db/Hero";
|
||||
import { getGoodById, gameData, getJewelById, getQuenchGradeByValue, getQuenchConsume, getQuenchByQualityAndGrade } from "../pubUtils/data";
|
||||
import { calPlayerCeAndSave } from "./playerCeService";
|
||||
import { CONSUME_TYPE, HERO_SYSTEM_TYPE, ITID, TASK_TYPE } from "../consts";
|
||||
import { dicGoods, DicGoods } from '../pubUtils/dictionary/DicGoods';
|
||||
import { QuenchLogParam } from '../domain/roleField/equip';
|
||||
import { QUENCH } from '../pubUtils/dicParam';
|
||||
import { DicQuenchQuality } from '../pubUtils/dictionary/DicQuenchQuality';
|
||||
|
||||
/**
|
||||
* 校验前端传入的消耗数量是否准确,并返回消耗的道具并加上特殊材料needConsumes
|
||||
* @param consumes
|
||||
* @param jewel
|
||||
* @param jewelCount
|
||||
*/
|
||||
export function checkMaterialEnough(consumes: Array<{ id: number, count: number }>, jewel: number, jewelCount: number) {
|
||||
let comJewelMap = new Map<number, number>(); // good_id => count
|
||||
let needConsumes:{ id: number, count: number }[] = []
|
||||
for(let {id, count} of consumes) {
|
||||
if(!comJewelMap.has(id)) {
|
||||
comJewelMap.set(id, count);
|
||||
} else {
|
||||
comJewelMap.set(id, comJewelMap.get(id) + count);
|
||||
}
|
||||
}
|
||||
|
||||
function checkCurMeterial(target: number, targetCount: number) {
|
||||
let dic = getGoodById(target);
|
||||
if(!dic) return false;
|
||||
let { composeMaterial } = dic;
|
||||
|
||||
let isEnough = true;
|
||||
for(let { id, count } of composeMaterial) {
|
||||
let consumeCount = comJewelMap.get(id)||0;
|
||||
let dicGood = getGoodById(id);
|
||||
if(!dicGoods) { isEnough = false; break; }
|
||||
let dicItid = ITID.get(dicGood.itid);
|
||||
if(dicItid.type != CONSUME_TYPE.JEWEL) {
|
||||
if(consumeCount < count * targetCount) {
|
||||
isEnough = false; break;
|
||||
} else {
|
||||
comJewelMap.set(id, consumeCount - count * targetCount);
|
||||
needConsumes.push({ id, count: count * targetCount });
|
||||
}
|
||||
} else {
|
||||
if(consumeCount < count * targetCount) {
|
||||
comJewelMap.set(id, 0);
|
||||
needConsumes.push({ id, count: consumeCount });
|
||||
isEnough = checkCurMeterial(id, count * targetCount - consumeCount);
|
||||
} else {
|
||||
comJewelMap.set(id, consumeCount - count * targetCount);
|
||||
needConsumes.push({ id, count: count * targetCount });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return isEnough
|
||||
}
|
||||
|
||||
let isEnough = checkCurMeterial(jewel, jewelCount);
|
||||
return isEnough? needConsumes: false;
|
||||
}
|
||||
|
||||
export function checkEquipCanPut(hero: HeroType, id: number) {
|
||||
let hid = hero.skinId;
|
||||
let dicGood = gameData.goods.get(id);
|
||||
if(dicGood.lvLimited > hero.lv) return false;
|
||||
let dicHero = gameData.hero.get(hid);
|
||||
if(dicGood.jobLimited.indexOf(0) == -1 && dicGood.jobLimited.indexOf(dicHero.jobClass) == -1) return false;
|
||||
if(dicGood.charLimited.indexOf(0) == -1 && dicGood.charLimited.indexOf(hid) == -1) return false;
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 淬火一次
|
||||
* @param roleId 玩家id
|
||||
* @param sid 玩家sid
|
||||
* @param randMain 装备上的属性随机值
|
||||
* @param dicQuench 淬火表
|
||||
* @param dicGoods 物品表
|
||||
* @returns
|
||||
*/
|
||||
export async function quenchOnce(randMain: RandMain[], dicQuench: DicQuenchQuality, dicGoods: DicGoods) {
|
||||
let { quality, equipLvl } = dicGoods;
|
||||
|
||||
let canRandMain = randMain.filter(cur => { // 已升满的属性就不再淬火了
|
||||
return cur.rand < dicQuench.singleRatioMax;
|
||||
});
|
||||
let randMainResult = getRandEelm(canRandMain);
|
||||
if(randMainResult.length == 0) return false;
|
||||
|
||||
let add = new Map<number, number>(); // id => value,增加的数量
|
||||
let isCriticle = Math.random() * 100 < dicQuench.critProbability; // 暴击
|
||||
let addAttr = isCriticle? dicQuench.critEffect * QUENCH.QUENCH_UNIT_UPRATIO: QUENCH.QUENCH_UNIT_UPRATIO;
|
||||
let overAttr = randMainResult[0].rand + addAttr - dicQuench.singleRatioMax; // 如果有暴击,超出当前品相上限时
|
||||
if(overAttr > 0) { // 超出,转到另一条属性
|
||||
let anotherRandMain = canRandMain.filter(cur => {
|
||||
return cur.id != randMainResult[0].id;
|
||||
});
|
||||
if(anotherRandMain.length > 0) {
|
||||
let anotherOverAttr = anotherRandMain[0].rand + overAttr - dicQuench.singleRatioMax;
|
||||
if(anotherOverAttr > 0) {
|
||||
add.set(anotherRandMain[0].id, overAttr - anotherOverAttr);
|
||||
} else {
|
||||
add.set(anotherRandMain[0].id, overAttr);
|
||||
}
|
||||
}
|
||||
add.set(randMainResult[0].id, addAttr - overAttr);
|
||||
} else {
|
||||
add.set(randMainResult[0].id, addAttr);
|
||||
}
|
||||
|
||||
let value = 0;
|
||||
for(let r of randMain) {
|
||||
if(add.has(r.id)) {
|
||||
r.rand += add.get(r.id);
|
||||
}
|
||||
value += r.rand;
|
||||
}
|
||||
let grade = getQuenchGradeByValue(quality, value/2);
|
||||
|
||||
// 消耗
|
||||
let consumes = getQuenchConsume(equipLvl, quality);
|
||||
|
||||
let log = new QuenchLogParam(isCriticle, add);
|
||||
return { randMain, grade, log, consumes };
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查该品相是否到顶
|
||||
* @param quality 品质
|
||||
* @param grade 品相
|
||||
* @param randMain 装备上的随机值
|
||||
* @returns
|
||||
*/
|
||||
export function checkQuenchMaxByQualityAndGrade(quality: number, grade: number, randMain: RandMain[]) {
|
||||
let isMax = true;
|
||||
let dic = getQuenchByQualityAndGrade(quality, grade);
|
||||
if(!dic) return true;
|
||||
for(let { rand } of randMain) {
|
||||
if(rand < dic.max) isMax = false;
|
||||
}
|
||||
return isMax;
|
||||
}
|
||||
import { getRandEelm, } from '../pubUtils/util';
|
||||
import { EPlace, Stone } from "../db/Hero";
|
||||
import { gameData } from "../pubUtils/data";
|
||||
import { JewelType, RandSe } from '../db/Jewel';
|
||||
import { getJewelRandSe } from '../pubUtils/itemUtils';
|
||||
|
||||
export function getRandSeResult(id: number, randSe: RandSe[]) {
|
||||
let dicGoods = gameData.goods.get(id);
|
||||
if (!dicGoods) return false;
|
||||
let { randomEffect, effectCount } = gameData.jewel.get(id);
|
||||
|
||||
let { randomEffect } = dicGoods; // 配置的可随机seid
|
||||
let chosen = randSe.filter(cur => cur.locked).map(cur => cur.seid); // 上一轮随机出来的
|
||||
let randomResult: number[] = getRandEelm(randomEffect.filter(cur => !chosen.includes(cur)), randSe.length); // 随机出的结果
|
||||
let randomResult: number[] = getRandEelm(randomEffect.filter(cur => !chosen.includes(cur)), effectCount); // 随机出的结果
|
||||
if(randomResult.length < effectCount) { // 去上轮之后不够,把上轮加入
|
||||
let chosenRandom = getRandEelm(chosen, effectCount - randomResult.length);
|
||||
randomResult.push(...chosenRandom);
|
||||
}
|
||||
if(randomResult.length < effectCount) { // 还是不够
|
||||
let allRandom = getRandEelm(randomEffect, effectCount - randomResult.length);
|
||||
randomResult.push(...allRandom);
|
||||
}
|
||||
|
||||
for (let i = 0; i < randSe.length; i++) {
|
||||
if (!randSe[i].locked) {
|
||||
let random = gameData.randomEffectPool.get(randomResult[i]);
|
||||
if (!random) break;
|
||||
let rand = 0;
|
||||
if (random.id > 0) rand = getRandValueByMinMax(random.Min, random.Max, 0);
|
||||
randSe[i].seid = random.id;
|
||||
randSe[i].rand = rand;
|
||||
let newRandSe: RandSe[] = [];
|
||||
for (let i = 0; i < effectCount; i++) {
|
||||
if(randSe[i]) {
|
||||
if(randSe[i] && randSe[i].locked) {
|
||||
newRandSe.push(randSe[i]);
|
||||
} else {
|
||||
newRandSe.push(getJewelRandSe(randSe[i].id, randomResult[i]));
|
||||
}
|
||||
} else {
|
||||
newRandSe.push(getJewelRandSe(i + 1, randomResult[i]));
|
||||
}
|
||||
}
|
||||
return randSe
|
||||
|
||||
return newRandSe
|
||||
}
|
||||
|
||||
export async function refineOnce(lv: number, refineLv: number) {
|
||||
|
||||
let dicRefine = gameData.refine.get(refineLv + 1);
|
||||
if (!dicRefine) return false;
|
||||
|
||||
if(lv < dicRefine.levelLimited) return false;
|
||||
|
||||
return {
|
||||
refineLv: refineLv + 1,
|
||||
consumes: dicRefine.consume
|
||||
export function updateStone(origin: Stone[], id: number, target: number) {
|
||||
let newStones: Stone[] = [];
|
||||
let hasTarget = false;
|
||||
for(let stone of origin) {
|
||||
if(stone.id == id) {
|
||||
newStones.push({ id, stone: target });
|
||||
hasTarget = true;
|
||||
} else {
|
||||
newStones.push(stone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function checkRefineReachNextLv(oldRefineLv: number, refineLv: number) {
|
||||
let oldDic = gameData.refine.get(oldRefineLv);
|
||||
let dic = gameData.refine.get(refineLv);
|
||||
if(!oldDic || !dic) return true;
|
||||
|
||||
return dic.level > oldDic.level;
|
||||
}
|
||||
|
||||
export function calEquipCe(goodsAbility: Map<number, number>, randMain: RandMain[]) {
|
||||
let ce = 0;
|
||||
for(let [ id, ratio ] of gameData.equipAttributeRatio) {
|
||||
let valueBase = goodsAbility.get(id);
|
||||
let curRand = randMain.find(cur => cur.id == id);
|
||||
let valueRand = curRand?curRand.rand: 0;
|
||||
ce += Math.floor(valueBase * valueRand * ratio / 100);
|
||||
if(!hasTarget) {
|
||||
newStones.push({ id, stone: target });
|
||||
}
|
||||
return ce
|
||||
return newStones;
|
||||
}
|
||||
|
||||
export function updateEplace(eplace: EPlace[], eplaceId: number, update: Partial<EPlace>) {
|
||||
let newEplace: EPlace[] = [];
|
||||
let updatedEplace: Partial<EPlace>[] = [];
|
||||
for(let equip of eplace) {
|
||||
if(equip.id == eplaceId) {
|
||||
newEplace.push({ ...equip, ...update });
|
||||
updatedEplace.push({ id: equip.id, equipId: equip.equipId, ...update });
|
||||
} else {
|
||||
newEplace.push(equip);
|
||||
}
|
||||
}
|
||||
return {newEplace, updatedEplace};
|
||||
}
|
||||
|
||||
export function updateEplaces(eplace: EPlace[], update: Map<number, Partial<EPlace>>) {
|
||||
let newEplace: EPlace[] = [];
|
||||
let updatedEplace: Partial<EPlace>[] = [];
|
||||
for(let equip of eplace) {
|
||||
if(update.has(equip.id)) {
|
||||
newEplace.push({ ...equip, ...update.get(equip.id) });
|
||||
updatedEplace.push({ id: equip.id, equipId: equip.equipId, ...update.get(equip.id) });
|
||||
} else {
|
||||
newEplace.push(equip);
|
||||
}
|
||||
}
|
||||
return {newEplace, updatedEplace};
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查天晶石能否装备上这个装备
|
||||
* @param equip
|
||||
* @param jewel
|
||||
*/
|
||||
export function checkJewelCanPutOnEquip(equip: EPlace, jewel: JewelType) {
|
||||
// 位置是否满足
|
||||
let dicJewel = gameData.jewel.get(jewel.id);
|
||||
if(!dicJewel || dicJewel.eplaceId != equip.id) return false;
|
||||
// 品质是否满足
|
||||
let dicEquipQualityExtra = gameData.equipQualityExtra.get(equip.quality);
|
||||
if(!dicEquipQualityExtra || dicEquipQualityExtra.jewelCnt == 0) return false;
|
||||
return true
|
||||
}
|
||||
|
||||
export function checkStoneCanPutOnEquip(equip: EPlace, id: number, stone: number) {
|
||||
if(stone == 0) return true; // 卸载
|
||||
// 位置是否满足
|
||||
let dicStone = gameData.stone.get(stone);
|
||||
if(!dicStone || dicStone.eplaceId != equip.id) return false;
|
||||
// 品质是否满足
|
||||
let dicEquipQualityExtra = gameData.equipQualityExtra.get(equip.quality);
|
||||
if(!dicEquipQualityExtra || dicEquipQualityExtra.stoneCnt < id) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -1,11 +1,31 @@
|
||||
import { getArmyDevelopConsume } from '../pubUtils/data';
|
||||
import { gameData, getArmyDevelopConsumeById } from '../pubUtils/data';
|
||||
import { ScienceTree, GuildRefineModel } from '../db/GuildRefine';
|
||||
import { UserGuildType } from '../db/UserGuild';
|
||||
import { shouldRefresh } from '../pubUtils/util';
|
||||
import { Structure } from '../db/Guild';
|
||||
import { GUILD_STRUCTURE } from '../consts';
|
||||
|
||||
export function checkEquipProduceStructureLv(structure: Structure[], developConsumeId: number) {
|
||||
let curStructure = structure.find(cur => cur.id == GUILD_STRUCTURE.EQUIP_PRODUCE);
|
||||
if(!curStructure) return curStructure;
|
||||
|
||||
let dicStructure = gameData.equipProduceBase.get(curStructure.lv);
|
||||
if(!dicStructure) return false
|
||||
|
||||
let dicDevelopConsume = getArmyDevelopConsumeById(developConsumeId);
|
||||
if(dicStructure.quality < dicDevelopConsume.quality) return false;
|
||||
if(dicStructure.levelProduce.indexOf(dicDevelopConsume.qualityLevel) == -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启符合条件的科技树
|
||||
* @param code
|
||||
*/
|
||||
export async function openGuildRefine(code: string) {
|
||||
let developConsumes = getArmyDevelopConsume();
|
||||
let developConsumes = gameData.armyDevelopConsume;
|
||||
let scienceTrees = new Array<ScienceTree>();
|
||||
developConsumes.forEach(developConsume=>{
|
||||
if (developConsume.fundConsume == 0 && developConsume.timeConsume == 0) {
|
||||
@@ -20,3 +40,11 @@ export async function openGuildRefine(code: string) {
|
||||
let guildRefine = await GuildRefineModel.createScienceTree(code, scienceTrees);
|
||||
return guildRefine;
|
||||
}
|
||||
|
||||
export function refreshRefinCnt(userGuild: UserGuildType) {
|
||||
let { refRefineTime, refineCnt } = userGuild;
|
||||
if(shouldRefresh(refRefineTime, new Date())) {
|
||||
refRefineTime = new Date(), refineCnt = [];
|
||||
}
|
||||
return { refRefineTime, refineCnt };
|
||||
}
|
||||
@@ -244,13 +244,13 @@ export class SendMailFun {
|
||||
}
|
||||
}
|
||||
|
||||
export function checkMailGoods(mail: MailType | GroupMailType | ServerMailType, equipCount: number) {
|
||||
export function checkMailGoods(mail: MailType | GroupMailType | ServerMailType, jewelCount: number) {
|
||||
let isEquipOver = false;
|
||||
for (let good of mail.goods) {
|
||||
let dicGoods = gameData.goods.get(good.id);
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
if (dicItid.table == 'equip') { // 装备
|
||||
if (++equipCount > BAG.BAG_EQUIP_UPLIMITED) {
|
||||
if (dicItid.table == 'jewel') { // 装备
|
||||
if (++jewelCount > BAG.BAG_EQUIP_UPLIMITED) {
|
||||
isEquipOver = true;
|
||||
break;
|
||||
}
|
||||
@@ -258,6 +258,6 @@ export function checkMailGoods(mail: MailType | GroupMailType | ServerMailType,
|
||||
}
|
||||
|
||||
return {
|
||||
isEquipOver, equipCount
|
||||
isEquipOver, jewelCount
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@ interface calPlayerReturn {
|
||||
}
|
||||
|
||||
//修改并下发战力
|
||||
export async function calPlayerCeAndSave(type: number, sid: string, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
|
||||
let result = await pubCalPlayerCeAndSave(type, roleId, originHero, update, args);
|
||||
export async function calPlayerCeAndSave(type: number, sid: string, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>, params?: any) {
|
||||
let result = await pubCalPlayerCeAndSave(type, roleId, originHero, update, args, params);
|
||||
return await pushCalPlayerCe(roleId, sid, result);
|
||||
}
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ export function getPlayerAttribute(lv: number, heroAttrs: CeAttrData[] = [], rol
|
||||
export function getPlayerMainAttribute(heroAttrs: CeAttrData[], roleAttrs: CeAttrDataRole[]) {
|
||||
let newAttribute = new AttributeCal();
|
||||
newAttribute.setByDbData(roleAttrs, heroAttrs);
|
||||
let mainAttributes = newAttribute.getReduceAttributes();
|
||||
let mainAttributes = newAttribute.getReduceMainAttributes();
|
||||
return mainAttributes;
|
||||
}
|
||||
|
||||
|
||||
@@ -1021,7 +1021,7 @@ export async function setRankRedisFromDb(type: string, args?: { serverId?: numbe
|
||||
} else if (type == REDIS_KEY.HERO_RANK) {
|
||||
let serverId = args.serverId;
|
||||
|
||||
for (let hid of gameData.dicMyHeroes) {
|
||||
for (let { actorId: hid } of gameData.recruit) {
|
||||
let ranks = await HeroModel.getRank(hid, serverId, HERO_SELECT.RANK_LINEUP);
|
||||
let r = new Rank(type, { serverId, hid });
|
||||
r.setIsInit(true);
|
||||
|
||||
@@ -133,11 +133,10 @@ export async function updateUserInfo(key: string, roleId: string, arr: Array<{fi
|
||||
|
||||
/**
|
||||
* @description 拼接匹配分组的 key
|
||||
* @param {number} quality 品质
|
||||
* @param {number} lvRange 等级范围
|
||||
* @param {number} lv 藏宝图品阶
|
||||
*/
|
||||
function getComTeamKey(quality: number, lvRange: number) {
|
||||
return `${REDIS_KEY.COM_TEAM_SEARCH_PRE}:${quality}_${lvRange}`;
|
||||
function getComTeamKey(lv: number) {
|
||||
return `${REDIS_KEY.COM_TEAM_SEARCH_PRE}:${lv}`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,14 +158,9 @@ function getComTeamValue(roleId: string, sid: string) {
|
||||
* @param {number} lvRange
|
||||
* @returns
|
||||
*/
|
||||
export async function setTeamSearchReq(roleId: string, sid: string, qualityArr: Array<number>, lvRange: number) {
|
||||
let cmds = [];
|
||||
qualityArr.forEach(quality => {
|
||||
if (quality) {
|
||||
cmds.push(['sadd', getComTeamKey(quality, lvRange), getComTeamValue(roleId, sid)]);
|
||||
}
|
||||
});
|
||||
const res = await redisClient().multi(cmds).execAsync();
|
||||
export async function setTeamSearchReq(roleId: string, sid: string, lv: number) {
|
||||
|
||||
const res = await redisClient().saddAsync(getComTeamKey(lv), [getComTeamValue(roleId, sid)]);
|
||||
console.log('setTeamSearchReq: ', res);
|
||||
return res;
|
||||
}
|
||||
@@ -176,21 +170,18 @@ export async function setTeamSearchReq(roleId: string, sid: string, qualityArr:
|
||||
* @export
|
||||
* @param {string} roleId
|
||||
* @param {string} sid
|
||||
* @param {Array<number>} qualityArr
|
||||
* @param {number} lvRange
|
||||
* @param {number} lv 如果不填表示所有品阶
|
||||
*/
|
||||
export async function rmRoleFromQueue(roleId: string, sid: string, qualityArr: Array<number>, lvRange: number) {
|
||||
export async function rmRoleFromQueue(roleId: string, sid: string, lv?: number) {
|
||||
|
||||
let cmds = [];
|
||||
for (let q of qualityArr) {
|
||||
if (lvRange) {
|
||||
cmds.push(['srem', getComTeamKey(q, lvRange), getComTeamValue(roleId, sid)]);
|
||||
} else {
|
||||
for (let range of comBtlRanges()) {
|
||||
cmds.push(['srem', getComTeamKey(q, range), getComTeamValue(roleId, sid)]);
|
||||
}
|
||||
if (lv) {
|
||||
cmds.push(['srem', getComTeamKey(lv), getComTeamValue(roleId, sid)]);
|
||||
} else {
|
||||
for (let range of comBtlRanges()) {
|
||||
cmds.push(['srem', getComTeamKey(range), getComTeamValue(roleId, sid)]);
|
||||
}
|
||||
};
|
||||
}
|
||||
await redisClient().multi(cmds).execAsync();
|
||||
}
|
||||
|
||||
@@ -201,10 +192,10 @@ export async function rmRoleFromQueue(roleId: string, sid: string, qualityArr: A
|
||||
* @param {number} lvRange 等级范围
|
||||
* @returns
|
||||
*/
|
||||
export async function getTeamSearchByQuality(quality: number, lvRange: number) {
|
||||
export async function getTeamSearchByLv(lv: number) {
|
||||
// TODO: 操作不具有原子性
|
||||
const userInfos = await redisClient().srandmemberAsync(getComTeamKey(quality, lvRange), 2);
|
||||
console.log('getTeamSearchByQuality: ' + userInfos);
|
||||
const userInfos = await redisClient().srandmemberAsync(getComTeamKey(lv), 2);
|
||||
console.log('getTeamSearchByLv: ' + userInfos);
|
||||
if (!userInfos || !userInfos.length) return null;
|
||||
|
||||
let res = [];
|
||||
@@ -213,7 +204,7 @@ export async function getTeamSearchByQuality(quality: number, lvRange: number) {
|
||||
if (decodeData.length !== 2) return null;
|
||||
res.push({roleId: decodeData[0], sid: decodeData[1]});
|
||||
}
|
||||
console.log('getTeamSearchByQuality res: ', res);
|
||||
console.log('getTeamSearchByLv res: ', res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -222,17 +213,14 @@ export async function getTeamSearchByQuality(quality: number, lvRange: number) {
|
||||
* @export
|
||||
* @param {string} roleId
|
||||
* @param {string} sid
|
||||
* @param {Array<number>} qualityArr
|
||||
* @param {number} lvRange
|
||||
* @param {number} lv
|
||||
* @returns
|
||||
*/
|
||||
export async function checkRoleInQueue(roleId: string, sid: string, qualityArr: Array<number>, lvRange: number) {
|
||||
for (let quality of qualityArr) {
|
||||
let res = await redisClient().sismemberAsync(getComTeamKey(quality, lvRange), `${roleId}:${sid}`);
|
||||
if (res) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
export async function checkRoleInQueue(roleId: string, sid: string, lv: number) {
|
||||
let res = await redisClient().sismemberAsync(getComTeamKey(lv), `${roleId}:${sid}`);
|
||||
if (res) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -241,11 +229,7 @@ export async function checkRoleInQueue(roleId: string, sid: string, qualityArr:
|
||||
* @export
|
||||
*/
|
||||
export async function clearComBtlQueue() {
|
||||
for (let q of COM_BTL_QUALITY) {
|
||||
for (let lvRange of comBtlRanges()) {
|
||||
await redisClient().delAsync(getComTeamKey(q, lvRange));
|
||||
}
|
||||
}
|
||||
await delKeys(REDIS_KEY.COM_TEAM_SEARCH_PRE);
|
||||
}
|
||||
|
||||
export function setRedis(key: string, data: string) {
|
||||
|
||||
@@ -1,36 +1,37 @@
|
||||
import { ITID, CONSUME_TYPE, ITEM_TABLE, REDIS_KEY, TASK_TYPE, CURRENCY, CURRENCY_TYPE, MAIL_TYPE, HANDLE_REWARD_TYPE, HERO_SYSTEM_TYPE, CURRENCY_BY_TYPE, ITEM_CHANGE_REASON, TA_USERSET_TYPE, TA_EVENT } from './../consts';
|
||||
import { EquipModel, EquipType } from './../db/Equip';
|
||||
import { ITID, CONSUME_TYPE, ITEM_TABLE, CURRENCY, CURRENCY_TYPE, MAIL_TYPE, HANDLE_REWARD_TYPE, HERO_SYSTEM_TYPE, CURRENCY_BY_TYPE, ITEM_CHANGE_REASON, TA_USERSET_TYPE, TA_EVENT } from './../consts';
|
||||
import { getRandSingleEelm, resResult } from '../pubUtils/util';
|
||||
import { RoleModel, RoleType } from '../db/Role';
|
||||
import { setAp } from './actionPointService';
|
||||
import { pushCalPlayerCe, pushCalAllHeroCe, calPlayerCeAndSave } from './playerCeService';
|
||||
import { pushCalAllHeroCe, calPlayerCeAndSave } from './playerCeService';
|
||||
import { ItemModel, ItemType } from '../db/Item';
|
||||
import { STATUS } from '../consts/statusCode';
|
||||
import { pinus } from 'pinus';
|
||||
import { addEquips, addBags, addSkin, addFigure, unlockFigure as pubUnlockFigure, transPiece, getGoldObject, getCoinObject, getApObject } from '../pubUtils/itemUtils';
|
||||
import { addJewels, addBags, addSkin, addFigure, unlockFigure as pubUnlockFigure, transPiece, getGoldObject, getCoinObject, getApObject } from '../pubUtils/itemUtils';
|
||||
import { ItemInter, RewardInter, } from '../pubUtils/interface';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
import { uniq } from 'underscore';
|
||||
import { HeroModel, HeroType, HeroUpdate } from '../db/Hero';
|
||||
import { EPlace, HeroModel, HeroType, HeroUpdate } from '../db/Hero';
|
||||
import { Figure } from '../domain/dbGeneral';
|
||||
import { Rank } from './rankService';
|
||||
import { checkActivityTask, checkTaskWithHero, pushActivityUpdate, pushTaskUpdate } from './taskService';
|
||||
import { pushTaskUpdate } from './taskService';
|
||||
import { CreateHeroParam, HeroShowParam } from '../domain/roleField/hero';
|
||||
import { HeroSkin } from '../db/Hero';
|
||||
import { errlogger } from '../util/logger';
|
||||
import { BAG } from '../pubUtils/dicParam';
|
||||
import { sendMailByContent } from './mailService';
|
||||
import { calEquipSeids } from '../pubUtils/playerCe';
|
||||
import { CreateHeroes } from '../pubUtils/roleUtil';
|
||||
import { SkinUpdate } from '../db/Skin';
|
||||
import { getInitHeroById } from './roleService';
|
||||
import { getActivities } from './activity/activityService';
|
||||
import { reportTAEvent, reportTAUserSet } from './sdkService';
|
||||
import { saveCoinChangeLog, saveFigureInfoLog, saveGoldChangeLog, saveItemChangeLog } from '../pubUtils/logUtil';
|
||||
import { JewelModel, JewelType } from '../db/Jewel';
|
||||
import { updateEplaces } from './equipService';
|
||||
|
||||
export class CheckMeterial {
|
||||
private roleId: string;
|
||||
private itemsIndb: Map<number, number> = new Map(); // 玩家已有的东西
|
||||
private notEnoughItems: Map<number, number> = new Map(); // 缺少的数量
|
||||
private consumes: ItemInter[] = []; // 消耗,正向数
|
||||
|
||||
private goldId = CURRENCY_BY_TYPE.get(CURRENCY_TYPE.GOLD);
|
||||
@@ -49,18 +50,36 @@ export class CheckMeterial {
|
||||
}
|
||||
}
|
||||
|
||||
private pushToNotEnoughItems(id: number, count: number) {
|
||||
if(!this.notEnoughItems.has(id)) {
|
||||
this.notEnoughItems.set(id, 0);
|
||||
}
|
||||
this.notEnoughItems.set(id, this.notEnoughItems.get(id) + count);
|
||||
}
|
||||
|
||||
private getNotEnoughItems() {
|
||||
let map = new Map<number, number>();
|
||||
for(let [ id, count ] of this.notEnoughItems) {
|
||||
map.set(id, count);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public async decrease(goods: {id: number, count: number}[]) {
|
||||
this.notEnoughItems.clear();
|
||||
let { items, gold, coin } = sortItems(goods, HANDLE_REWARD_TYPE.COST);
|
||||
let isEnough = true;
|
||||
for(let { id, count} of items) {
|
||||
if(!this.itemsIndb.has(id)) {
|
||||
let item = await ItemModel.findbyRoleAndGidAndCount(this.roleId, id, count);
|
||||
let item = await ItemModel.findbyRoleAndGid(this.roleId, id);
|
||||
if(!item) {
|
||||
this.pushToNotEnoughItems(id, count);
|
||||
isEnough = false; break;
|
||||
}
|
||||
this.itemsIndb.set(id, item.count);
|
||||
}
|
||||
if(this.itemsIndb.get(id) < count) {
|
||||
this.pushToNotEnoughItems(id, count - this.itemsIndb.get(id));
|
||||
isEnough = false; break;
|
||||
}
|
||||
this.itemsIndb.set(id, this.itemsIndb.get(id) - count);
|
||||
@@ -73,7 +92,10 @@ export class CheckMeterial {
|
||||
this.itemsIndb.set(this.coinId, role.coin);
|
||||
}
|
||||
let goldCost = gold.reduce((pre, cur) => { return pre + cur.count }, 0);
|
||||
if(this.itemsIndb.get(this.goldId) < goldCost) isEnough = false;
|
||||
if(this.itemsIndb.get(this.goldId) < goldCost) {
|
||||
this.pushToNotEnoughItems(this.goldId, goldCost - this.itemsIndb.get(this.goldId));
|
||||
isEnough = false;
|
||||
}
|
||||
}
|
||||
if(isEnough && coin.length > 0) {
|
||||
if(!this.itemsIndb.has(this.coinId)) {
|
||||
@@ -82,13 +104,53 @@ export class CheckMeterial {
|
||||
this.itemsIndb.set(this.coinId, role.coin);
|
||||
}
|
||||
let coinCost = coin.reduce((pre, cur) => pre + cur, 0);
|
||||
if(this.itemsIndb.get(this.coinId) < coinCost) isEnough = false;
|
||||
if(this.itemsIndb.get(this.coinId) < coinCost) {
|
||||
this.pushToNotEnoughItems(this.coinId, coinCost - this.itemsIndb.get(this.coinId));
|
||||
isEnough = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(isEnough) this.consumes.push(...goods);
|
||||
return isEnough;
|
||||
}
|
||||
|
||||
private getMaterialEnough(materials: RewardInter[], notEnoughItems: Map<number, number>) {
|
||||
let newMaterials: RewardInter[] = [];
|
||||
for(let {id, count} of materials) {
|
||||
if(notEnoughItems.has(id)) {
|
||||
newMaterials.push({ id, count: count - notEnoughItems.get(id) });
|
||||
} else {
|
||||
newMaterials.push({ id, count });
|
||||
}
|
||||
}
|
||||
return newMaterials;
|
||||
}
|
||||
|
||||
// 检查地玉石是否可以合成
|
||||
public async composeStone(id: number, count: number) {
|
||||
let dicStone = gameData.stone.get(id);
|
||||
if(!dicStone || dicStone.composeMaterial.length <= 0) return false; // 1阶石头不能再从下合成返回不行
|
||||
let materials = dicStone.composeMaterial.map(cur => ({...cur, count: cur.count * count }));
|
||||
let isEnough = await this.decrease(materials);
|
||||
if(!isEnough) {
|
||||
let notEnoughItems = this.getNotEnoughItems();
|
||||
let newMaterials = this.getMaterialEnough(materials, notEnoughItems);
|
||||
let isEnough = await this.decrease(newMaterials); // 消耗掉除了不足的部分以外的其他部分
|
||||
if(!isEnough) return false;
|
||||
|
||||
let isAllOK = true; // 如果有石头不足,向下补充,isAllOK标识不足的都能补充上
|
||||
for(let [id, count] of notEnoughItems) {
|
||||
let isEnough = await this.composeStone(id, count);
|
||||
if(!isEnough) {
|
||||
isAllOK = false; break;
|
||||
}
|
||||
}
|
||||
return isAllOK;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public getConsume() {
|
||||
return this.consumes;
|
||||
}
|
||||
@@ -98,9 +160,9 @@ export class CheckMeterial {
|
||||
export async function handleCost(roleId: string, sid: string, goods: Array<ItemInter>, reason: ITEM_CHANGE_REASON) {
|
||||
|
||||
let uids = [{ uid: roleId, sid }];
|
||||
let { items, equips, gold, coin } = sortItems(goods, HANDLE_REWARD_TYPE.COST);
|
||||
let equipSeqIds = equips.map(cur => cur.seqId);
|
||||
let resEquips: EquipType[] = [];
|
||||
let { items, jewels, gold, coin } = sortItems(goods, HANDLE_REWARD_TYPE.COST);
|
||||
let jewelSeqIds = jewels.map(cur => cur.seqId);
|
||||
let resJewels: JewelType[] = [];
|
||||
|
||||
// 检查货币是否充足
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
@@ -111,9 +173,9 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
|
||||
if(originGold < 0 || originCoin < 0) return false;
|
||||
}
|
||||
//检查装备是否存在
|
||||
if (equips.length > 0) {
|
||||
resEquips = await EquipModel.getEquips(roleId, equipSeqIds);
|
||||
if (resEquips.length < equips.length)
|
||||
if (jewels.length > 0) {
|
||||
resJewels = await JewelModel.findbySeqIds(jewelSeqIds);
|
||||
if (resJewels.length < jewels.length)
|
||||
return false;
|
||||
}
|
||||
//检查并修改道具
|
||||
@@ -125,32 +187,35 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
|
||||
}
|
||||
|
||||
//删除装备
|
||||
if (resEquips.length > 0) {
|
||||
let heroMap = new Map<number, { hero: HeroType, equips: EquipType[]}>();
|
||||
for(let equip of resEquips) {
|
||||
if(equip.hid > 0) {
|
||||
if(!heroMap.has(equip.hid)) {
|
||||
let hero = await HeroModel.findByHidAndRoleWithEquip(equip.hid, roleId);
|
||||
heroMap.set(equip.hid, { hero, equips: [] });
|
||||
if (resJewels.length > 0) {
|
||||
let heroMap = new Map<number, { hero: HeroType, jewels: JewelType[]}>();
|
||||
for(let jewel of resJewels) {
|
||||
if(jewel.hid > 0) {
|
||||
if(!heroMap.has(jewel.hid)) {
|
||||
let hero = await HeroModel.findByHidAndRole(jewel.hid, roleId);
|
||||
heroMap.set(jewel.hid, { hero, jewels: [] });
|
||||
}
|
||||
heroMap.get(equip.hid).equips.push(equip);
|
||||
heroMap.get(jewel.hid).jewels.push(jewel);
|
||||
}
|
||||
}
|
||||
for(let [_hid, {hero, equips} ] of heroMap) {
|
||||
let oldCount = hero.ePlace.filter(cur => cur.equip).length;
|
||||
let args = calEquipSeids(hero);
|
||||
for(let equip of equips) {
|
||||
hero = await HeroModel.removeEquip(roleId, hero.hid, equip.ePlaceId, equip._id);
|
||||
for(let [_hid, {hero, jewels} ] of heroMap) {
|
||||
// 脱下天晶石
|
||||
let update = new Map<number, Partial<EPlace>>();
|
||||
for(let jewel of jewels) {
|
||||
await JewelModel.putOnOrOff(jewel.id, 0, 0);
|
||||
let curEquip = hero.ePlace.find(cur => cur.jewel == jewel.id);
|
||||
if(!!curEquip) {
|
||||
update.set(curEquip.id, { jewel: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP, sid, roleId, hero, {}, args);
|
||||
await checkTaskWithHero(roleId, sid, TASK_TYPE.EQUIP_BY_HERO, hero, [-1, oldCount]);
|
||||
let { newEplace } = updateEplaces(hero.ePlace, update);
|
||||
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STRENGTH, sid, roleId, hero, { ePlace: newEplace }, [...update.keys()]);
|
||||
}
|
||||
|
||||
|
||||
let equips = await EquipModel.deleteEquips(roleId, equipSeqIds);
|
||||
saveItemChangeLog(roleId, equips.map(equip => ({ id: equip.id, count: equip.count, inc: -1 })), reason);
|
||||
pinus.app.get('channelService').pushMessageByUids('onEquipDel', resResult(STATUS.SUCCESS, { equipInfos: equips.map(equip => ({ seqId: equip.seqId, id: equip.id, inc: -1, reason })) }), uids);
|
||||
let jewels = await JewelModel.deleteBySeqIds(roleId, jewelSeqIds);
|
||||
saveItemChangeLog(roleId, jewels.map(jewel => ({ id: jewel.id, count: 1, inc: -1 })), reason);
|
||||
pinus.app.get('channelService').pushMessageByUids('onJewelDel', resResult(STATUS.SUCCESS, { jewels: jewels.map(jewel => ({ seqId: jewel.seqId, id: jewel.id, inc: -1, reason })) }), uids);
|
||||
}
|
||||
|
||||
//消耗玩家货币
|
||||
@@ -181,41 +246,39 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
|
||||
// TODO: sid 在方法内部获取,且不一定存在
|
||||
export async function addItems(roleId: string, roleName: string, sid: string, goods: Array<ItemInter>, reason: ITEM_CHANGE_REASON) {
|
||||
let uids = [{ uid: roleId, sid }];
|
||||
let { items, equips, gold, coin, ap, skins, figures } = sortItems(goods, HANDLE_REWARD_TYPE.RECEIVE);
|
||||
let { items, jewels, gold, coin, ap, skins, figures } = sortItems(goods, HANDLE_REWARD_TYPE.RECEIVE);
|
||||
let showItems: { id: number, seqId?: number, count: number, isBag?: boolean }[] = [];
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
// 1. 装备处理
|
||||
if(equips.length > 0) {
|
||||
let { equipCount = 0 } = role;
|
||||
let incEquips = equips, mailEquips: { id?: number, hid?: number, seqId?: number }[] = [];
|
||||
if(equips.length + equipCount > BAG.BAG_EQUIP_UPLIMITED) { // 装备上限
|
||||
let inc = BAG.BAG_EQUIP_UPLIMITED - equipCount;
|
||||
if(jewels.length > 0) {
|
||||
let { jewelCount = 0 } = role;
|
||||
let incJewels = jewels, mailJewels: { id?: number, hid?: number, seqId?: number }[] = [];
|
||||
if(jewels.length + jewelCount > BAG.BAG_EQUIP_UPLIMITED) { // 装备上限
|
||||
let inc = BAG.BAG_EQUIP_UPLIMITED - jewelCount;
|
||||
if(inc < 0) inc = 0;
|
||||
incEquips = equips.slice(0, inc);
|
||||
mailEquips = equips.slice(inc);
|
||||
incJewels = jewels.slice(0, inc);
|
||||
mailJewels = jewels.slice(inc);
|
||||
}
|
||||
|
||||
// 直接加的
|
||||
let { equips: equipInfos, pushMessages } = await addEquips(roleId, roleName, <{id: number, hid?: number}[]>incEquips, reason);
|
||||
for (let equip of equipInfos) {
|
||||
showItems.push({ seqId: equip.seqId, id: equip.id, count: 1, isBag: true });
|
||||
let { jewels: jewelInfos, pushMessages } = await addJewels(roleId, roleName, <{id: number, hid?: number}[]>incJewels, reason);
|
||||
for (let jewel of jewelInfos) {
|
||||
showItems.push({ seqId: jewel.seqId, id: jewel.id, count: 1, isBag: true });
|
||||
}
|
||||
for(let equip of combineItems(mailEquips)) {
|
||||
showItems.push({ id: equip.id, count: equip.count, isBag: false });
|
||||
for(let jewel of combineItems(mailJewels)) {
|
||||
showItems.push({ id: jewel.id, count: jewel.count, isBag: false });
|
||||
}
|
||||
//装备推送
|
||||
if (!!equipInfos.length)
|
||||
pinus.app.get('channelService').pushMessageByUids('onEquipAdd', resResult(STATUS.SUCCESS, { equipInfos }), uids);
|
||||
if (!!jewelInfos.length)
|
||||
pinus.app.get('channelService').pushMessageByUids('onJewelAdd', resResult(STATUS.SUCCESS, { jewelInfos }), uids);
|
||||
pushTaskUpdate(roleId, sid, pushMessages);
|
||||
//统计装备
|
||||
if (equipInfos.length > 0) {
|
||||
let { serverId } = await RoleModel.findByRoleId(roleId);
|
||||
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.EQUIP_QUALITY_COUNT, equipInfos.length, { equips: equipInfos.map(obj => { return { quality: obj.quality } }) })
|
||||
saveItemChangeLog(roleId, equipInfos, reason);
|
||||
if (jewelInfos.length > 0) {
|
||||
saveItemChangeLog(roleId, jewelInfos, reason);
|
||||
}
|
||||
// 发邮件的
|
||||
if(mailEquips.length > 0) {
|
||||
await sendMailByContent(MAIL_TYPE.EQUIP_OVER, roleId, { goods: combineItems(mailEquips) });
|
||||
if(mailJewels.length > 0) {
|
||||
await sendMailByContent(MAIL_TYPE.EQUIP_OVER, roleId, { goods: combineItems(mailJewels) });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,12 +398,12 @@ export function combineItems(items: { id?: number, count?: number }[]) {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function combineItemAndEquips(items: { id?: number, count?: number }[]) {
|
||||
export function combineItemAndJewels(items: { id?: number, count?: number }[]) {
|
||||
let result: { id: number, count: number }[] = [];
|
||||
for(let { id, count = 1 } of items) {
|
||||
let dicGoods = gameData.goods.get(id);
|
||||
let dicItid = ITID.get(dicGoods.itid);
|
||||
if(dicItid.table != 'equip') {
|
||||
if(dicItid.table != 'jewel') {
|
||||
let index = result.findIndex(cur => cur.id == id);
|
||||
if(index == -1) {
|
||||
result.push({ id, count });
|
||||
@@ -356,7 +419,7 @@ export function combineItemAndEquips(items: { id?: number, count?: number }[]) {
|
||||
|
||||
function sortItems(goods: ItemInter[], handleType: HANDLE_REWARD_TYPE) {
|
||||
let items: { id: number, count: number }[] = []; // 可叠加道具
|
||||
let equips: { seqId?: number, id?: number, hid?: number }[] = []; // 不可叠加装备
|
||||
let jewels: { seqId?: number, id?: number, hid?: number }[] = []; // 不可叠加装备
|
||||
let gold: { count: number, isPay: boolean }[] = []; // 金币
|
||||
let coin: number[] = [];
|
||||
let ap: number = 0;
|
||||
@@ -376,14 +439,14 @@ function sortItems(goods: ItemInter[], handleType: HANDLE_REWARD_TYPE) {
|
||||
continue;
|
||||
}
|
||||
let { type, table, isCurrency } = dicItid;
|
||||
if(table == ITEM_TABLE.EQUIP) { // 装备
|
||||
if(table == ITEM_TABLE.JEWEL) { // 装备
|
||||
if(handleType == HANDLE_REWARD_TYPE.RECEIVE) {
|
||||
for(let i = 0; i < good.count; i++) {
|
||||
equips.push({ id: good.id, hid: good.hid })
|
||||
jewels.push({ id: good.id, hid: good.hid })
|
||||
}
|
||||
} else {
|
||||
if(!!good.seqId) {
|
||||
equips.push({ seqId: good.seqId });
|
||||
jewels.push({ seqId: good.seqId });
|
||||
}
|
||||
}
|
||||
} else if (table == ITEM_TABLE.ITEM) { // 可叠加道具
|
||||
@@ -429,11 +492,11 @@ function sortItems(goods: ItemInter[], handleType: HANDLE_REWARD_TYPE) {
|
||||
|
||||
}
|
||||
|
||||
return { items, equips, gold, coin, ap, skins, figures }
|
||||
return { items, jewels, gold, coin, ap, skins, figures }
|
||||
}
|
||||
|
||||
export async function checkGoods(roleId: string, goodIds: Array<number>) {
|
||||
let equipIds: Array<number> = [];
|
||||
let jewelSeqIds: Array<number> = [];
|
||||
let itemIds: Array<number> = [];
|
||||
let hids: Array<number> = [];
|
||||
goodIds = uniq(goodIds);
|
||||
@@ -442,7 +505,7 @@ export async function checkGoods(roleId: string, goodIds: Array<number>) {
|
||||
if (!!goodInfo) {
|
||||
let { table } = ITID.get(goodInfo.itid);
|
||||
if (table == ITEM_TABLE.EQUIP) {
|
||||
equipIds.push(goodId);
|
||||
jewelSeqIds.push(goodId);
|
||||
} else if (table == ITEM_TABLE.ITEM) {
|
||||
itemIds.push(goodId);
|
||||
}
|
||||
@@ -450,12 +513,12 @@ export async function checkGoods(roleId: string, goodIds: Array<number>) {
|
||||
}
|
||||
|
||||
//检查装备是否存在
|
||||
if (!!equipIds.length) {
|
||||
let resEquips = await EquipModel.getEquipsByIds(roleId, equipIds);
|
||||
resEquips = uniq(resEquips, function (resEquip) {
|
||||
if (!!jewelSeqIds.length) {
|
||||
let resJewels = await JewelModel.findbySeqIds(jewelSeqIds);
|
||||
resJewels = uniq(resJewels, function (resEquip) {
|
||||
return resEquip.id;
|
||||
});
|
||||
if (resEquips.length < equipIds.length)
|
||||
if (resJewels.length < jewelSeqIds.length)
|
||||
return false;
|
||||
}
|
||||
//检查并修改道具
|
||||
@@ -476,6 +539,10 @@ export async function checkHeroes(roleId: string, hids: number[]) {
|
||||
return true
|
||||
}
|
||||
|
||||
export async function checkHeroEquips(roleId: string, quality: number) {
|
||||
return await HeroModel.checkEquipByQuality(roleId, quality);
|
||||
}
|
||||
|
||||
export async function unlockFigure(sid: string, roleId: string, conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number, paramWinStreakNum?: number }[], role?: RoleType) {
|
||||
let figureInfo = await pubUnlockFigure(roleId, conditions, role);
|
||||
await pushFigureUpdate(roleId, sid, figureInfo);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { EquipType } from './../db/Equip';
|
||||
|
||||
import { EPlace, HeroType } from '../db/Hero';
|
||||
import { GuildType } from '../db/Guild';
|
||||
import { CHANNEL_PREFIX, HERO_GROW_MAX, HERO_INITIAL_QUALITY, MSG_SOURCE, MSG_TYPE, ON_GROUP_MSG_ROUTE, STATUS, WAR_TYPE } from '../consts';
|
||||
@@ -91,13 +89,13 @@ export async function pushGuildBossSucMsg(roleId: string, roleName: string, guil
|
||||
}
|
||||
|
||||
export async function pushEquipRefineSucMsg(roleId: string, roleName: string, serverId: number, eplace: Partial<EPlace>, quality: number) {
|
||||
const { id, lv, refineLv, equip } = eplace;
|
||||
const { id: equipId } = equip as EquipType;
|
||||
const data = { id, lv, refineLv, equipId, quality };
|
||||
const content = JSON.stringify({ roleId, roleName, eplace: data, equip: pick(equip, ['id', 'name', 'eplaceId', 'quality', 'holes', 'randMain', 'randSe', 'grade', 'hid']) });
|
||||
const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_REFINE_SUC, content, null, null);
|
||||
await pushGroupMsgToRoom(msgData);
|
||||
return msgData;
|
||||
// const { id, lv, refineLv, equip } = eplace;
|
||||
// const { id: equipId } = equip as EquipType;
|
||||
// const data = { id, lv, refineLv, equipId, quality };
|
||||
// const content = JSON.stringify({ roleId, roleName, eplace: data, equip: pick(equip, ['id', 'name', 'eplaceId', 'quality', 'holes', 'randMain', 'randSe', 'grade', 'hid']) });
|
||||
// const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_REFINE_SUC, content, null, null);
|
||||
// await pushGroupMsgToRoom(msgData);
|
||||
// return msgData;
|
||||
}
|
||||
|
||||
export async function pushNormalEquipMsg(roleId: string, roleName: string, serverId: number, source: number, id: number, name: string, quality: number) {
|
||||
|
||||
@@ -5,14 +5,13 @@ import { resResult, shouldRefresh } from '../pubUtils/util';
|
||||
import { STATUS, TASK_TYPE, TASK_FUN_TYPE, SHOP_REFRESH_TYPE, WAR_TYPE } from '../consts';
|
||||
import { TaskParam, TaskListReturn } from '../domain/roleField/task';
|
||||
import { HeroType } from '../db/Hero';
|
||||
import { EquipType } from '../db/Equip';
|
||||
import { getRoleOnlineInfo } from './redisService';
|
||||
import { HeroScores } from '../db/PvpHistoryOpp';
|
||||
import { ItemInter } from '../pubUtils/interface';
|
||||
import { UserTaskModel, UserTaskType } from '../db/UserTask';
|
||||
import { UserTaskRecModel } from '../db/UserTaskRec';
|
||||
import { UserTaskHistoryModel } from '../db/UserTaskHistory';
|
||||
import { gameData, getGoodById } from '../pubUtils/data';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
import { getSeconds, getZeroPointD } from '../pubUtils/timeUtil';
|
||||
import { RoleStatus } from '../db/ComBattleTeam';
|
||||
import { getActivities } from './activity/activityService';
|
||||
@@ -35,10 +34,10 @@ export async function checkTaskWithHero(roleId: string, sid: string, taskType: n
|
||||
pushTaskUpdate(roleId, sid, pushMessage);
|
||||
}
|
||||
|
||||
export async function checkTaskWithEquip(roleId: string, sid: string, taskType: number, equip: EquipType, args?: number[]) {
|
||||
let pushMessage = await taskUtil.checkTaskWithEquip(roleId, taskType, equip, args);
|
||||
pushTaskUpdate(roleId, sid, pushMessage);
|
||||
}
|
||||
// export async function checkTaskWithEquip(roleId: string, sid: string, taskType: number, equip: EquipType, args?: number[]) {
|
||||
// let pushMessage = await taskUtil.checkTaskWithEquip(roleId, taskType, equip, args);
|
||||
// pushTaskUpdate(roleId, sid, pushMessage);
|
||||
// }
|
||||
|
||||
export async function checkTaskWithArgs(roleId: string, sid: string, taskType: number, args: number[]) {
|
||||
let pushMessage = await taskUtil.checkTaskWithArgs(roleId, taskType, args);
|
||||
@@ -329,37 +328,4 @@ export async function refDailyTaskBox(roleId: string, sid: string, debug = false
|
||||
point, weeklyPoint, box
|
||||
}), uids);
|
||||
}
|
||||
}
|
||||
|
||||
//任务条件
|
||||
//英雄满装备且都镶嵌相同阶数的宝石
|
||||
export async function checkTaskConditionEquipSuitJewelStage(hero: HeroType) {
|
||||
let isTask = true;//是否满足任务条件
|
||||
let jewelLevel = -1;//宝石阶数
|
||||
for (let i = 0; i < hero.ePlace.length; i++) {
|
||||
let equipObj = <EquipType>hero.ePlace[i].equip;
|
||||
if (equipObj) {
|
||||
let equipObjInfo = getGoodById(equipObj.id);
|
||||
if (equipObj.holes.length == equipObjInfo.hole && equipObjInfo.hole > 0) {
|
||||
for (let j = 0; j < equipObj.holes.length; j++) {
|
||||
let jewel = equipObj.holes[j].jewel;
|
||||
let jewelInfo = getGoodById(jewel);
|
||||
if (jewelInfo) {
|
||||
if (jewelLevel == -1) {
|
||||
jewelLevel = jewelInfo.lvLimited;
|
||||
} else if (jewelInfo.lvLimited != jewelLevel) {
|
||||
//宝石阶数不同
|
||||
isTask = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//宝石没有镶满
|
||||
isTask = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return { isTask, jewelLevel };
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
import { BattleDropModel } from '../db/BattleDrop';
|
||||
import { getRandEelmWithWeight, getRandSingleEelm, getReasonByWarType } from '../pubUtils/util';
|
||||
import { BATTLE_REWARD_TYPE, BLUEPRT_CONST } from '../consts';
|
||||
import { addItems, combineItemAndEquips } from './rewardService';
|
||||
import { addItems, combineItemAndJewels } from './rewardService';
|
||||
import { BattleBlueprtDropModel } from '../db/BattleBlueprtDrop'
|
||||
import { RoleModel } from '../db/Role';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
@@ -117,58 +117,6 @@ export class WarReward {
|
||||
}
|
||||
}
|
||||
|
||||
private async handlerBlueprtReward(num: number) {
|
||||
const refTime = getZeroPointD();
|
||||
const battleBlueprtDrop = await BattleBlueprtDropModel.findByTime(this.roleId, refTime);
|
||||
if(battleBlueprtDrop) {
|
||||
let { getNum = 0, curCostAp = 0, getSum = 0, costAp = 0 } = battleBlueprtDrop;
|
||||
for(let i = 0; i < num; i ++) {
|
||||
let flag = false; // 是否可以获得
|
||||
if( curCostAp >= BLUEPRT_CONST.PER_AP) {
|
||||
curCostAp = curCostAp - BLUEPRT_CONST.PER_AP; getNum = 0;
|
||||
}
|
||||
costAp += this.costAp; curCostAp += this.costAp;
|
||||
if(getNum == 0) {
|
||||
let r = Math.random();
|
||||
console.log(r, 1/BLUEPRT_CONST.PER_AP*curCostAp);
|
||||
if(r <= 1/BLUEPRT_CONST.PER_AP*curCostAp || (curCostAp >= BLUEPRT_CONST.PER_AP) ) {
|
||||
flag = true; // 独立概率随机
|
||||
}
|
||||
}
|
||||
if(getSum >= BLUEPRT_CONST.DAILY_CNT) {
|
||||
flag = false;
|
||||
}
|
||||
if(flag) {
|
||||
getNum ++; getSum++;
|
||||
const obj = await this.randomBlueprt();
|
||||
if(obj) {
|
||||
this.rewards.push({type: BATTLE_REWARD_TYPE.RANDOM_REWARD, times: i +1, ...obj});
|
||||
}
|
||||
}
|
||||
}
|
||||
await BattleBlueprtDropModel.updateByTime(this.roleId, refTime, {
|
||||
getNum, curCostAp, getSum, costAp
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async randomBlueprt() {
|
||||
const { lv } = await RoleModel.findByRoleId(this.roleId);
|
||||
const dicPossibility = gameData.blueprtPossibility;
|
||||
|
||||
const result = dicPossibility.find(cur => {return cur.min <= lv && cur.max >= lv});
|
||||
|
||||
if(result) {
|
||||
const {dic: {id}} = getRandEelmWithWeight(result.possibility);
|
||||
|
||||
const blueprtList = gameData.blueprt.get(id);
|
||||
const gid = getRandSingleEelm(blueprtList);
|
||||
return {id: gid, count:1}
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
public async saveReward(num: number, combine: boolean = false) {
|
||||
this.rewards = new Array();
|
||||
// let warType = this.warInfo.warType;
|
||||
@@ -184,7 +132,7 @@ export class WarReward {
|
||||
|
||||
let rewards = this.rewards;
|
||||
if(combine) {
|
||||
rewards = combineItemAndEquips(rewards);
|
||||
rewards = combineItemAndJewels(rewards);
|
||||
}
|
||||
await addItems(this.roleId, this.roleName, this.sid, rewards, getReasonByWarType(this.warInfo.warType));
|
||||
return rewards;
|
||||
|
||||
@@ -12,8 +12,8 @@ module.exports = {
|
||||
"required string target": 4
|
||||
},
|
||||
"role.equipHandler.composeEquip": {
|
||||
"required uInt32 gid": 1,
|
||||
"repeated uInt32 originalEquip": 2
|
||||
"required uInt32 hid": 1,
|
||||
"required uInt32 eplaceId": 2
|
||||
},
|
||||
"role.equipHandler.decomposeEquip": {
|
||||
"repeated uInt32 originalEquip": 1
|
||||
@@ -23,11 +23,6 @@ module.exports = {
|
||||
"required uInt32 hid": 2,
|
||||
"required uInt32 type": 3
|
||||
},
|
||||
"role.equipHandler.strengthen": {
|
||||
"required uInt32 hid": 1,
|
||||
"required uInt32 ePlaceId": 2,
|
||||
"required uInt32 type": 3
|
||||
},
|
||||
"role.equipHandler.strengthenAll": {
|
||||
"required uInt32 hid": 1,
|
||||
"required uInt32 lv": 2
|
||||
|
||||
@@ -116,7 +116,7 @@ module.exports = {
|
||||
// 'required uInt32 code': 2,
|
||||
// 'required Data data': 3
|
||||
// },
|
||||
// 'onEquipAdd': {
|
||||
// 'onJewelAdd': {
|
||||
// 'message Data': {
|
||||
// "message EquipInfo": {
|
||||
// "message RandSe": {
|
||||
@@ -147,7 +147,7 @@ module.exports = {
|
||||
// 'required uInt32 code': 2,
|
||||
// 'required Data data': 3
|
||||
// },
|
||||
// 'onEquipDel': {
|
||||
// 'onJewelDel': {
|
||||
// 'message Data': {
|
||||
// 'repeated uInt32 equips': 1
|
||||
// },
|
||||
|
||||
@@ -105,7 +105,7 @@ describe('拍卖行测试', function () {
|
||||
|
||||
it('出价,竞价和一口价', function (done) {
|
||||
let gid = null;
|
||||
pinusClient.on('onEquipAdd', (res) => {
|
||||
pinusClient.on('onJewelAdd', (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.equipInfos).to.be.an('array');
|
||||
for (let info of res.data.equipInfos) {
|
||||
|
||||
@@ -131,7 +131,7 @@ export const GUILD_ROUTE_OPERATE = [
|
||||
{ route: 'guild.donateHandler.donate', operate: GUILD_OPERATE.DONATE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.donateHandler.receiveBox', operate: GUILD_OPERATE.DONATE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildRefineHandler.getRefine', operate: GUILD_OPERATE.REFINE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildRefineHandler.refineEquip', operate: GUILD_OPERATE.REFINE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildRefineHandler.refine', operate: GUILD_OPERATE.REFINE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildRefineHandler.assistRefine', operate: GUILD_OPERATE.ASSIST_REFINE, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildTrainHandler.getTrainInstance', operate: GUILD_OPERATE.TRAIN, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
{ route: 'guild.guildTrainHandler.getTrainReports', operate: GUILD_OPERATE.TRAIN, type: GUILD_AUTH_CHECK_TYPE.CHECK_SELF },
|
||||
|
||||
@@ -21,6 +21,14 @@ export enum HERO_SYSTEM_TYPE {
|
||||
TITLE = 18, // 爵位
|
||||
TERAPH = 19, // 神像强化
|
||||
TERAPH_UP = 20, // 神像升级
|
||||
COMPOSE_EQUIP = 21, // 合成装备
|
||||
EQUIP_STRENGTH = 22, // 装备强化
|
||||
EQUIP_QUALITY = 23, // 装备升品
|
||||
EQUIP_STAR = 24, // 装备升星
|
||||
EQUIP_JEWEL = 25, // 装备装上or卸下天晶石
|
||||
EQUIP_STONE = 26, // 装备装上or卸下地玉石
|
||||
JEWEL_RESET_RANDSE = 27, // 天晶石洗练
|
||||
JEWEL_QUENCH = 28, // 天晶石淬炼
|
||||
};
|
||||
|
||||
// 武将上限
|
||||
|
||||
@@ -36,6 +36,7 @@ export const CONSUME_TYPE = {
|
||||
GIFT_PACKAGE: 14, // 礼包
|
||||
AP: 15, // 回复体力道具
|
||||
DICE: 16, // 骰子
|
||||
DRAWING: 17, // 图纸
|
||||
};
|
||||
|
||||
export enum ROLE_TERAPH {
|
||||
@@ -92,16 +93,17 @@ export const ITEM_TABLE = {
|
||||
ITEM: 'item',
|
||||
ROLE: 'role',
|
||||
HERO: 'hero',
|
||||
SKIN: 'skin'
|
||||
SKIN: 'skin',
|
||||
JEWEL: 'jewel',
|
||||
}
|
||||
|
||||
const itid_array = [
|
||||
{ id: 1, name: '神兵', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON },
|
||||
{ id: 2, name: '宝甲', table: 'equip', type: EQUIP_TYPE.CLOTHES, equipJewel: JEWEL_TYPE.CLOTHES },
|
||||
{ id: 3, name: '冠冕', table: 'equip', type: EQUIP_TYPE.SHOES, equipJewel: JEWEL_TYPE.CAP },
|
||||
{ id: 4, name: '行具', table: 'equip', type: EQUIP_TYPE.CAP, equipJewel: JEWEL_TYPE.SHOES },
|
||||
{ id: 5, name: '典籍', table: 'equip', type: EQUIP_TYPE.BOOK, equipJewel: JEWEL_TYPE.BOOK },
|
||||
{ id: 6, name: '饰品', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY },
|
||||
{ id: 1, name: '神兵', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON }, //
|
||||
{ id: 2, name: '宝甲', table: 'equip', type: EQUIP_TYPE.CLOTHES, equipJewel: JEWEL_TYPE.CLOTHES }, //
|
||||
{ id: 3, name: '冠冕', table: 'equip', type: EQUIP_TYPE.SHOES, equipJewel: JEWEL_TYPE.CAP }, //
|
||||
{ id: 4, name: '行具', table: 'equip', type: EQUIP_TYPE.CAP, equipJewel: JEWEL_TYPE.SHOES }, //
|
||||
{ id: 5, name: '典籍', table: 'equip', type: EQUIP_TYPE.BOOK, equipJewel: JEWEL_TYPE.BOOK }, //
|
||||
{ id: 6, name: '饰品', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY }, //
|
||||
|
||||
{ id: 24, name: '消耗品', table: 'item', type: CONSUME_TYPE.CONSUME },
|
||||
|
||||
@@ -117,22 +119,22 @@ const itid_array = [
|
||||
{ id: 27, name: '货币', table: 'role', isCurrency: true },
|
||||
{ id: 28, name: '藏宝图', table: 'item', type: CONSUME_TYPE.BLUEPRT },
|
||||
|
||||
{ id: 29, name: '礼器', table: 'equip', type: EQUIP_TYPE.ACCESSORY },
|
||||
{ id: 30, name: '宝甲', table: 'equip', type: EQUIP_TYPE.CLOTHES },
|
||||
{ id: 31, name: '名驹', table: 'equip', type: EQUIP_TYPE.SHOES },
|
||||
{ id: 32, name: '典籍', table: 'equip', type: EQUIP_TYPE.BOOK },
|
||||
{ id: 33, name: '神兵', table: 'equip', type: EQUIP_TYPE.WEAPON },
|
||||
{ id: 29, name: '礼器', table: 'equip', type: EQUIP_TYPE.ACCESSORY }, //
|
||||
{ id: 30, name: '宝甲', table: 'equip', type: EQUIP_TYPE.CLOTHES }, //
|
||||
{ id: 31, name: '名驹', table: 'equip', type: EQUIP_TYPE.SHOES }, //
|
||||
{ id: 32, name: '典籍', table: 'equip', type: EQUIP_TYPE.BOOK }, //
|
||||
{ id: 33, name: '神兵', table: 'equip', type: EQUIP_TYPE.WEAPON }, //
|
||||
{ id: 34, name: '代币', table: 'item', type: CONSUME_TYPE.POINT },
|
||||
{ id: 53, name: '武将招募券', table: 'item', type: CONSUME_TYPE.POINT },
|
||||
{ id: 39, name: '时装', table: 'skin', type: CONSUME_TYPE.SKIN },
|
||||
{ id: 40, name: '装备碎片', table: 'item', type: CONSUME_TYPE.PIECE },
|
||||
{ id: 41, name: '图纸', table: 'item', type: CONSUME_TYPE.CONSUME },
|
||||
{ id: 41, name: '图纸', table: 'item', type: CONSUME_TYPE.DRAWING },
|
||||
{ id: 42, name: '神兵宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 43, name: '宝甲宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 44, name: '免冠宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 45, name: '足具宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 46, name: '礼器宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 47, name: '典籍宝石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 46, name: '礼器宝石', table: 'item', type: CONSUME_TYPE.JEWEL }, //
|
||||
{ id: 47, name: '典籍宝石', table: 'item', type: CONSUME_TYPE.JEWEL }, //
|
||||
{ id: 48, name: '灵玄石', table: 'item', type: CONSUME_TYPE.JEWEL },
|
||||
{ id: 49, name: '玩家好感道具', table: 'item', type: CONSUME_TYPE.FRIEND_FAVOUR },
|
||||
{ id: 50, name: '形象', table: 'role', type: CONSUME_TYPE.HEAD },
|
||||
@@ -141,6 +143,10 @@ const itid_array = [
|
||||
{ id: 55, name: '回复体力道具', table: 'item', type: CONSUME_TYPE.AP },
|
||||
{ id: 56, name: '骰子', table: 'item', type: CONSUME_TYPE.DICE },
|
||||
{ id: 58, name: '主公经验', table: 'role' },
|
||||
{ id: 59, name: '武器天晶石', table: 'jewel' },
|
||||
{ id: 60, name: '衣服天晶石', table: 'jewel' },
|
||||
{ id: 61, name: '头饰天晶石', table: 'jewel' },
|
||||
{ id: 62, name: '行具天晶石', table: 'jewel' },
|
||||
];
|
||||
|
||||
export const ITID = new Map<number, { id: number, name: string, table: string, type?: number, isCurrency?: boolean, equipJewel?: number }>();
|
||||
@@ -205,15 +211,6 @@ export enum QUALITY_TYPE {
|
||||
export const GOOD_QUALITY = [QUALITY_TYPE.BLUE, QUALITY_TYPE.PURPLE, QUALITY_TYPE.ORANGE, QUALITY_TYPE.RED, QUALITY_TYPE.GOLD];
|
||||
export const COM_BTL_QUALITY = [QUALITY_TYPE.BLUE, QUALITY_TYPE.PURPLE, QUALITY_TYPE.ORANGE, QUALITY_TYPE.RED];
|
||||
|
||||
// 各品质随机属性条数 quality => number
|
||||
export const RANDOM_SE_COUNT = new Map<number, number>([
|
||||
[QUALITY_TYPE.BLUE, 0],
|
||||
[QUALITY_TYPE.PURPLE, 1],
|
||||
[QUALITY_TYPE.ORANGE, 2],
|
||||
[QUALITY_TYPE.RED, 3],
|
||||
[QUALITY_TYPE.GOLD, 4]
|
||||
]);
|
||||
|
||||
|
||||
export enum HERO_QUALITY_TYPE {
|
||||
BLUE = 1, // 蓝将
|
||||
|
||||
@@ -49,4 +49,4 @@ export enum FRIEND_SHIP_SELECT {
|
||||
GET_FRIEND_VALUE = 'friendValue friendLv'
|
||||
}
|
||||
|
||||
export const ENTERY_ROLE_PICK = ['roleId', 'roleName', 'serverId', 'ce', 'topLineupCe', 'coin', 'lv', 'exp', 'vLv', 'gold', 'heros', 'equips', 'consumeGoods', 'title', 'teraphs', 'showLineup', 'heads', 'head', 'frames', 'frame', 'spines', 'spine', 'hasGuild', 'guildCode', 'todayZeroPoint', 'apJson', 'skins', 'totalPay', 'guide', 'hasInit', 'renameCnt', 'totalCost', 'guildName'];
|
||||
export const ENTERY_ROLE_PICK = ['roleId', 'roleName', 'serverId', 'ce', 'topLineupCe', 'coin', 'lv', 'exp', 'vLv', 'gold', 'heros', 'jewels', 'consumeGoods', 'title', 'teraphs', 'showLineup', 'heads', 'head', 'frames', 'frame', 'spines', 'spine', 'hasGuild', 'guildCode', 'todayZeroPoint', 'apJson', 'skins', 'totalPay', 'guide', 'hasInit', 'renameCnt', 'totalCost', 'guildName'];
|
||||
@@ -38,6 +38,7 @@ export const COUNTER = {
|
||||
GM_GROUP: { name: 'gmgroup', def: 1 },
|
||||
HID: { name: 'hid', def: 10000 },
|
||||
EID: { name: 'eid', def: 1 },
|
||||
JEWEL_ID: { name: 'jid', def: 1 },
|
||||
ROLE: { name: 'role', def: 1 },
|
||||
ACTIVITY: { name: 'aid', def: 1 },
|
||||
ACTIVITY_GROUP: { name: 'agid', def: 1 },
|
||||
@@ -485,6 +486,15 @@ export const FILENAME = {
|
||||
DIC_GUILD_WISH_REWARD: 'dic_army_wishReward',
|
||||
DIC_API: 'dic_api',
|
||||
DIC_SERVER_CONST: 'server_const',
|
||||
DIC_EQUIP: 'dic_zyz_equip',
|
||||
DIC_EQUIP_SUIT: 'dic_zyz_equipSuit',
|
||||
DIC_EQUIP_STRENGTH: 'dic_zyz_equipStrength',
|
||||
DIC_EQUIP_QUALITY: 'dic_zyz_equipQuality',
|
||||
DIC_EQUIP_STAR: 'dic_zyz_equipStar',
|
||||
DIC_EQUIP_QUALITY_EXTRA: 'dic_zyz_equipQuality_extra',
|
||||
DIC_JEWEL: 'dic_zyz_jewel',
|
||||
DIC_STONE: 'dic_zyz_stone',
|
||||
DIC_JEWEL_CONDITION: 'dic_zyz_jewel_condition',
|
||||
}
|
||||
|
||||
export const WAR_RELATE_TABLES = [
|
||||
@@ -699,10 +709,10 @@ export const GACHA_TO_FLOOR = new Map([
|
||||
export enum GACHA_CONTENT_TYPE {
|
||||
HERO = 1, // 武将 param为武将品质
|
||||
HERO_PIECE = 2, // 武将碎片 武将品质
|
||||
BLUEPRT = 3, // 藏宝图 藏宝图品质
|
||||
// BLUEPRT = 3, // 藏宝图 藏宝图品质
|
||||
JEWEL = 4, // 宝石 宝石等级
|
||||
TERAPH_MATERIAL = 5, // 强化神像用的材料 材料物品id
|
||||
SUIT_PAPER = 6, // 套装图纸
|
||||
// SUIT_PAPER = 6, // 套装图纸
|
||||
}
|
||||
|
||||
export const GACHA_OCCUPY_HID = 9999; // 抽卡里占位的武将
|
||||
@@ -925,6 +935,9 @@ export enum ITEM_CHANGE_REASON {
|
||||
GET_HERO_UNLOCK_SKIN = 134, // 获得武将解锁皮肤
|
||||
AP_RECOVERY = 135, // 自然恢复体力
|
||||
LV_UP = 136, // 升级恢复
|
||||
EQUIP_QUALITYUP = 137, // 装备升品
|
||||
EQUIP_STARUP = 138, // 装备升星
|
||||
COMPOSE_STONE = 139, // 合成地玉石
|
||||
}
|
||||
|
||||
export enum TA_EVENT {
|
||||
|
||||
@@ -194,6 +194,7 @@ export const STATUS = {
|
||||
GUILD_PAY_CONDITION: { code: 20932, simStr: '充值金额不足' },
|
||||
GUILD_USER_IS_LEADER: { code: 20933, simStr: '该成员已经是团长' },
|
||||
GUILD_DONATE_LV_NOT_ENOUGH: { code: 20934, simStr: '捐献所等级不足' },
|
||||
GUILD_EQUIP_PRODUCE_LV_NOT_ENOUGH: { code: 20935, simStr: '炼器堂等级不足' },
|
||||
|
||||
GUILD_SCRIPT_IS_OPENED_TODAY: { code: 20950, simStr: '今日已开启过演武场' },
|
||||
GUILD_SCRIPT_NOT_OPENED: { code: 20951, simStr: '演武场未开启' },
|
||||
@@ -208,7 +209,7 @@ export const STATUS = {
|
||||
GUILD_TRAIN_LEVEL_IS_COMPLETE: { code: 20960, simStr: '试炼已经进阶' },
|
||||
GUILD_BUY_TRAIN_COUNT_REACH_MAX: { code: 20961, simStr: '训练场购买挑战次数以达到上线' },
|
||||
GUILD_TRAIN_IS_RESETED: { code: 20962, simStr: '军团训练场已经重置' },
|
||||
GUILD_NOT_REFINE_THE_EQUIP: { code: 20963, simStr: '军团不能研发次装备' },
|
||||
GUILD_CANNOT_REFINE_THIS: { code: 20963, simStr: '军团不能兑换此图纸' },
|
||||
GUILD_LIGHT_UP_THE_SCIENCETREE: { code: 20964, simStr: '军团已经点亮此科技' },
|
||||
GUILD_SCIENCETREE_IS_RUNNING: { code: 20965, simStr: '军团正在进行研发,不能点亮' },
|
||||
GUILD_IS_ASSISTED_SCIENCETREE: { code: 20966, simStr: '玩家已经协助过该科技树' },
|
||||
@@ -221,6 +222,7 @@ export const STATUS = {
|
||||
GUILD_TRAIN_BOX_IS_GOT: { code: 20973, simStr: '玩家已经领取该试炼宝箱' },
|
||||
GUILD_SCRIPT_ENCOURGE_NOT_ENOUGH: { code: 20974, simStr: '鼓舞次数达到上限' },
|
||||
GUILD_CANNOT_INVITE: { code: 20975, simStr: '该玩家已经加入军团或该玩家不同服' },
|
||||
GUILD_REFINE_CNT_MAX: { code: 20976, simStr: '兑换此图纸品质达到上限' },
|
||||
|
||||
GUILD_LOT_NOT_FOUND: { code: 21001, simStr: '拍品未找到' },
|
||||
LOT_OFFER_SERIAL: { code: 21002, simStr: '不能连续出价' },
|
||||
@@ -300,16 +302,36 @@ export const STATUS = {
|
||||
EQUIP_HOLE_NOT_FIND: { code: 30504, simStr: '装备孔不存在' },
|
||||
EQUIP_HOLE_IS_DUG: { code: 30505, simStr: '装备已经打过孔' },
|
||||
EQUIP_HOLE_IS_NOT_DUG: { code: 30506, simStr: '装备未打过孔' },
|
||||
JEWEL_IS_NOT_FIND: { code: 30507, simStr: '宝石不存在' },
|
||||
JEWEL_IS_NOT_FIND: { code: 30507, simStr: '天晶石不存在' },
|
||||
EQUIP_NOT_FILL_HOLE: { code: 30508, simStr: '未穿戴宝石' },
|
||||
EQUIP_NOT_EQUIPED_HERO: { code: 30509, simStr: '装备不能被该武将穿戴' },
|
||||
EQUIP_LEVEL_LIMIT: { code: 30510, simStr: '装备穿戴等级限制' },
|
||||
EQUIP_NOT_MATCH_JEWEL: { code: 30511, simStr: '装备不能镶嵌该宝石' },
|
||||
EQUIP_NOT_MATCH_JEWEL: { code: 30511, simStr: '装备不能镶嵌该天晶石' },
|
||||
EQUIP_QUENCH_ERR: { code: 30512, simStr: '该装备不能再淬火或材料不足' },
|
||||
EQUIP_REFINE_ERR: { code: 30513, simStr: '该装备等级不足或材料不足' },
|
||||
EQUIP_RESTRENGTHEN_NOT_PREVIEW: { code: 30514, simStr: '该装备未预览洗练值' },
|
||||
EQUIP_QUENCH_MAX: { code: 30515, simStr: '该装备不能再淬火' },
|
||||
EQUIP_DECOMPOSE_IS_UPLIMIT: { code: 30516, simStr: '装备分解数量已达上限' },
|
||||
EQUIP_DECOMPOSE_IS_UPLIMIT: { code: 30516, simStr: '分解数量已达上限' },
|
||||
EQUIP_HAS_COMPOSE: { code: 30517, simStr: '该装备已合成' },
|
||||
EQUIP_QUALITY_MAX: { code: 30518, simStr: '该装备已升品到最高' },
|
||||
EQUIP_STAR_MAX: { code: 30519, simStr: '该装备已升星到最高' },
|
||||
EQUIP_QUALITY_NOT_ENOUGH: { code: 30520, simStr: '该装备品质不足' },
|
||||
EQUIP_QUALITYSTAGE_IS_MAX: { code: 30521, simStr: '该装备已到该品质下最高,请升品' },
|
||||
EQUIP_STARSTAGE_IS_MAX: { code: 30522, simStr: '该装备已到该星级下最高,请升星' },
|
||||
JEWEL_HAS_SUIT: { code: 30523, simStr: '该装备已镶嵌该天晶石了' },
|
||||
JEWEL_NOT_SUIT: { code: 30524, simStr: '该装备未镶嵌天晶石' },
|
||||
STONE_HAS_SUIT: { code: 30525, simStr: '该装备该槽已镶嵌相同的地玉石了' },
|
||||
STONE_NOT_SUIT: { code: 30526, simStr: '该装备该槽未镶嵌地玉石' },
|
||||
STONE_CANNOT_SUIT: { code: 30527, simStr: '该装备不可装备该地玉石' },
|
||||
JEWEL_NOT_FOUND: { code: 30528, simStr: '未找到该天晶石' },
|
||||
JEWEL_HAVE_NO_RANDSE: { code: 30529, simStr: '天晶石上无随机属性' },
|
||||
JEWEL_DUPLICATE_LOCK: { code: 30530, simStr: '随机属性不可重复锁定' },
|
||||
JEWEL_NOT_PREVIEW: { code: 30531, simStr: '该天晶石未预览洗练值' },
|
||||
JEWEL_HAS_CHOOSEN_QUENCH: { code: 30532, simStr: '每个天晶石只能选择一个词条淬炼' },
|
||||
JEWEL_NOT_CHOOSEN_QUENCH: { code: 30533, simStr: '请选择一个淬炼词条' },
|
||||
JEWEL_HAVE_NO_CUR_RANDSE: { code: 30534, simStr: '该天晶石上未找到该属性' },
|
||||
JEWEL_IS_EQUIPED: { code: 30535, simStr: '该天晶石被装备中无法分解' },
|
||||
|
||||
//全局养成30600-30699
|
||||
ROLE_REACH_MAX_TITLE_LEVEL: { code: 30600, simStr: '玩家已达到最高的爵位' },
|
||||
ROLE_TERAPH_NOT_STRENGTHEN: { code: 30601, simStr: '材料不足或玩家神像不能强化' },
|
||||
|
||||
@@ -143,9 +143,9 @@ export default class ComBattleTeam extends BaseModel {
|
||||
@prop({ required: true })
|
||||
blueprtId: number;
|
||||
|
||||
// 藏宝图品质
|
||||
// 藏宝图品阶,用来匹配
|
||||
@prop({ required: true })
|
||||
quality: number;
|
||||
lv: number;
|
||||
|
||||
// 战斗状态 0:未开始,1:已开始,2:胜利,3:失败
|
||||
@prop({ required: true, default: 0 })
|
||||
@@ -166,10 +166,6 @@ export default class ComBattleTeam extends BaseModel {
|
||||
@prop({ required: true, default: 1 })
|
||||
roleCnt: number;
|
||||
|
||||
// 藏宝图等级所处范围,用来匹配
|
||||
@prop({ required: true, default: 1 })
|
||||
lvRange: number;
|
||||
|
||||
// 单个 boss 血量状态
|
||||
@prop({ required: false, type: BossHp, default: [] })
|
||||
bossHpArr: BossHp[];
|
||||
@@ -293,9 +289,9 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async getOtherTeamByQualityAndSt(roleId: string, qualityArr: number[], status: number, lvRange: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
||||
public static async getOtherTeamByLvAndSt(roleId: string, lv: number, status: number, ce = 0, pub = true, cntLmt = 2, lean = true) {
|
||||
const curTime = new Date(Date.now() - 10 * 60 * 1000); // 10分钟之前
|
||||
const team: ComBattleTeamType[] = await ComBattleTeamModel.find({quality: {$in: qualityArr}, status, lvRange, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}, roleIds: {$nin: [roleId]}, updatedAt: {$gte: curTime}}).lean(lean);
|
||||
const team: ComBattleTeamType[] = await ComBattleTeamModel.find({ lv, status, ceLimit: {$lte: ce}, pub, roleCnt: {$lte: cntLmt}, roleIds: {$nin: [roleId]}, updatedAt: {$gte: curTime}}).lean(lean);
|
||||
return team;
|
||||
}
|
||||
|
||||
@@ -314,11 +310,8 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return teams;
|
||||
}
|
||||
|
||||
public static async getAssistTeamsByTime(roleId: string, qualityArr?: number[], time?: Date, isAssist?: boolean, lean = true) {
|
||||
public static async getAssistTeamsByTime(roleId: string, time?: Date, isAssist?: boolean, lean = true) {
|
||||
let query = {roleIds: roleId, status: {$in: [0, 1, 2]}}; // 失败不计入助战
|
||||
if (qualityArr) {
|
||||
query = Object.assign(query, {quality: {$in: qualityArr}});
|
||||
}
|
||||
if (time) {
|
||||
query = Object.assign(query, {createdAt: {$gte: time}});
|
||||
}
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, modelOptions } from '@typegoose/typegoose';
|
||||
import { COUNTER } from '../consts';
|
||||
import { CounterModel } from './Counter';
|
||||
import { HeroModel } from './Hero';
|
||||
import { RoleModel } from './Role';
|
||||
import { SearchEquipParam } from '../domain/backEndField/search';
|
||||
|
||||
export class RandSe {
|
||||
@prop({ required: true })
|
||||
id: number; // 随机属性位置id
|
||||
@prop({ required: true })
|
||||
seid: number; // 随机属性池id
|
||||
@prop({ required: true })
|
||||
rand: number; // 随机属性内需要随机的值
|
||||
@prop({ required: true })
|
||||
locked: boolean; // 洗炼是否锁定
|
||||
}
|
||||
|
||||
export class Holes {
|
||||
@prop({ required: true })
|
||||
id: number; // 孔的id
|
||||
@prop({ required: true })
|
||||
isOpen: boolean; // 是否开孔
|
||||
@prop({ required: true })
|
||||
jewel: number; // 装备的宝石id
|
||||
}
|
||||
|
||||
export class RandMain {
|
||||
@prop({ required: true })
|
||||
id: number; // 随机属性位置id
|
||||
@prop({ required: true })
|
||||
rand: number; // 随机属性内需要随机的值,扩大100倍
|
||||
}
|
||||
|
||||
@index({ roleId: 1, hid: 1, id: 1 })
|
||||
@index({ seqId: 1 })
|
||||
@modelOptions({ schemaOptions: { id: false } })
|
||||
export default class Equip extends BaseModel {
|
||||
|
||||
@prop({ required: true })
|
||||
roleId: string; // 角色 id
|
||||
@prop({ required: true })
|
||||
roleName: string; // 角色名称
|
||||
|
||||
@prop({ required: true })
|
||||
seqId: number; // 装备表自增 id
|
||||
@prop({ required: true })
|
||||
id: number; // 装备 id
|
||||
@prop({ required: true })
|
||||
name: string; // 装备名称
|
||||
@prop({ required: false, default: 0 })
|
||||
hid: number; // 装备此装备的武将 id
|
||||
@prop({ required: false, default: 0 })
|
||||
ePlaceId: number; // 武将装备的部位
|
||||
@prop({ required: false, default: 1 })
|
||||
count: number; // 装备数量
|
||||
|
||||
@prop({ required: true, default: 1 })
|
||||
quality: number; // 品质
|
||||
@prop({ required: true, default: 0 })
|
||||
suitId: number; // 套装id
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
randRange: number; // 固定属性随机值 // TODO 废弃字段,客户端改完之前暂时保留
|
||||
@prop({ required: false, type: RandMain, default: [], _id: false })
|
||||
randMain: RandMain[]; // 主属性随机
|
||||
@prop({ required: true, default: 0 })
|
||||
grade: number; // 品相等级
|
||||
@prop({ required: false, type: RandSe, default: [], _id: false })
|
||||
randSe: RandSe[]; // 强化随机属性
|
||||
@prop({ required: true, type: Holes, default: [], _id: false })
|
||||
holes: Holes[];
|
||||
@prop({ required: false, type: RandSe, default: [], _id: false })
|
||||
previewRandSe: RandSe[]; // 强化随机属性预览
|
||||
|
||||
|
||||
public static async findbyRole(roleId: string, lean = true) {
|
||||
const equips: EquipType[] = await EquipModel.find({ roleId }).lean(lean);
|
||||
return equips;
|
||||
}
|
||||
|
||||
public static async findbySeqId(seqId: number, select?: string ) {
|
||||
const equip: EquipType = await EquipModel.findOne({ seqId }).select(select).lean();
|
||||
return equip;
|
||||
}
|
||||
|
||||
public static async createEquip(equipInfo: equipUpdate, lean = true) {
|
||||
const seqId = await CounterModel.getNewCounter(COUNTER.EID);
|
||||
|
||||
const doc = new EquipModel();
|
||||
const update = Object.assign(doc.toJSON(), seqId, equipInfo);
|
||||
const equip: EquipType = await EquipModel.findOneAndUpdate({ seqId }, update, { upsert: true, new: true }).lean(lean);
|
||||
if (equipInfo.hid > 0) {
|
||||
await HeroModel.findOneAndUpdate(
|
||||
{ roleId: equipInfo.roleId, hid: equipInfo.hid, 'ePlace.id': equipInfo.ePlaceId },
|
||||
{ $set: { 'ePlace.$.equip': equip._id } },
|
||||
{ new: true }).lean(lean);
|
||||
}
|
||||
return equip;
|
||||
}
|
||||
|
||||
public static async createEquips(roleId: string, equipInfos: equipUpdate[]) {
|
||||
let result: EquipType[] = [];
|
||||
for(let equipInfo of equipInfos) {
|
||||
let equip = await this.createEquip(equipInfo);
|
||||
result.push(equip);
|
||||
}
|
||||
await RoleModel.increaseEquip(roleId, result.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async putOnOrOff(equipId: string, hid: number, lean = true) {
|
||||
const equip: EquipType = await EquipModel.findOneAndUpdate({ _id: equipId }, { hid }, { new: true }).lean(lean);
|
||||
return equip;
|
||||
}
|
||||
|
||||
|
||||
public static async findNotWearEquips(roleId: string) {
|
||||
const equips: EquipType[] = await EquipModel.find({ roleId, hid: 0 }).lean();
|
||||
return equips;
|
||||
}
|
||||
|
||||
public static async deleteAccount(roleId: string) {
|
||||
let result = await EquipModel.deleteMany({ roleId });
|
||||
return result;
|
||||
}
|
||||
public static async deleteEquips(roleId: string, ids: Array<number>) {
|
||||
let equips = await EquipModel.getEquips(roleId, ids);
|
||||
await EquipModel.deleteMany({ roleId, seqId: { $in: ids } });
|
||||
await RoleModel.findOneAndUpdate({ roleId }, { $inc: { equipCount: -1 * ids.length } }, { new: true });
|
||||
return equips;
|
||||
}
|
||||
|
||||
public static async getEquipsByID(ids: Array<string>) {
|
||||
let result = await EquipModel.find({ _id: { $in: ids } });
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getEquips(roleId: string, ids: Array<number>) {
|
||||
let result: EquipType[] = await EquipModel.find({ roleId, seqId: { $in: ids } });
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getEquip(seqId: number) {
|
||||
let equip: EquipType = await EquipModel.findOne({ seqId });
|
||||
return equip;
|
||||
}
|
||||
|
||||
public static async updateEquipInfo(seqId: number, equipUpdate: equipUpdate, lean = true) {
|
||||
delete equipUpdate._id;
|
||||
let result: EquipType = await EquipModel.findOneAndUpdate({ seqId }, { $set: equipUpdate }, { new: true }).lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async lock(roleId: string, seqId: number, id: number, lock: boolean) {
|
||||
let result: EquipType = await EquipModel.findOneAndUpdate({ roleId, seqId, 'randSe.id': id }, { $set: { 'randSe.$.locked': lock } }, { new: true, upsert: false }).select('seqId id randSe').lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async updateEquipInfobyObjectId(_id: string, equipUpdate: equipUpdate, lean = true) {
|
||||
delete equipUpdate._id;
|
||||
let result: EquipType = await EquipModel.findOneAndUpdate({ _id }, { $set: equipUpdate }, { new: true }).lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getEquipByObjectId(_id: string) {
|
||||
let equip: EquipType = await EquipModel.findOne({ _id });
|
||||
return equip;
|
||||
}
|
||||
|
||||
|
||||
public static async findByField(field: string, value?: number | string, select?: string) {
|
||||
let searchObj = {};
|
||||
if (field != 'all') {
|
||||
if (field == 'roleName') {
|
||||
searchObj['roleName'] = { $regex: new RegExp(value.toString(), 'i') }
|
||||
} else {
|
||||
searchObj[field] = value;
|
||||
}
|
||||
}
|
||||
//.select('uid tel username')
|
||||
const user: EquipType[] = await EquipModel.find(searchObj).select(select).lean();
|
||||
return user;
|
||||
}
|
||||
|
||||
public static async findListByHidAndRole(roleId: string, hid: number, select?: string) {
|
||||
let result: EquipType[] = await EquipModel.find({ roleId, hid }).select(select).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getEquipsByIds(roleId: string, ids: Array<number>) {
|
||||
let result = await EquipModel.find({ roleId, id: { $in: ids } });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static getSearchObj(form: SearchEquipParam) {
|
||||
let searchObj = {};
|
||||
if(form.roleId) searchObj['roleId'] = form.roleId;
|
||||
if(form.roleName) searchObj['roleName'] = { $regex: new RegExp(form.roleName.toString(), 'i') };
|
||||
if(form.id) searchObj['id'] = form.id;
|
||||
return searchObj
|
||||
}
|
||||
|
||||
public static async findByCondition(page: number, pageSize: number, sortField: string = 'updatedAt', sortOrder: string = 'descend', form: SearchEquipParam = {}) {
|
||||
|
||||
let searchObj = this.getSearchObj(form);
|
||||
let sort = {};
|
||||
if(sortField && sortOrder) {
|
||||
if(sortOrder == 'ascend') {
|
||||
sort[sortField] = 1;
|
||||
} else if (sortOrder == 'descend') {
|
||||
sort[sortField] = -1;
|
||||
}
|
||||
}
|
||||
const result: EquipType[] = await EquipModel.find(searchObj).limit(pageSize).skip((page - 1) * pageSize).sort(sort).lean({ getters: true, virtuals: true });
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static async countByCondition(form: SearchEquipParam = {}) {
|
||||
|
||||
let searchObj = this.getSearchObj(form);
|
||||
const result = await EquipModel.count(searchObj);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const EquipModel = getModelForClass(Equip);
|
||||
|
||||
export interface EquipType extends Pick<DocumentType<Equip>, keyof Equip> {
|
||||
id: number;
|
||||
};
|
||||
export type equipUpdate = Partial<EquipType>; // 将所有字段变成可选项
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { reduceCe } from '../pubUtils/util';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
import { SearchGuildParam } from '../domain/backEndField/search';
|
||||
|
||||
class Structure {
|
||||
export class Structure {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
@prop({ required: true })
|
||||
|
||||
@@ -3,7 +3,7 @@ import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoos
|
||||
|
||||
export class ScienceTree {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
id: number;
|
||||
@prop({ required: true })
|
||||
endTime: number;//科技树研发成功结束事件,时间戳,小于当前时间,说明开发完成
|
||||
@prop({ required: true, default: [], type: String, _id: false})
|
||||
|
||||
+41
-25
@@ -1,8 +1,8 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, Ref, mongoose, DocumentType } from '@typegoose/typegoose';
|
||||
import Equip, { } from './Equip';
|
||||
// import Equip, { } from './Equip';
|
||||
import { CounterModel } from './Counter';
|
||||
import { COUNTER, EQUIP_TYPE, HERO_CE_RATIO } from '../consts';
|
||||
import { COUNTER, HERO_CE_RATIO } from '../consts';
|
||||
import { reduceCe } from '../pubUtils/util';
|
||||
import Skin from './Skin';
|
||||
import { SearchHeroParam } from '../domain/backEndField/search';
|
||||
@@ -71,30 +71,46 @@ export class HeroSkin {
|
||||
enable: boolean;
|
||||
}
|
||||
|
||||
export class Stone {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
@prop({ required: true })
|
||||
stone: number;
|
||||
}
|
||||
|
||||
export class EPlace {
|
||||
@prop({ required: true })
|
||||
id: number;
|
||||
@prop({ ref: Equip, type: mongoose.Schema.Types.ObjectId })
|
||||
equip: Ref<Equip>;
|
||||
@prop({ required: true })
|
||||
lv: number;
|
||||
equipId: number;
|
||||
@prop({ required: true })
|
||||
refineLv: number;
|
||||
}
|
||||
lv: number = 1;
|
||||
@prop({ required: true })
|
||||
quality: number = 1;
|
||||
@prop({ required: true })
|
||||
qualityStage: number = 0;
|
||||
@prop({ required: true })
|
||||
star: number = 0;
|
||||
@prop({ required: true })
|
||||
starStage: number = 0;
|
||||
@prop({ required: true, type: Stone, _id: false })
|
||||
stones: Stone[];
|
||||
@prop({ required: true })
|
||||
jewel: number = 0;
|
||||
|
||||
// 初始化
|
||||
function getInitialEplace() {
|
||||
let ePlace = new Array<EPlace>();
|
||||
for (let i = EQUIP_TYPE.START; i <= EQUIP_TYPE.END; i++) {
|
||||
let p = new EPlace();
|
||||
p.id = i;
|
||||
p.equip = null;
|
||||
p.lv = 0;
|
||||
p.refineLv = 1;
|
||||
|
||||
ePlace.push(p);
|
||||
getInitialStone? () {
|
||||
let result: Stone[] = [];
|
||||
for(let id = 1; id <= 3; id++) {
|
||||
result.push({ id, stone: 0 });
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return ePlace;
|
||||
|
||||
constructor(id: number, equipId: number) {
|
||||
this.id = id;
|
||||
this.equipId = equipId;
|
||||
this.stones = this.getInitialStone();
|
||||
}
|
||||
}
|
||||
|
||||
@index({ roleId: 1, hid: 1 })
|
||||
@@ -167,7 +183,7 @@ export default class Hero extends BaseModel {
|
||||
@prop({ required: true, type: HeroSkin, default: [], _id: false })
|
||||
skins: HeroSkin[]; // 皮肤
|
||||
|
||||
@prop({ required: true, type: EPlace, default: getInitialEplace(), _id: false })
|
||||
@prop({ required: true, type: EPlace, default: [], _id: false })
|
||||
ePlace: EPlace[]; // 武将装备引用数组
|
||||
|
||||
public static async findByRole(roleId: string, sort: { field: string, sortBy: number }[] = [], select?: string, getters = false) {
|
||||
@@ -189,6 +205,11 @@ export default class Hero extends BaseModel {
|
||||
return hero;
|
||||
}
|
||||
|
||||
public static async checkEquipByQuality(roleId: string, quality: number) {
|
||||
const result = await HeroModel.exists({ roleId, 'ePlace.quality': { $gte: quality } });
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async findMapByHidRange(hids: Array<number>, roleId: string, select?: string, getters = false) {
|
||||
const hero = await HeroModel.findByHidRange(hids, roleId, select, getters);
|
||||
let map = new Map<number, HeroType>();
|
||||
@@ -207,11 +228,6 @@ export default class Hero extends BaseModel {
|
||||
return hero;
|
||||
}
|
||||
|
||||
public static async findByHidAndRoleWithEquip(hid: number, roleId: string, lean = true) {
|
||||
const hero: HeroType = await HeroModel.findOne({ hid, roleId }).populate('ePlace.equip').lean(lean);
|
||||
return hero;
|
||||
}
|
||||
|
||||
public static async addEquip(roleId: string, hid: number, ePlaceId: number, equipId: string) {
|
||||
const hero: HeroType = await HeroModel.findOneAndUpdate(
|
||||
{ roleId, hid, 'ePlace.id': ePlaceId },
|
||||
|
||||
@@ -45,6 +45,11 @@ export default class Item extends BaseModel {
|
||||
return items;
|
||||
}
|
||||
|
||||
public static async findbyRoleAndGid(roleId: string, id: number, lean = true) {
|
||||
const items: ItemType = await ItemModel.findOne({ roleId, id }).select('id count type').lean(lean);
|
||||
return items;
|
||||
}
|
||||
|
||||
public static async increaseItem(roleId: string, id: number, count: number, itemInfo: { roleId: string, roleName: string, id: number, itemName: string, type: number, hid?: number }) {
|
||||
const doc = new ItemModel();
|
||||
const setOnInsert = Object.assign(doc.toJSON(), itemInfo);
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, modelOptions } from '@typegoose/typegoose';
|
||||
// import { COUNTER } from '../consts';
|
||||
// import { CounterModel } from './Counter';
|
||||
import { SearchJewelParam } from '../domain/backEndField/search';
|
||||
import { RoleModel } from './Role';
|
||||
import { CounterModel } from './Counter';
|
||||
import { COUNTER } from '../consts';
|
||||
import { HeroModel } from './Hero';
|
||||
|
||||
export class RandSe {
|
||||
@prop({ required: true })
|
||||
id: number; // 随机属性位置id
|
||||
@prop({ required: true })
|
||||
seid: number; // 随机属性池id
|
||||
@prop({ required: true })
|
||||
rand: number; // 随机属性内需要随机的值
|
||||
@prop({ required: true })
|
||||
locked: boolean = false; // 洗炼是否锁定
|
||||
|
||||
@prop({ required: false, default: false })
|
||||
quenched: boolean = false; // 是否淬炼了
|
||||
@prop({ required: false, default: 0 })
|
||||
quenchCnt: number = 0; // 淬炼次数
|
||||
|
||||
constructor(id: number, seid: number, rand: number) {
|
||||
this.id = id;
|
||||
this.seid = seid;
|
||||
this.rand = rand;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@index({ roleId: 1, hid: 1, id: 1 })
|
||||
@index({ seqId: 1 })
|
||||
@modelOptions({ schemaOptions: { id: false } })
|
||||
export default class Jewel extends BaseModel {
|
||||
|
||||
@prop({ required: true })
|
||||
roleId: string; // 角色 id
|
||||
@prop({ required: true })
|
||||
roleName: string; // 角色名称
|
||||
|
||||
@prop({ required: true })
|
||||
seqId: number; // 装备表自增 id
|
||||
@prop({ required: true })
|
||||
id: number; // 装备 id
|
||||
@prop({ required: true })
|
||||
name: string; // 装备名称
|
||||
@prop({ required: false, default: 0 })
|
||||
hid: number; // 装备此装备的武将 id
|
||||
@prop({ required: false, default: 0 })
|
||||
ePlaceId: number; // 武将装备的部位
|
||||
|
||||
@prop({ required: false, type: RandSe, default: [], _id: false })
|
||||
randSe: RandSe[]; // 强化随机属性
|
||||
@prop({ required: false, type: RandSe, default: [], _id: false })
|
||||
previewRandSe: RandSe[]; // 强化随机属性预览
|
||||
|
||||
public static async findbyRole(roleId: string, lean = true) {
|
||||
const jewels: JewelType[] = await JewelModel.find({ roleId }).lean(lean);
|
||||
return jewels;
|
||||
}
|
||||
|
||||
public static async findbyRoleAndHids(roleId: string, hids: number[]) {
|
||||
const jewels: JewelType[] = await JewelModel.find({ roleId, hid: { $in: hids } }).lean();
|
||||
return jewels;
|
||||
}
|
||||
|
||||
public static async findMapbyRoleAndHids(roleId: string, hids: number[]) {
|
||||
const jewels = await JewelModel.findbyRoleAndHids(roleId, hids);
|
||||
let map = new Map<number, JewelType>();
|
||||
for(let jewel of jewels) {
|
||||
map.set(jewel.seqId, jewel);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public static async findbySeqId(seqId: number, select?: string ) {
|
||||
const jewel: JewelType = await JewelModel.findOne({ seqId }).select(select).lean();
|
||||
return jewel;
|
||||
}
|
||||
|
||||
public static async findbySeqIds(seqIds: number[], select?: string ) {
|
||||
const jewel: JewelType[] = await JewelModel.find({ seqId: { $in: seqIds } }).select(select).lean();
|
||||
return jewel;
|
||||
}
|
||||
|
||||
public static async createJewel(jewelInfo: jewelUpdate) {
|
||||
const seqId = await CounterModel.getNewCounter(COUNTER.JEWEL_ID);
|
||||
|
||||
const doc = new JewelModel();
|
||||
const update = Object.assign(doc.toJSON(), seqId, jewelInfo);
|
||||
const jewel: JewelType = await JewelModel.findOneAndUpdate({ seqId }, update, { upsert: true, new: true }).lean();
|
||||
if (jewelInfo.hid > 0) {
|
||||
await HeroModel.findOneAndUpdate(
|
||||
{ roleId: jewelInfo.roleId, hid: jewelInfo.hid, 'ePlace.id': jewelInfo.ePlaceId },
|
||||
{ $set: { 'ePlace.$.jewel': seqId } },
|
||||
{ new: true }).lean();
|
||||
}
|
||||
return jewel;
|
||||
}
|
||||
|
||||
public static async createJewels(roleId: string, jewelInfos: jewelUpdate[]) {
|
||||
let result: JewelType[] = [];
|
||||
for(let jewelInfo of jewelInfos) {
|
||||
let jewel = await this.createJewel(jewelInfo);
|
||||
result.push(jewel);
|
||||
}
|
||||
await RoleModel.increaseJewel(roleId, result.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async putOnOrOff(seqId: number, hid: number, ePlaceId: number) {
|
||||
let rec: JewelType = await JewelModel.findOneAndUpdate({ seqId }, { $set: { hid, ePlaceId } }, { new: true }).lean();
|
||||
return rec;
|
||||
}
|
||||
|
||||
public static async lock(seqId: number, id: number, lock: boolean) {
|
||||
let result: JewelType = await JewelModel.findOneAndUpdate({ seqId, 'randSe.id': id }, { $set: { 'randSe.$.locked': lock } }, { new: true }).select('seqId id randSe').lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async chooseQuench(seqId: number, id: number) {
|
||||
let result: JewelType = await JewelModel.findOneAndUpdate({ seqId, 'randSe.id': id }, { $set: { 'randSe.$.quenched': true } }, { new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async quench(seqId: number, isSuccess: boolean, rand: number) {
|
||||
if(isSuccess) {
|
||||
let result: JewelType = await JewelModel.findOneAndUpdate({ seqId, 'randSe.quenched': true }, { $set: { 'randSe.$.rand': rand } }, { new: true }).lean();
|
||||
return result;
|
||||
} else {
|
||||
let result: JewelType = await JewelModel.findOneAndUpdate({ seqId, 'randSe.quenched': true }, { $inc: { 'randSe.$.quenchCnt': 1 } }, { new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static async updateInfo(seqId: number, update: jewelUpdate) {
|
||||
let result: JewelType = await JewelModel.findOneAndUpdate({ seqId }, { $set: update }, {new: true}).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async deleteBySeqIds(roleId: string, seqIds: number[]) {
|
||||
let jewels = await JewelModel.findbySeqIds(seqIds);
|
||||
await JewelModel.deleteMany({ roleId, seqId: { $in: seqIds } });
|
||||
await RoleModel.increaseJewel(roleId, -1 * seqIds.length);
|
||||
return jewels;
|
||||
}
|
||||
|
||||
public static async deleteAccount(roleId: string) {
|
||||
let result = await JewelModel.deleteMany({ roleId });
|
||||
return result;
|
||||
}
|
||||
|
||||
private static getSearchObj(form: SearchJewelParam) {
|
||||
let searchObj = {};
|
||||
if(form.roleId) searchObj['roleId'] = form.roleId;
|
||||
if(form.roleName) searchObj['roleName'] = { $regex: new RegExp(form.roleName.toString(), 'i') };
|
||||
if(form.id) searchObj['id'] = form.id;
|
||||
return searchObj
|
||||
}
|
||||
|
||||
public static async findByCondition(page: number, pageSize: number, sortField: string = 'updatedAt', sortOrder: string = 'descend', form: SearchJewelParam = {}) {
|
||||
|
||||
let searchObj = this.getSearchObj(form);
|
||||
let sort = {};
|
||||
if(sortField && sortOrder) {
|
||||
if(sortOrder == 'ascend') {
|
||||
sort[sortField] = 1;
|
||||
} else if (sortOrder == 'descend') {
|
||||
sort[sortField] = -1;
|
||||
}
|
||||
}
|
||||
const result: JewelType[] = await JewelModel.find(searchObj).limit(pageSize).skip((page - 1) * pageSize).sort(sort).lean({ getters: true, virtuals: true });
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public static async countByCondition(form: SearchJewelParam = {}) {
|
||||
|
||||
let searchObj = this.getSearchObj(form);
|
||||
const result = await JewelModel.count(searchObj);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const JewelModel = getModelForClass(Jewel);
|
||||
|
||||
export interface JewelType extends Pick<DocumentType<Jewel>, keyof Jewel> {
|
||||
id: number;
|
||||
};
|
||||
export type jewelUpdate = Partial<JewelType>; // 将所有字段变成可选项
|
||||
+3
-4
@@ -215,7 +215,7 @@ export default class Role extends BaseModel {
|
||||
@prop({ required: true, default: [] })
|
||||
payRecord: PayRecord[]; // 支付记录
|
||||
@prop({ required: true, default: 0 })
|
||||
equipCount: number; // 装备数量
|
||||
jewelCount: number; // 装备数量
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
coin: number; // 总铜钱
|
||||
@@ -710,12 +710,11 @@ export default class Role extends BaseModel {
|
||||
}
|
||||
|
||||
// 装备上限
|
||||
public static async increaseEquip(roleId: string, count: number) {
|
||||
const role: RoleType = await RoleModel.findOneAndUpdate({ roleId }, { $inc: { equipCount: count } }, { new: true }).lean();
|
||||
public static async increaseJewel(roleId: string, count: number) {
|
||||
const role: RoleType = await RoleModel.findOneAndUpdate({ roleId }, { $inc: { jewelCount: count } }, { new: true }).lean();
|
||||
return role;
|
||||
}
|
||||
|
||||
|
||||
// 支付记录
|
||||
public static async increaseTotalPay(roleId: string, price: number) {
|
||||
const role: RoleType = await RoleModel.findOneAndUpdate({ roleId }, { $inc: { totalPay: price } }, { new: true }).lean();
|
||||
|
||||
+16
-2
@@ -28,6 +28,12 @@ class WishGood {
|
||||
donateNames: string[];
|
||||
}
|
||||
|
||||
class RefineRecord {
|
||||
@prop({ required: true })
|
||||
quality: number;
|
||||
@prop({ required: true })
|
||||
count: number;
|
||||
}
|
||||
|
||||
@index({ roleId: 1 })
|
||||
export default class UserGuild extends BaseModel {
|
||||
@@ -64,7 +70,7 @@ export default class UserGuild extends BaseModel {
|
||||
@prop({ required: true, type: Number, default: [] })
|
||||
receivedActive: number[];
|
||||
|
||||
@prop({ required: true, default: new Date(), select: false })
|
||||
@prop({ required: true, select: false })
|
||||
refTimeDaily: Date;
|
||||
//练兵场
|
||||
@prop({ required: true, default: 0 })
|
||||
@@ -94,7 +100,8 @@ export default class UserGuild extends BaseModel {
|
||||
@prop({ required: true, default: 0 })
|
||||
wishDntCnt: number;//今天许愿池捐献次数
|
||||
|
||||
@prop({ required: true, default: new Date() })
|
||||
// 演武台
|
||||
@prop({ required: true })
|
||||
refBossTime: Date;
|
||||
|
||||
@prop({ required: true, default: 0 })
|
||||
@@ -103,6 +110,13 @@ export default class UserGuild extends BaseModel {
|
||||
@prop({ required: true, default: 0 })
|
||||
bossChallengeCnt: number;//今天挑战演舞台次数
|
||||
|
||||
// 炼器堂
|
||||
@prop({ required: true, type: RefineRecord })
|
||||
refineCnt: RefineRecord[];
|
||||
|
||||
@prop({ required: true })
|
||||
refRefineTime: Date;
|
||||
|
||||
public static async getMyGuild(roleId: string, select?: string) {
|
||||
|
||||
const myGuild: UserGuildType = await UserGuildModel.findOne({ roleId, status: USER_GUILD_STATUS.ON })
|
||||
|
||||
@@ -24,6 +24,12 @@ export interface SearchEquipParam {
|
||||
id?: number;
|
||||
}
|
||||
|
||||
export interface SearchJewelParam {
|
||||
roleId?: string;
|
||||
roleName?: string;
|
||||
id?: number;
|
||||
}
|
||||
|
||||
export interface SearchItemParam {
|
||||
roleId?: string;
|
||||
roleName?: string;
|
||||
|
||||
@@ -1,2 +1,29 @@
|
||||
import { ComBattleTeamParam } from './../../db/ComBattleTeam';
|
||||
export type MemComBtlTeam = ComBattleTeamParam & { bossCurHp: number; curRnd: number; bossHp: number };
|
||||
import { COM_TEAM_STATUS } from '../../consts';
|
||||
import { getBossHpByBlueprtId, getDicBlueprtById } from '../../pubUtils/data';
|
||||
import { transBossHpArr } from '../../services/battleService';
|
||||
import ComBattleTeam from './../../db/ComBattleTeam';
|
||||
export class MemComBtlTeam extends ComBattleTeam {
|
||||
bossCurHp: number;
|
||||
curRnd: number;
|
||||
bossHp: number;
|
||||
|
||||
constructor(teamCode: string, pub: boolean, blueprtId: number, capId: string, ceLimit: number) {
|
||||
super();
|
||||
const { lv } = getDicBlueprtById(blueprtId);
|
||||
this.lv = lv;
|
||||
const { bossHpSum, bossHpArr } = getBossHpByBlueprtId(blueprtId);
|
||||
this.bossHpArr = transBossHpArr(bossHpArr);
|
||||
this.teamCode = teamCode;
|
||||
this.pub = pub;
|
||||
this.blueprtId = blueprtId;
|
||||
this.status = COM_TEAM_STATUS.DEFAULT;
|
||||
this.capId = capId;
|
||||
this.ceLimit = ceLimit;
|
||||
this.curRnd = 0;
|
||||
this.roleCnt = 1;
|
||||
this.timeout = false;
|
||||
this.bossCurHp = bossHpSum;
|
||||
this.bossHp = bossHpSum;
|
||||
this.blacklist = [];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,6 +2,9 @@ import { RoleType } from "../../db/Role";
|
||||
import { FriendShipType } from "../../db/FriendShip";
|
||||
import * as friendUtil from '../../pubUtils/friendUtil'
|
||||
import { FRIEND_RELATION_TYPE } from "../../consts";
|
||||
import { EPlace, HeroType, Stone } from "../../db/Hero";
|
||||
import { JewelType, RandSe } from "../../db/Jewel";
|
||||
import { reduceCe } from "../../pubUtils/util";
|
||||
|
||||
export class FriendParams {
|
||||
roleId: string;
|
||||
@@ -118,4 +121,102 @@ export class BlackListParam extends FriendParams {
|
||||
setOnline(isOnline: boolean) {
|
||||
this.isOnline = isOnline;
|
||||
}
|
||||
}
|
||||
|
||||
export class HeroDetailJewelRandSeParam {
|
||||
id: number;
|
||||
seid: number;
|
||||
rand: number;
|
||||
|
||||
constructor(randSe: RandSe) {
|
||||
this.id = randSe.id;
|
||||
this.seid = randSe.seid;
|
||||
this.rand = randSe.rand;
|
||||
}
|
||||
}
|
||||
|
||||
export class HeroDetailJewelParam {
|
||||
seqId: number;
|
||||
id: number;
|
||||
randSe: HeroDetailJewelRandSeParam[] = [];
|
||||
|
||||
constructor(jewel: JewelType) {
|
||||
this.seqId = jewel.seqId;
|
||||
this.id = jewel.id;
|
||||
for(let randSe of jewel.randSe) {
|
||||
this.randSe.push(new HeroDetailJewelRandSeParam(randSe));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class HeroDetailEplaceParam {
|
||||
id: number;
|
||||
equipId: number;
|
||||
lv: number;
|
||||
quality: number;
|
||||
star: number;
|
||||
stone: Stone[];
|
||||
jewelId: number;
|
||||
jewel: HeroDetailJewelParam = null;
|
||||
|
||||
constructor(equip: EPlace) {
|
||||
this.id = equip.id;
|
||||
this.equipId = equip.equipId;
|
||||
this.lv = equip.lv;
|
||||
this.quality = equip.quality;
|
||||
this.star = equip.star;
|
||||
this.stone = equip.stones;
|
||||
this.jewelId = equip.jewel;
|
||||
}
|
||||
|
||||
setJewel(jewel: JewelType) {
|
||||
this.jewel = new HeroDetailJewelParam(jewel);
|
||||
}
|
||||
}
|
||||
|
||||
export class HeroDetailParam {
|
||||
roleId: string;
|
||||
hid: number;
|
||||
ce: number;
|
||||
lv: number;
|
||||
star: number;
|
||||
colorStar: number;
|
||||
quality: number;
|
||||
job: number;
|
||||
skinId: number;
|
||||
ePlace: HeroDetailEplaceParam[] = [];
|
||||
attributes: {
|
||||
hp: number;
|
||||
atk: number;
|
||||
def: number;
|
||||
mdef: number;
|
||||
}
|
||||
|
||||
constructor(hero: HeroType) {
|
||||
this.roleId = hero.roleId;
|
||||
this.hid = hero.hid;
|
||||
this.ce = reduceCe(hero.ce);
|
||||
this.lv = hero.lv;
|
||||
this.star = hero.star;
|
||||
this.colorStar = hero.colorStar;
|
||||
this.quality = hero.quality;
|
||||
this.job = hero.job;
|
||||
this.skinId = hero.skinId;
|
||||
for(let equip of hero.ePlace) {
|
||||
this.ePlace.push(new HeroDetailEplaceParam(equip));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
setAttributes(attributes: {hp: number, atk: number, def: number, mdef: number}) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
setJewels(jewels: Map<number, JewelType>) {
|
||||
for(let eplaceParam of this.ePlace) {
|
||||
if(jewels.has(eplaceParam.jewelId)) {
|
||||
eplaceParam.setJewel(jewels.get(eplaceParam.jewelId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+120
-115
@@ -1,12 +1,9 @@
|
||||
import { dicHero, dicMyHeroes, loadHero } from "./dictionary/DicHero";
|
||||
import { dicGoods, blueprtWithQuality, blueprtWithQualityAndStar, dicJewel, figureCondition, loadGoods } from "./dictionary/DicGoods";
|
||||
import { dicBlueprtCompose, loadBlueprtCompose } from "./dictionary/DicBlueprtCompose";
|
||||
import { dicBlueprtPossibility, loadBlueprtPossibility } from "./dictionary/DicBlueprtPossibility";
|
||||
import { dicHero, loadHero } from "./dictionary/DicHero";
|
||||
import { dicGoods, figureCondition, loadGoods } from "./dictionary/DicGoods";
|
||||
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, SPECIAL_ATTR } 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';
|
||||
@@ -100,16 +91,22 @@ import { dicApiById, dicApiByUrl, loadApi } from './dictionary/DicApi';
|
||||
import { dicServerConst, loadServerConst } from './dictionary/DicServerConst';
|
||||
import { pick } from "underscore";
|
||||
import _ = require("underscore");
|
||||
import { dicEquipById, dicEquipIdByJobClassAndEplace, loadEquip } from "./dictionary/DicEquip";
|
||||
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";
|
||||
import { dicEquipStar, dicEquipStarIdByEquipId, loadEquipStar } from './dictionary/DicEquipStar';
|
||||
import { dicEquipQualityExtra, loadEquipQualityExtra } from './dictionary/DicEquipQualityExtra';
|
||||
import { dicEquipSuit, dicEquipSuitByJobClass, loadEquipSuit } from "./dictionary/DicEquipSuit";
|
||||
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,
|
||||
@@ -132,9 +129,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,
|
||||
@@ -142,12 +136,6 @@ export const gameData = {
|
||||
maxFriendShipLv: maxFriendShipLv,
|
||||
friendShipLevelMap: dicFriendShipLevelMap,
|
||||
randomEffectPool: dicRandomEffectPool,
|
||||
strengthenCost: dicStrengthenCost,
|
||||
refine: dicRefine,
|
||||
jewels: dicJewel,
|
||||
dicHeroEquip: dicHeroEquip,
|
||||
suit: dicSuit,
|
||||
suitByTypeAndLv: dicSuitByTypeAndLv,
|
||||
title: dicTitle,
|
||||
teraphs: dicTeraph,
|
||||
school: dicSchool,
|
||||
@@ -204,7 +192,6 @@ export const gameData = {
|
||||
shop: dicShop,
|
||||
shopItem: dicShopItem,
|
||||
shopList: dicShopList,
|
||||
dicMyHeroes: dicMyHeroes,
|
||||
rank: dicRank,
|
||||
generalRankReward: dicRankReward,
|
||||
taskType: dicTaskType,
|
||||
@@ -234,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,
|
||||
@@ -249,6 +232,21 @@ export const gameData = {
|
||||
apiById: dicApiById,
|
||||
apiByUrl: dicApiByUrl,
|
||||
serverConst: dicServerConst,
|
||||
equipById: dicEquipById,
|
||||
equipIdByJobAndEPlace: dicEquipIdByJobClassAndEplace,
|
||||
jewel: dicJewel,
|
||||
stone: dicStone,
|
||||
equipStrengthenCost: dicEquipStrength,
|
||||
equipQuality: dicEquipQuality,
|
||||
equipQualityIdByEquipIdAndPoint: dicEquipQualityIdByEquipIdAndPoint,
|
||||
equipStar: dicEquipStar,
|
||||
equipStarIdByEquipId: dicEquipStarIdByEquipId,
|
||||
equipQualityExtra: dicEquipQualityExtra,
|
||||
equipSuit: dicEquipSuit,
|
||||
equipSuitByJobClass: dicEquipSuitByJobClass,
|
||||
jewelCondition: dicJewelCondition,
|
||||
blueprt: dicBlueprt,
|
||||
blueprtByLv: dicBlueprtByLv,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -341,21 +339,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);
|
||||
@@ -363,8 +346,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) {
|
||||
@@ -380,7 +363,7 @@ function parseComBtlLvRange() {
|
||||
}
|
||||
|
||||
export function comBtlRanges() {
|
||||
return Array.from(gameData.comBtlLvRange.keys());
|
||||
return Array.from(gameData.blueprtByLv.keys());
|
||||
}
|
||||
|
||||
|
||||
@@ -409,14 +392,6 @@ export function getGoodById(gid: number) {
|
||||
return gameData.goods.get(gid);
|
||||
}
|
||||
|
||||
export function getJewelById(gid: number) {
|
||||
return gameData.jewels.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;
|
||||
@@ -442,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) {
|
||||
@@ -749,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}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -834,6 +759,86 @@ function splitTime(str: string) {
|
||||
return { hour: parseInt(arr[0]), minute: parseInt(arr[1]), seconds: parseInt(arr[2]) }
|
||||
}
|
||||
|
||||
export function getEquipByJobClassAndEPlace(jobClass: number, ePlaceId: number) {
|
||||
let equipId = gameData.equipIdByJobAndEPlace.get(`${jobClass}_${ePlaceId}`);
|
||||
return gameData.equipById.get(equipId);
|
||||
}
|
||||
|
||||
export function getEquipQualityIdByEquipIdAndPoint(equipId: number, quality: number, point: number) {
|
||||
let equipQualityId = gameData.equipQualityIdByEquipIdAndPoint.get(`${equipId}_${quality}_${point}`);
|
||||
return equipQualityId?gameData.equipQuality.get(equipQualityId): null;
|
||||
}
|
||||
|
||||
export function getNextEquipQuality(equipId: number, quality: number, point: number) {
|
||||
let equipQuality = getEquipQualityIdByEquipIdAndPoint(equipId, quality, point);
|
||||
if(equipQuality) {
|
||||
let nextId = equipQuality.id + 1;
|
||||
let nextEquipQuality = gameData.equipQuality.get(nextId);
|
||||
if(nextEquipQuality && nextEquipQuality.equipId == equipQuality.equipId) {
|
||||
return nextEquipQuality
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export function getEquipStarIdByEquipId(equipId: number, star: number) {
|
||||
let equipStarId = gameData.equipStarIdByEquipId.get(`${equipId}_${star}`);
|
||||
return equipStarId?gameData.equipStar.get(equipStarId): null;
|
||||
}
|
||||
|
||||
export function getNextEquipStar(equipId: number, star: number) {
|
||||
let equipStar = getEquipStarIdByEquipId(equipId, star);
|
||||
if(equipStar) {
|
||||
let nextId = equipStar.id + 1;
|
||||
let nextEquipStar = gameData.equipStar.get(nextId);
|
||||
if(nextEquipStar && nextEquipStar.equipId == equipStar.equipId) {
|
||||
return nextEquipStar;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getPreEquipStar(equipId: number, star: number) {
|
||||
let equipStar = getEquipStarIdByEquipId(equipId, star);
|
||||
if(equipStar) {
|
||||
let nextId = equipStar.id - 1;
|
||||
let nextEquipStar = gameData.equipStar.get(nextId);
|
||||
if(nextEquipStar && nextEquipStar.equipId == equipStar.equipId) {
|
||||
return nextEquipStar;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getEquipStarMainAttrByStage(equipId: number, star: number, starStage: number) {
|
||||
if(starStage == 0) {
|
||||
let preEquipStar = getPreEquipStar(equipId, star);
|
||||
if(!preEquipStar || preEquipStar.equipId != equipId) {
|
||||
return [];
|
||||
} else {
|
||||
return preEquipStar.mainAttr.get(preEquipStar.count);
|
||||
}
|
||||
} else {
|
||||
let equipStar = getEquipStarIdByEquipId(equipId, star);
|
||||
return equipStar.mainAttr.get(starStage);
|
||||
}
|
||||
}
|
||||
|
||||
export function getEquipSuitByHero(hid: number) {
|
||||
let dicHero = gameData.hero.get(hid);
|
||||
let equipSuitId = gameData.equipSuitByJobClass.get(dicHero.jobClass);
|
||||
return gameData.equipSuit.get(equipSuitId);
|
||||
}
|
||||
|
||||
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();
|
||||
@@ -907,13 +912,10 @@ function treatTaskGroup() {
|
||||
function loadDatas() {
|
||||
loadHero();
|
||||
loadGoods();
|
||||
loadBlueprtCompose();
|
||||
loadBlueprtPossibility();
|
||||
loadDaily();
|
||||
loadEvent();
|
||||
loadExpedition();
|
||||
loadExpeditionPoint();
|
||||
loadFuncSwitch();
|
||||
loadHeroSkill();
|
||||
loadJob();
|
||||
loadKingExp();
|
||||
@@ -932,10 +934,6 @@ function loadDatas() {
|
||||
loadHeroStar();
|
||||
loadHeroWake();
|
||||
loadRandomEffectPool();
|
||||
loadStrengthenCost();
|
||||
loadRefine();
|
||||
loadHeroEquip();
|
||||
loadSuit();
|
||||
loadTitle();
|
||||
loadTeraph();
|
||||
loadSchool();
|
||||
@@ -986,8 +984,6 @@ function loadDatas() {
|
||||
loadAp();
|
||||
loadApBuy();
|
||||
loadKingExpRatio();
|
||||
loadQuenchQuality();
|
||||
loadQuenchConsume();
|
||||
loadEquipAttributeRatio();
|
||||
loadHoliday();
|
||||
loadExpeditionSubAttr();
|
||||
@@ -999,6 +995,15 @@ function loadDatas() {
|
||||
loadGuildWishReward();
|
||||
loadApi();
|
||||
loadServerConst();
|
||||
loadEquip();
|
||||
loadEquipStrength();
|
||||
loadEquipQuality();
|
||||
loadEquipStar();
|
||||
loadEquipSuit();
|
||||
loadEquipQualityExtra();
|
||||
loadJewel();
|
||||
loadStone();
|
||||
loadJewelCondition();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
@@ -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, // 每赠送/领取一次增加的亲密度
|
||||
|
||||
@@ -5,22 +5,30 @@ import { RewardInter } from '../interface';
|
||||
const _ = require('lodash');
|
||||
|
||||
export interface DicArmyDevelopConsume {
|
||||
|
||||
// 科技树唯一id
|
||||
readonly id: number;
|
||||
// 目标品质
|
||||
readonly quality: number;
|
||||
readonly starLevel: number;
|
||||
readonly prePositions: Array<number>;
|
||||
readonly honourConsume: Array<RewardInter>;
|
||||
// 相同品质下细分等级
|
||||
readonly qualityLevel: number;
|
||||
// 前置点需求
|
||||
readonly prePositions: number[];
|
||||
// 图纸最多张数
|
||||
readonly max: number;
|
||||
// 需要的功勋
|
||||
readonly honourConsume: RewardInter[];
|
||||
// 研发需要的资金
|
||||
readonly fundConsume: number;
|
||||
// 研发需要的时间
|
||||
readonly timeConsume: number;
|
||||
}
|
||||
|
||||
const DicArmyDevelopConsumeKeys: KeysEnum<DicArmyDevelopConsume> = {
|
||||
id: true,
|
||||
quality: true,
|
||||
starLevel: true,
|
||||
qualityLevel: true,
|
||||
prePositions: true,
|
||||
max: true,
|
||||
honourConsume: true,
|
||||
fundConsume: true,
|
||||
timeConsume: true
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// 藏宝图合成表
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicBlueprtCompose {
|
||||
|
||||
// 品质
|
||||
readonly quality: number;
|
||||
// 消耗的寻宝币数量
|
||||
readonly coinNum: RewardInter[];
|
||||
// 消耗的藏宝图的数量
|
||||
readonly blueprtNum: number;
|
||||
// 目标品质
|
||||
readonly targetQuality: number;
|
||||
|
||||
}
|
||||
|
||||
export const dicBlueprtCompose = new Map<number, DicBlueprtCompose>();
|
||||
export function loadBlueprtCompose() {
|
||||
dicBlueprtCompose.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_BLUEPRT_COMPOSE);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.coinNum = parseGoodStr(o.coinNum);
|
||||
dicBlueprtCompose.set(o.quality, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
// 藏宝图掉落率
|
||||
import { decodeArrayListStr, readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicBlueprtPossibility {
|
||||
|
||||
// 君主等级下限
|
||||
readonly min: number;
|
||||
// 君主等级上限
|
||||
readonly max: number;
|
||||
// 掉落概率
|
||||
readonly possibility: Array<{id: number, weight: number}>;
|
||||
|
||||
}
|
||||
|
||||
export const dicBlueprtPossibility = new Array<DicBlueprtPossibility>();
|
||||
export function loadBlueprtPossibility() {
|
||||
dicBlueprtPossibility.splice(0, dicBlueprtPossibility.length);
|
||||
let arr = readFileAndParse(FILENAME.DIC_BLUEPRT_POSSIBILITY);
|
||||
arr.forEach(o => {
|
||||
o.possibility = parsePossibility(o.possibility);
|
||||
dicBlueprtPossibility.push(o);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function parsePossibility(str: string) {
|
||||
let result = new Array<{id: number, weight: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, weight] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(weight))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), weight: parseInt(weight)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// 装备表
|
||||
import { readFileAndParse, decodeArrayListStr, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicEquip {
|
||||
// (key) 装备的id
|
||||
readonly id: number;
|
||||
// 装备的位置(武器、衣甲、帽冠、行具)
|
||||
readonly eplaceId: number;
|
||||
// 装备名
|
||||
readonly name: string;
|
||||
// 匹配的武将的职业的大类
|
||||
readonly jobClass: number;
|
||||
// 套装id
|
||||
readonly suitId: number;
|
||||
// 属性提升
|
||||
readonly attribute: {id: number, num: number}[];
|
||||
// 属性成长加成提升
|
||||
readonly attributeUp: {id: number, num: number}[];
|
||||
// 合成消耗
|
||||
readonly composeMaterial: RewardInter[];
|
||||
|
||||
}
|
||||
|
||||
export const dicEquipById = new Map<number, DicEquip>();
|
||||
export const dicEquipIdByJobClassAndEplace = new Map<string, number>();
|
||||
export function loadEquip() {
|
||||
dicEquipById.clear();
|
||||
dicEquipIdByJobClassAndEplace.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.attribute = parseAttr(o.attribute);
|
||||
o.attributeUp = parseAttr(o.attributeUp);
|
||||
o.composeMaterial = parseGoodStr(o.composeMaterial);
|
||||
dicEquipById.set(o.id, o);
|
||||
dicEquipIdByJobClassAndEplace.set(`${o.jobClass}_${o.eplaceId}`, o.id);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{id: number, num: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, num] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), num: parseInt(num)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// 装备升品表
|
||||
import { readFileAndParse, parseGoodStr, decodeArrayListStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicEquipQuality {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 装备id
|
||||
readonly equipId: number;
|
||||
// 装备品质
|
||||
readonly quality: number;
|
||||
// 装备的武将职业大类
|
||||
readonly jobClass: number;
|
||||
// 装备栏id
|
||||
readonly eplaceId: number;
|
||||
// 升星的点
|
||||
readonly point: number;
|
||||
// 一共有多少点
|
||||
readonly count: number;
|
||||
// 消耗
|
||||
readonly consume: RewardInter[];
|
||||
// 属性提升
|
||||
readonly attribute: {id: number, num: number}[];
|
||||
|
||||
}
|
||||
|
||||
export const dicEquipQuality = new Map<number, DicEquipQuality>();
|
||||
export const dicEquipQualityIdByEquipIdAndPoint = new Map<string, number>(); // equipId&point => id
|
||||
|
||||
export function loadEquipQuality() {
|
||||
dicEquipQuality.clear();
|
||||
dicEquipQualityIdByEquipIdAndPoint.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_QUALITY);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.consume = parseGoodStr(o.consume);
|
||||
o.attribute = parseAttr(o.attribute);
|
||||
dicEquipQualityIdByEquipIdAndPoint.set(`${o.equipId}_${o.quality}_${o.point}`, o.id);
|
||||
dicEquipQuality.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{id: number, num: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, num] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), num: parseInt(num)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// 装备升品表
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export interface DicEquipQualityExtra {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 品质
|
||||
readonly quality: number;
|
||||
// 限制星级
|
||||
readonly star: number;
|
||||
// 天晶石
|
||||
readonly jewelCnt: number;
|
||||
// 地玉石
|
||||
readonly stoneCnt: number;
|
||||
|
||||
}
|
||||
|
||||
export const dicEquipQualityExtra = new Map<number, DicEquipQualityExtra>();
|
||||
|
||||
export function loadEquipQualityExtra() {
|
||||
dicEquipQualityExtra.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_QUALITY_EXTRA);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicEquipQualityExtra.set(o.quality, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// 装备升品表
|
||||
import { readFileAndParse, parseGoodStr, decodeArrayListStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicEquipStar {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 装备id
|
||||
readonly equipId: number;
|
||||
// 装备星级
|
||||
readonly star: number;
|
||||
// 装备的武将职业大类
|
||||
readonly jobClass: number;
|
||||
// 装备栏id
|
||||
readonly eplaceId: number;
|
||||
// 一共有多少点
|
||||
readonly count: number;
|
||||
// 主属性
|
||||
readonly mainAttr: Map<number, {id: number, num: number}[]>;
|
||||
// 次级属性
|
||||
readonly subAttr: {id: number, num: number}[];
|
||||
// 一次升点消耗
|
||||
readonly mainConsume: RewardInter[];
|
||||
// 升星消耗
|
||||
readonly subConsume: RewardInter[];
|
||||
|
||||
}
|
||||
|
||||
export const dicEquipStar = new Map<number, DicEquipStar>();
|
||||
export const dicEquipStarIdByEquipId = new Map<string, number>(); // equipId&point => id
|
||||
|
||||
export function loadEquipStar() {
|
||||
dicEquipStar.clear();
|
||||
dicEquipStarIdByEquipId.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_STAR);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.mainConsume = parseGoodStr(o.mainConsume);
|
||||
o.subConsume = parseGoodStr(o.subConsume);
|
||||
o.mainAttr = parseAttrMap(o.mainAttr);
|
||||
o.subAttr = parseAttr(o.subAttr);
|
||||
dicEquipStarIdByEquipId.set(`${o.equipId}_${o.star}`, o.id);
|
||||
dicEquipStar.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseAttrMap(str: string) {
|
||||
let result = new Map<number, {id: number, num: number}[]>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let i = 0; i < decodeArr.length; i++) {
|
||||
let [id, num] = decodeArr[i];
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.set(i + 1, [{id: parseInt(id), num: parseInt(num)}]);
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{id: number, num: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, num] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), num: parseInt(num)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// 装备强化表
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicEquipStrength {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 等级,1级升2级,读2级数据
|
||||
readonly lv: number;
|
||||
// 消耗
|
||||
readonly consume: RewardInter[];
|
||||
|
||||
}
|
||||
|
||||
export const dicEquipStrength = new Map<number, DicEquipStrength>();
|
||||
export function loadEquipStrength() {
|
||||
dicEquipStrength.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_STRENGTH);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.consume = parseGoodStr(o.consume);
|
||||
dicEquipStrength.set(o.lv, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// 装备套装表
|
||||
import { readFileAndParse, parseNumberList, decodeArrayListStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicEquipSuit {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 匹配的武将的职业的大类
|
||||
readonly jobClass: number;
|
||||
// 套装内含的装备编号
|
||||
readonly equips: number[];
|
||||
// 按星级可解锁的属性
|
||||
readonly effect: { star: number, seid: number }[];
|
||||
}
|
||||
|
||||
export const dicEquipSuit = new Map<number, DicEquipSuit>();
|
||||
export const dicEquipSuitByJobClass = new Map<number, number>();
|
||||
export function loadEquipSuit() {
|
||||
dicEquipSuit.clear();
|
||||
dicEquipSuitByJobClass.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_EQUIP_SUIT);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.equips = parseNumberList(o.equips);
|
||||
o.effect = parseEffect(o.effect);
|
||||
dicEquipSuit.set(o.id, o);
|
||||
dicEquipSuitByJobClass.set(o.jobClass, o.id);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseEffect(str: string) {
|
||||
let result = new Array<{star: number, seid: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [star, seid] of decodeArr) {
|
||||
if(isNaN(parseInt(star)) || isNaN(parseInt(seid))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({star: parseInt(star), seid: parseInt(seid)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// 开启功能表
|
||||
import { readFileAndParse } from '../util';
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export interface DicFuncSwitch {
|
||||
// 功能id
|
||||
readonly id: number;
|
||||
// 描述
|
||||
readonly desc: string;
|
||||
// 条件
|
||||
readonly conditionType: number;
|
||||
// 参数
|
||||
readonly param: number;
|
||||
// 客户端指令
|
||||
readonly script: string;
|
||||
|
||||
}
|
||||
|
||||
export const dicFuncSwitch = new Map<number, DicFuncSwitch>();
|
||||
export function loadFuncSwitch() {
|
||||
dicFuncSwitch.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_FUNC_SWITCH);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicFuncSwitch.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -1,69 +1,31 @@
|
||||
// 物品表
|
||||
import { decodeArrayListStr, readFileAndParse, parseGoodStr, parseNumberList, decodeArrayStr } from '../util'
|
||||
import { FILENAME, IT_TYPE, ABI_TYPE, GOOD_TYPE } from '../../consts'
|
||||
import { decodeArrayListStr, readFileAndParse, parseGoodStr, } from '../util'
|
||||
import { FILENAME, } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
const _ = require('lodash');
|
||||
import { findWhere } from 'underscore';
|
||||
|
||||
export interface SpecialMaterial {
|
||||
readonly ids: number[];
|
||||
readonly count: number;
|
||||
}
|
||||
|
||||
export interface DicGoods {
|
||||
// 物品id
|
||||
readonly good_id: number;
|
||||
// 物品名
|
||||
readonly name: string;
|
||||
// 等级限制
|
||||
readonly lvLimited: number;
|
||||
// 星级
|
||||
readonly equipLvl: number;
|
||||
// 职业限制
|
||||
readonly jobLimited: number[];
|
||||
// 武将限制
|
||||
readonly charLimited: number[];
|
||||
// 合成装备需要的碎片数
|
||||
readonly pieces: number;
|
||||
// 对应的碎片id
|
||||
readonly pieceId: number;
|
||||
// 合成材料
|
||||
readonly composeMaterial: Array<RewardInter>;
|
||||
// 特殊材料
|
||||
readonly specialMaterial: SpecialMaterial;
|
||||
// 分解所得
|
||||
readonly decomposeItem: Array<RewardInter>;
|
||||
// 物品品质
|
||||
readonly quality: number;
|
||||
// 洞数
|
||||
readonly hole: number;
|
||||
// 随机属性范围
|
||||
readonly randomEffect: Array<number>;
|
||||
|
||||
// 类型id
|
||||
readonly itid: number;
|
||||
// 物品类型
|
||||
readonly goodType: number;
|
||||
|
||||
// 分解所得
|
||||
readonly decomposeItem: Array<RewardInter>;
|
||||
// 将魂对应武将id
|
||||
readonly hid: number;
|
||||
// 属性
|
||||
readonly goodsAbility: Map<number, number>;
|
||||
// 强化属性
|
||||
readonly goodsAbilityUp: Map<number, number>;
|
||||
// 套装id
|
||||
readonly suitId: number;
|
||||
// 特殊属性
|
||||
readonly specialAttr: Map<number, number>;
|
||||
// 属性外加的值,经验,好感
|
||||
readonly value: number;
|
||||
|
||||
readonly count?: number;
|
||||
|
||||
readonly nextJewelId?: number;
|
||||
readonly specialCount?: number;
|
||||
readonly nextSpecialId?: number;
|
||||
// 对应的装备id
|
||||
readonly equipId?: number;
|
||||
// 解锁条件
|
||||
readonly condition: { id: number, type: number, params: number[] }[];
|
||||
// 时间限制
|
||||
@@ -78,65 +40,30 @@ type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
||||
const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
good_id: true,
|
||||
name: true,
|
||||
lvLimited: true,
|
||||
pieces: true,
|
||||
composeMaterial: true,
|
||||
specialMaterial: true,
|
||||
decomposeItem: true,
|
||||
quality: true,
|
||||
hole: true,
|
||||
randomEffect: true,
|
||||
itid: true,
|
||||
goodType: true,
|
||||
hid: true,
|
||||
goodsAbility: true,
|
||||
goodsAbilityUp: true,
|
||||
suitId: true,
|
||||
specialAttr: true,
|
||||
value: true,
|
||||
pieceId: true,
|
||||
count: true,
|
||||
nextJewelId: true,
|
||||
specialCount: true,
|
||||
nextSpecialId: true,
|
||||
equipId: true,
|
||||
condition: true,
|
||||
timeLimit: true,
|
||||
image_id: true,
|
||||
gift: true,
|
||||
jobLimited: true,
|
||||
charLimited: true,
|
||||
equipLvl: true
|
||||
}
|
||||
export const dicJewel = new Map<number, DicGoods>();
|
||||
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() {
|
||||
dicJewel.clear();
|
||||
dicGoods.clear();
|
||||
blueprtWithQuality.clear();
|
||||
blueprtWithQualityAndStar.clear();
|
||||
figureCondition.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_GOODS);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.goodsAbility = parseAbility(o);
|
||||
o.goodsAbilityUp = parseAbilityUp(o);
|
||||
o.composeMaterial = parseGoodStr(o.composeMaterial);
|
||||
o.decomposeItem = parseGoodStr(o.decomposeItem);
|
||||
o.specialAttr = parseSpecialAttr(o.specialAttr);
|
||||
o.specialMaterial = parseSpecialMaterial(o.specialMaterial);
|
||||
o.randomEffect = parseNumberList(o.randomEffect);
|
||||
o.timeLimit = o.timelimit;
|
||||
if (o.goodType == IT_TYPE.EQUIP_PIECE) {
|
||||
let good = findWhere(arr, { pieceId: o.good_id });
|
||||
if (!!good)
|
||||
o.equipId = good.good_id;
|
||||
}
|
||||
let condition = parseConditionStr(o.condition);
|
||||
for (let { id, type, params } of condition) {
|
||||
let mapArr = figureCondition.get(type) || new Array<{ params: number[], id: number, gid: number }>();
|
||||
@@ -144,93 +71,12 @@ export function loadGoods() {
|
||||
figureCondition.set(type, mapArr);
|
||||
}
|
||||
o.condition = condition;
|
||||
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);
|
||||
} else if (o.goodType == GOOD_TYPE.JEWEL) {
|
||||
let material = o.composeMaterial[0];
|
||||
if (!!material && !!material.id) {
|
||||
let lastJewel = findWhere(arr, { good_id: material.id });
|
||||
if (!!lastJewel) {
|
||||
lastJewel.count = material.count;
|
||||
lastJewel.nextJewelId = o.good_id;
|
||||
if (!!o.specialMaterial.ids[0]) {
|
||||
lastJewel.specialCount = o.specialMaterial.count;
|
||||
lastJewel.nextSpecialId = o.specialMaterial.ids[0];
|
||||
}
|
||||
dicJewel.set(lastJewel.good_id, _.pick(lastJewel, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
} else {
|
||||
dicJewel.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseSpecialAttr(str: string) {
|
||||
let specialAttr = new Map<number, number>();
|
||||
if (str) {
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for (let [type, count] of decodeArr) {
|
||||
if (isNaN(parseInt(type)) || isNaN(parseInt(count))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
|
||||
specialAttr.set(parseInt(type), parseInt(count));
|
||||
}
|
||||
}
|
||||
return specialAttr;
|
||||
}
|
||||
|
||||
function parseAbility(json) {
|
||||
let map = new Map<number, number>();
|
||||
map.set(ABI_TYPE.ABI_HP, json.hp || 0);
|
||||
map.set(ABI_TYPE.ABI_ATK, json.atk || 0);
|
||||
map.set(ABI_TYPE.ABI_DEF, json.def || 0);
|
||||
map.set(ABI_TYPE.ABI_MDEF, json.mdef || 0);
|
||||
map.set(ABI_TYPE.ABI_DAMAGE_INCREASE, json.damageIncrease || 0);
|
||||
map.set(ABI_TYPE.ABI_DAMAGE_DECREASE, json.damageDecrease || 0);
|
||||
map.set(ABI_TYPE.ABI_PHYSICAL_DAMAGE_DECREASE, json.atkDecrease || 0);
|
||||
map.set(ABI_TYPE.ABI_MAGIC_DAMAGE_DECREASE, json.matkDecrease || 0);
|
||||
return map
|
||||
}
|
||||
|
||||
function parseAbilityUp(json) {
|
||||
let map = new Map<number, number>();
|
||||
map.set(ABI_TYPE.ABI_HP, json.hp_up || 0);
|
||||
map.set(ABI_TYPE.ABI_ATK, json.atk_up || 0);
|
||||
map.set(ABI_TYPE.ABI_DEF, json.def_up || 0);
|
||||
map.set(ABI_TYPE.ABI_MDEF, json.mdef_up || 0);
|
||||
map.set(ABI_TYPE.ABI_DAMAGE_INCREASE, json.damageIncrease_up || 0);
|
||||
map.set(ABI_TYPE.ABI_DAMAGE_DECREASE, json.damageDecrease_up || 0);
|
||||
return map
|
||||
}
|
||||
|
||||
function parseSpecialMaterial(str: string) {
|
||||
let specialAttr = { ids: new Array<number>(), count: 0 }
|
||||
if (!str) return specialAttr;
|
||||
|
||||
let decodeArr = decodeArrayStr(str);
|
||||
if (decodeArr.length >= 2) {
|
||||
let ids = parseNumberList(decodeArr[0]);
|
||||
let count = parseInt(decodeArr[1]);
|
||||
if (isNaN(count)) return specialAttr;
|
||||
specialAttr.ids = ids;
|
||||
specialAttr.count = count;
|
||||
}
|
||||
return specialAttr;
|
||||
}
|
||||
|
||||
// 解析物品 {"type": number, "param": number} 格式
|
||||
export function parseConditionStr(str: string) {
|
||||
let result = new Array<{ id: number, type: number, params: number[] }>();
|
||||
|
||||
@@ -8,8 +8,6 @@ export interface DicGuildWishReward {
|
||||
readonly id: number;
|
||||
// itid
|
||||
readonly itid: number;
|
||||
// 装备星级
|
||||
readonly starLevel: number;
|
||||
// 品质
|
||||
readonly quality: number;
|
||||
// 功勋奖励
|
||||
@@ -24,7 +22,7 @@ export function loadGuildWishReward() {
|
||||
|
||||
arr.forEach(o => {
|
||||
if(o.starLevel == '&') o.starLevel = 0;
|
||||
dicGuildWishReward.set(`${o.itid}_${o.starLevel}_${o.quality}`, o);
|
||||
dicGuildWishReward.set(`${o.itid}_${o.quality}`, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -37,17 +37,12 @@ export interface DicHero {
|
||||
|
||||
type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
||||
const DicHeroKeys: KeysEnum<DicHero> = {heroId: true, name: true, quality: true, camp: true, jobClass: true, jobid: true, skill: true, pieceId: true, initialStars: true, pieceCount: true, baseAbilityArr: true, baseAbilityUpArr: true, initialSkin: true, recruit: true, face_id: true};
|
||||
export const dicMyHeroes = new Array<number>();
|
||||
export const dicHero = new Map<number, DicHero>();
|
||||
export function loadHero() {
|
||||
dicMyHeroes.splice(0, dicMyHeroes.length);
|
||||
dicHero.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_HERO);
|
||||
arr.forEach(o => {
|
||||
if(o.heroId > 0 && o.heroId <= 300) {
|
||||
dicMyHeroes.push(o.heroId);
|
||||
}
|
||||
o.baseAbilityArr = parseBaseAbilityArr(o);
|
||||
o.baseAbilityUpArr = parseBaseAbilityUpArr(o);
|
||||
o.recruit = parseInt(o.recruit) == 1;
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// 藏宝图合成表
|
||||
import { readFileAndParse, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
const _ = require('lodash');
|
||||
|
||||
export interface DicHeroEquip {
|
||||
readonly itId: number;
|
||||
readonly classId: Array<number>;
|
||||
}
|
||||
|
||||
type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
||||
const DicHeroEquipKeys: KeysEnum<DicHeroEquip> = {
|
||||
itId: true,
|
||||
classId: true
|
||||
}
|
||||
export const dicHeroEquip = new Map<number, DicHeroEquip>();
|
||||
export function loadHeroEquip() {
|
||||
dicHeroEquip.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_HERO_EQUIP);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.classId = parseNumberList(o.classId);
|
||||
dicHeroEquip.set(o.itId, _.pick(o, Object.keys(DicHeroEquipKeys)));
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// 天晶石表
|
||||
import { readFileAndParse, parseGoodStr, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts';
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicJewel {
|
||||
// 物品id
|
||||
readonly good_id: number;
|
||||
// 天晶石名
|
||||
readonly name: string;
|
||||
// 装备栏id
|
||||
readonly eplaceId: number;
|
||||
// itid
|
||||
readonly itid: number;
|
||||
// 天晶石阶
|
||||
readonly lv: number;
|
||||
// 天晶石品质
|
||||
readonly quality: number;
|
||||
// 天晶石属性条数
|
||||
readonly effectCount: number;
|
||||
// 套装效果
|
||||
readonly randomEffect: number[];
|
||||
// 对应藏宝图id
|
||||
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();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_JEWEL);
|
||||
|
||||
arr.forEach(o => {
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// 天晶石表
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export interface DicJewelCondition {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 天晶石品质
|
||||
readonly jewelLv: number;
|
||||
// 属性词条id
|
||||
readonly randSeId: number;
|
||||
// 需要的地玉石的数量
|
||||
readonly stoneCnt: number;
|
||||
// 需要的地玉石的品质之和
|
||||
readonly stoneLv: number;
|
||||
}
|
||||
|
||||
|
||||
export const dicJewelCondition = new Map<string, DicJewelCondition>();
|
||||
export function loadJewelCondition() {
|
||||
dicJewelCondition.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_JEWEL_CONDITION);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicJewelCondition.set(`${o.jewelLv}_${o.randSeId}`, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicQuenchConsume {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 等级
|
||||
readonly equipLvl: number;
|
||||
// 品质
|
||||
readonly quality: number;
|
||||
// 淬火一次的消耗
|
||||
readonly unitConsume: RewardInter[];
|
||||
}
|
||||
|
||||
export const dicQuenchConsume = new Map<string, RewardInter[]>(); // equipLvl&quality => dic
|
||||
export function loadQuenchConsume() {
|
||||
dicQuenchConsume.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_QUENCH_CONSUME);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.unitConsume = parseGoodStr(o.unitconsume);
|
||||
dicQuenchConsume.set(`${o.equipLvl}_${o.quality}`, o.unitConsume);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
import { readFileAndParse } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicQuenchQuality {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 装备品质
|
||||
readonly quality: number;
|
||||
// 品相
|
||||
readonly grade: number;
|
||||
// 单属性最小值
|
||||
readonly singleRatioMin: number;
|
||||
// 单属性最大值
|
||||
readonly singleRatioMax: number;
|
||||
// 初始是否可以随机出
|
||||
readonly initialAvailable: number;
|
||||
// 暴击率
|
||||
readonly critProbability: number;
|
||||
// 暴击效果
|
||||
readonly critEffect: number;
|
||||
}
|
||||
|
||||
export const dicQuenchRangeByQualityAndGrade = new Map<string, { min: number, max: number, randMin: number, randMax: number }>();
|
||||
export const dicQuenchRangeByQuality = new Map<number, { min: number, max: number, randMin: number, randMax: number }>(); // quality => {}
|
||||
export const dicQuenchByQuality = new Map<number, Map<number, DicQuenchQuality>>(); // quality => grade => dic
|
||||
export function loadQuenchQuality() {
|
||||
dicQuenchByQuality.clear();
|
||||
dicQuenchRangeByQuality.clear();
|
||||
dicQuenchRangeByQualityAndGrade.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_QUENCH_QUALITY);
|
||||
|
||||
arr.forEach(o => {
|
||||
if(o.initialAvailable == 1) {
|
||||
}
|
||||
|
||||
|
||||
if(!dicQuenchRangeByQuality.has(o.quality)) {
|
||||
dicQuenchRangeByQuality.set(o.quality, { min: o.singleRatioMin, max: o.singleRatioMax, randMin: o.singleRatioMin, randMax: o.singleRatioMax });
|
||||
} else {
|
||||
if(o.singleRatioMin < dicQuenchRangeByQuality.get(o.quality).min) {
|
||||
dicQuenchRangeByQuality.get(o.quality).min = o.singleRatioMin;
|
||||
}
|
||||
if(o.singleRatioMax > dicQuenchRangeByQuality.get(o.quality).max) {
|
||||
dicQuenchRangeByQuality.get(o.quality).max = o.singleRatioMax;
|
||||
}
|
||||
if(o.singleRatioMin < dicQuenchRangeByQuality.get(o.quality).randMin && o.initialAvailable == 1) {
|
||||
dicQuenchRangeByQuality.get(o.quality).randMin = o.singleRatioMin;
|
||||
}
|
||||
if(o.singleRatioMax > dicQuenchRangeByQuality.get(o.quality).randMax && o.initialAvailable == 1) {
|
||||
dicQuenchRangeByQuality.get(o.quality).randMax = o.singleRatioMax;
|
||||
}
|
||||
|
||||
}
|
||||
dicQuenchRangeByQualityAndGrade.set(`${o.quality}_${o.grade}`, { min: o.singleRatioMin, max: o.singleRatioMax, randMin: o.singleRatioMin, randMax: o.singleRatioMax });
|
||||
|
||||
|
||||
if(!dicQuenchByQuality.has(o.quality)) {
|
||||
dicQuenchByQuality.set(o.quality, new Map<number, DicQuenchQuality>());
|
||||
}
|
||||
dicQuenchByQuality.get(o.quality).set(o.grade, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// 武将特技表
|
||||
import { readFileAndParse, parseNumberList } from '../util'
|
||||
import { readFileAndParse, decodeArrayListStr, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicRandomEffectPool {
|
||||
@@ -16,6 +16,10 @@ export interface DicRandomEffectPool {
|
||||
readonly Min: number;
|
||||
// 随机最大值
|
||||
readonly Max: number;
|
||||
// 分割
|
||||
readonly gap: number;
|
||||
// 分割
|
||||
readonly rate: {min: number, max: number, weight: number}[];
|
||||
|
||||
}
|
||||
|
||||
@@ -26,8 +30,23 @@ export function loadRandomEffectPool() {
|
||||
let arr = readFileAndParse(FILENAME.DIC_RANDOM_EFFECT_POOL);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.gainValueArr = parseNumberList(o.gainValue)
|
||||
o.rate = parseRate(o.count);
|
||||
o.gainValueArr = parseNumberList(o.gainvalue);
|
||||
dicRandomEffectPool.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseRate(str: string) {
|
||||
|
||||
let result: {min: number, max: number, weight: number}[] = [];
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [min, max, weight] of decodeArr) {
|
||||
if(isNaN(parseInt(min)) || isNaN(parseInt(max)) || isNaN(parseInt(weight))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({min: parseInt(min), max: parseInt(max), weight: parseInt(weight) });
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// 武将特技表
|
||||
import { readFileAndParse, parseGoodStr } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicRefine {
|
||||
|
||||
// 精炼id
|
||||
readonly id: number;
|
||||
// 精炼等级
|
||||
readonly level: number;
|
||||
// 精炼次数
|
||||
readonly count: number;
|
||||
// 等级限制
|
||||
readonly levelLimited: number;
|
||||
// 提高属性百分比
|
||||
readonly upPercent: number;
|
||||
// 材料
|
||||
readonly consume: Array<RewardInter>;
|
||||
}
|
||||
|
||||
export const dicRefine = new Map<number, DicRefine>();
|
||||
export function loadRefine() {
|
||||
dicRefine.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_REFINE);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.consume = parseGoodStr(o.consume)
|
||||
dicRefine.set(o.id, o);
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// 地玉石表
|
||||
import { readFileAndParse, parseGoodStr, decodeArrayListStr } from '../util'
|
||||
import { FILENAME } from '../../consts';
|
||||
import { RewardInter } from '../interface';
|
||||
|
||||
export interface DicStone {
|
||||
// 物品id
|
||||
readonly good_id: number;
|
||||
// 地玉石名
|
||||
readonly name: string;
|
||||
// 装备栏id
|
||||
readonly eplaceId: number;
|
||||
// itid
|
||||
readonly itid: number;
|
||||
// 地玉石阶
|
||||
readonly lv: number;
|
||||
// 地玉石品质
|
||||
readonly quality: number;
|
||||
// 合成消耗
|
||||
readonly composeMaterial: RewardInter[];
|
||||
// 属性提升
|
||||
readonly attribute: {id: number, num: number}[];
|
||||
}
|
||||
|
||||
|
||||
export const dicStone = new Map<number, DicStone>();
|
||||
export function loadStone() {
|
||||
dicStone.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_STONE);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.composeMaterial = parseGoodStr(o.composeMaterial);
|
||||
o.attribute = parseAttr(o.attribute);
|
||||
dicStone.set(o.good_id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseAttr(str: string) {
|
||||
let result = new Array<{id: number, num: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [id, num] of decodeArr) {
|
||||
if(isNaN(parseInt(id)) || isNaN(parseInt(num))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({id: parseInt(id), num: parseInt(num)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// 强化消耗表
|
||||
import {readFileAndParse} from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicStrengthenCost {
|
||||
// 等级
|
||||
readonly level: number;
|
||||
// 消耗铜钱
|
||||
readonly costCoin: number;
|
||||
}
|
||||
|
||||
export const dicStrengthenCost = new Map<number, number>();
|
||||
export function loadStrengthenCost() {
|
||||
dicStrengthenCost.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_STRENGTHEN_COST);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicStrengthenCost.set(o.level, o.costCoin);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
@@ -30,17 +30,17 @@ export interface DicEquipProduceBase {
|
||||
readonly id: number;
|
||||
// 等级
|
||||
readonly level: number;
|
||||
// 可以研发的品质
|
||||
readonly quality: number;
|
||||
// 开启炼器及研发等级
|
||||
readonly levelProduce: number;
|
||||
// 可研发的碎片的品质
|
||||
readonly qualityProduce: number[];
|
||||
readonly levelProduce: number[];
|
||||
}
|
||||
|
||||
const DicEquipProduceKeys: KeysEnum<DicEquipProduceBase> = {
|
||||
id: true,
|
||||
level: true,
|
||||
quality: true,
|
||||
levelProduce: true,
|
||||
qualityProduce: true
|
||||
};
|
||||
|
||||
// 演武台
|
||||
@@ -130,7 +130,7 @@ export interface DicWishPoolBase {
|
||||
readonly id: number;
|
||||
// 等级
|
||||
readonly level: number;
|
||||
readonly wishGoodsEquips: Array<{quality: number, count: number}>;
|
||||
readonly wishgoodsDrawings: Array<{quality: number, count: number}>;
|
||||
readonly wishGoodsHeros: Array<{quality: number, count: number}>;
|
||||
readonly consume: number;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ export interface DicWishPoolBase {
|
||||
const DicWishPoolKeys: KeysEnum<DicWishPoolBase> = {
|
||||
id: true,
|
||||
level: true,
|
||||
wishGoodsEquips: true,
|
||||
wishgoodsDrawings: true,
|
||||
wishGoodsHeros: true,
|
||||
consume: true,
|
||||
};
|
||||
@@ -194,7 +194,7 @@ export function loadStructure() {
|
||||
let arrEquip = readFileAndParse(FILENAME.DIC_GUILD_EQUIP_PRODUCE_BASE);
|
||||
arrEquip.forEach(o => {
|
||||
setStructureConsume(o);
|
||||
o.qualityProduce = parseNumberList(o.qualityProduce);
|
||||
o.levelProduce = parseNumberList(o.levelProduce);
|
||||
dicEquipPriduceBase.set(o.level, _.pick(o, Object.keys(DicEquipProduceKeys)));
|
||||
});
|
||||
arrEquip = undefined;
|
||||
@@ -239,9 +239,9 @@ export function loadStructure() {
|
||||
let arrWishPool = readFileAndParse(FILENAME.DIC_GUILD_WISH_POOL_BASE);
|
||||
arrWishPool.forEach(o => {
|
||||
setStructureConsume(o);
|
||||
o.wishGoodsEquips = o.wishgoodsEquip.split('|').map(wishGoodsEquip=>{
|
||||
let wishGoodsEquips = wishGoodsEquip.split('&');
|
||||
return {quality: parseInt(wishGoodsEquips[0]), count: parseInt(wishGoodsEquips[1])};
|
||||
o.wishgoodsDrawings = o.wishgoodsDrawing.split('|').map(wishgoodsDrawing=>{
|
||||
let wishgoodsDrawings = wishgoodsDrawing.split('&');
|
||||
return {quality: parseInt(wishgoodsDrawings[0]), count: parseInt(wishgoodsDrawings[1])};
|
||||
});
|
||||
o.wishGoodsHeros = o.wishgoodsHero.split('|').map(wishGoodsHero=>{
|
||||
let wishGoodsHeros = wishGoodsHero.split('&');
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// 镇念塔表
|
||||
import { decodeArrayListStr, readFileAndParse, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export interface DicSuit {
|
||||
// 套装id
|
||||
readonly id: number;
|
||||
// 套装类型,相同suitType效果可跨级用
|
||||
readonly suitType: number;
|
||||
// 星级,相同suitType starLevel较高的套装可覆盖较低的效果
|
||||
readonly starLevel: number;
|
||||
// 包含关卡
|
||||
readonly name: string;
|
||||
// 总件数
|
||||
readonly totalCount: number;
|
||||
// 套装效果
|
||||
readonly effect: Array<{ count: number, seid: number }>;
|
||||
readonly tireInfo: Array<number>;
|
||||
}
|
||||
|
||||
|
||||
export const dicSuit = new Map<number, DicSuit>();
|
||||
export const dicSuitByTypeAndLv = new Map<string, DicSuit>();
|
||||
export function loadSuit() {
|
||||
dicSuit.clear();
|
||||
dicSuitByTypeAndLv.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_SUIT);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.effect = parseSuitEffect(o.effect);
|
||||
o.tireInfo = parseNumberList(o.tireInfo);
|
||||
dicSuit.set(o.id, o);
|
||||
dicSuitByTypeAndLv.set(`${o.suitType}_${o.starLevel}`, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
|
||||
function parseSuitEffect(str: string) {
|
||||
let result = new Array<{ count: number, seid: number }>();
|
||||
if (!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for (let [count, seid] of decodeArr) {
|
||||
if (isNaN(parseInt(count)) || isNaN(parseFloat(seid))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({ count: parseInt(count), seid: parseFloat(seid) });
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -2,20 +2,19 @@
|
||||
|
||||
import { HeroModel, HeroType, } from '../db/Hero';
|
||||
import { ItemModel } from '../db/Item';
|
||||
import { EquipModel, RandSe, Holes, RandMain, equipUpdate } from './../db/Equip';
|
||||
import { gameData, getQuenchByQualityAndGrade, getQuenchGradeByValue } from './data';
|
||||
import { RANDOM_SE_COUNT, ITID, CURRENCY_BY_TYPE, CURRENCY_TYPE, ROLE_SELECT, FIGURE_UNLOCK_CONDITION, CONSUME_TYPE, HERO_SYSTEM_TYPE, TASK_TYPE, ITEM_CHANGE_REASON } from '../consts';
|
||||
import { getRandValueByMinMax, getRandEelm } from './util';
|
||||
import { gameData } from './data';
|
||||
import { ITID, CURRENCY_BY_TYPE, CURRENCY_TYPE, ROLE_SELECT, FIGURE_UNLOCK_CONDITION, CONSUME_TYPE, HERO_SYSTEM_TYPE, ITEM_CHANGE_REASON } from '../consts';
|
||||
import { getRandValueByMinMax, getRandEelm, getRandEelmWithWeight, getDecimalCnt } from './util';
|
||||
|
||||
import { findWhere } from 'underscore';
|
||||
import { RoleModel, RoleType, } from '../db/Role';
|
||||
import { Figure } from '../domain/dbGeneral';
|
||||
import { getTimeFun } from './timeUtil';
|
||||
import { reCalAllHeroCe } from './playerCe';
|
||||
import { checkTaskWithEquip } from './taskUtil';
|
||||
// import { checkTask, checkTaskWithHeroes, checkTaskWithEquip, accomplishTask } from './taskUtil';
|
||||
import { SkinModel, } from '../db/Skin';
|
||||
import { TaskListReturn } from '../domain/roleField/task';
|
||||
import { JewelModel, jewelUpdate, RandSe, } from '../db/Jewel';
|
||||
|
||||
/**
|
||||
* 只插入皮肤,不管那么多的
|
||||
@@ -80,76 +79,60 @@ export async function addBag(roleId: string, roleName: string, data: { id: numbe
|
||||
}
|
||||
|
||||
|
||||
export async function addEquips(roleId: string, roleName: string, weapons: { id: number, hid?: number }[], reason: number) {
|
||||
let equipInfos: equipUpdate[] = [];
|
||||
for(let weapon of weapons) {
|
||||
let info = await getAddEquipInfo(roleId, roleName, weapon);
|
||||
equipInfos.push(info);
|
||||
export async function addJewels(roleId: string, roleName: string, jewels: { id: number, }[], reason: number) {
|
||||
let jewelInfo: jewelUpdate[] = [];
|
||||
for(let jewel of jewels) {
|
||||
let info = await getAddJewelInfo(roleId, roleName, jewel);
|
||||
jewelInfo.push(info);
|
||||
}
|
||||
|
||||
const equips = await EquipModel.createEquips(roleId, equipInfos);
|
||||
const jewelResult = await JewelModel.createJewels(roleId, jewelInfo);
|
||||
let pushMessages: TaskListReturn[] = [];
|
||||
// 任务
|
||||
for(let equip of equips) {
|
||||
let pushMessage = await checkTaskWithEquip(roleId, TASK_TYPE.EQUIP_SUIT, equip);
|
||||
if(reason == ITEM_CHANGE_REASON.EQUIP_COMPOSE) {
|
||||
let pm = await checkTaskWithEquip(roleId, TASK_TYPE.EQUIP_COMPOSE_SUIT, equip);
|
||||
pushMessages.push(...pm);
|
||||
}
|
||||
pushMessages.push(...pushMessage);
|
||||
}
|
||||
// TODO 修改任务
|
||||
// for(let equip of jewelResult) {
|
||||
// let pushMessage = await checkTaskWithEquip(roleId, TASK_TYPE.EQUIP_SUIT, equip);
|
||||
// if(reason == ITEM_CHANGE_REASON.EQUIP_COMPOSE) {
|
||||
// let pm = await checkTaskWithEquip(roleId, TASK_TYPE.EQUIP_COMPOSE_SUIT, equip);
|
||||
// pushMessages.push(...pm);
|
||||
// }
|
||||
// pushMessages.push(...pushMessage);
|
||||
// }
|
||||
|
||||
return { equips: equips.map(equip => {
|
||||
return { ...equip, inc: 1, reason }
|
||||
return { jewels: jewelResult.map(jewel => {
|
||||
return { ...jewel, count: 1, inc: 1, reason }
|
||||
}), pushMessages }
|
||||
}
|
||||
|
||||
export async function getAddEquipInfo(roleId: string, roleName: string, weapon: { id: number, hid?: number }) {
|
||||
let { id, hid = 0 } = weapon;
|
||||
let { name, quality, suitId, hole, randomEffect, itid, goodsAbility } = gameData.goods.get(id);
|
||||
let { type } = ITID.get(itid);
|
||||
export async function getAddJewelInfo(roleId: string, roleName: string, jewel: { id: number, }) {
|
||||
let { id, } = jewel;
|
||||
let { name, randomEffect, effectCount } = gameData.jewel.get(id);
|
||||
|
||||
// 随机属性
|
||||
let randomNum = RANDOM_SE_COUNT.get(quality);
|
||||
let randomResult: number[] = getRandEelm(randomEffect, randomNum);
|
||||
let randomResult: number[] = getRandEelm(randomEffect, effectCount);
|
||||
|
||||
let randSe: Array<RandSe> = randomResult.map((id: number, i: number) => {
|
||||
let random = gameData.randomEffectPool.get(id)
|
||||
let rand = 0;
|
||||
if (random.id > 0) rand = getRandValueByMinMax(random.Min, random.Max, 0);
|
||||
return {
|
||||
id: i + 1,
|
||||
seid: random.id,
|
||||
rand,
|
||||
locked: false
|
||||
};
|
||||
let randSe: Array<RandSe> = randomResult.map((id: number, index: number) => {
|
||||
return getJewelRandSe(index + 1, id);
|
||||
});
|
||||
|
||||
let randRange = 0;
|
||||
return { roleId, roleName, id, name, randSe };
|
||||
}
|
||||
|
||||
// 淬火品相
|
||||
let randMain: RandMain[] = [];
|
||||
let grade = 0;
|
||||
for(let [ attrId, attrValue ] of goodsAbility) {
|
||||
if(attrValue > 0) {
|
||||
let { randMin, randMax } = getQuenchByQualityAndGrade(quality, grade);
|
||||
let rand = getRandValueByMinMax(randMin, randMax, 0);
|
||||
// console.log(quality, grade, rand)
|
||||
grade = getQuenchGradeByValue(quality, rand);
|
||||
randMain.push({
|
||||
id: attrId,
|
||||
rand
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 天晶石已知词条随机值
|
||||
* @param id 词条位置,第几条
|
||||
* @param seid 词条id
|
||||
* @returns
|
||||
*/
|
||||
export function getJewelRandSe(id: number, seid: number) {
|
||||
let dicRandom = gameData.randomEffectPool.get(seid)
|
||||
let rand = 0;
|
||||
if (dicRandom.id > 0) {
|
||||
let randRange = getRandEelmWithWeight(dicRandom.rate);
|
||||
let randResult = getRandValueByMinMax(randRange.dic.min, randRange.dic.max, getDecimalCnt(dicRandom.gap));
|
||||
let n = Math.floor((randResult - dicRandom.Min)/dicRandom.gap);
|
||||
rand = dicRandom.Min + n * dicRandom.gap;
|
||||
}
|
||||
|
||||
|
||||
let holes = new Array<Holes>();
|
||||
for (let i = 0; i < hole; i++) {
|
||||
holes.push({ id: i + 1, isOpen: false, jewel: 0 });
|
||||
}
|
||||
|
||||
return { roleId, roleName, id, name, quality, suitId, randRange, ePlaceId: type, randSe, holes, hid, grade, randMain };
|
||||
return new RandSe(id, dicRandom.id, rand);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+182
-210
@@ -5,13 +5,12 @@
|
||||
import { HERO_SYSTEM_TYPE, ABI_TYPE, HERO_CE_RATIO, LINEUP_NUM } from '../consts';
|
||||
|
||||
import { cal, deepCopy, getAllAttrStage, reduceCe } from './util';
|
||||
import { HeroModel, HeroType, HeroUpdate, CeAttrData } from '../db/Hero';
|
||||
import { HeroModel, HeroType, HeroUpdate, CeAttrData, EPlace, Stone } from '../db/Hero';
|
||||
import { RoleModel, RoleType, RoleUpdate, CeAttrDataRole } from '../db/Role';
|
||||
import { AttributeCal } from '../domain/roleField/attribute';
|
||||
import { ABI_STAGE, SEID_TYPE } from '../consts';
|
||||
import { gameData, getJobByGradeAndClass, getHeroWakeByQuality, getHeroStarByQuality, getFriendShipById, getSchoolRateByStar, getScollByStar, getTeraph, getDicSuitByTypeAndLv } from './data';
|
||||
import { gameData, getJobByGradeAndClass, getHeroWakeByQuality, getHeroStarByQuality, getFriendShipById, getSchoolRateByStar, getScollByStar, getTeraph, getEquipQualityIdByEquipIdAndPoint, getEquipStarIdByEquipId, getEquipSuitByHero, getEquipStarMainAttrByStage, getJewelConditionByLvAndSeId } from './data';
|
||||
import { DicSe } from './dictionary/DicSe';
|
||||
import { EquipType } from '../db/Equip';
|
||||
import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||
import { SchoolModel } from '../db/School';
|
||||
import { ABI_TYPE_MAIN, ABI_JOB_STAGE, ABI_STAGE_TO_TYPE } from '../consts/constModules/abilityConst'
|
||||
@@ -19,16 +18,16 @@ import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
import { findIndex } from 'underscore';
|
||||
import { GuildModel } from '../db/Guild';
|
||||
import { DicJob } from './dictionary/DicJob';
|
||||
import { DicSuit } from './dictionary/DicSuit';
|
||||
import { saveCeChangeLog } from './logUtil';
|
||||
import { JewelType } from '../db/Jewel';
|
||||
|
||||
// 修改并下发战力
|
||||
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
|
||||
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>, params?: any) {
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
|
||||
let { attr: roleAttrs = [], serverId } = role;
|
||||
|
||||
let heroAttrs = calPlayerCe(originHero, update, type, args); // 根据操作计算attr的增加
|
||||
let heroAttrs = await calPlayerCe(originHero, update, type, args, params); // 根据操作计算attr的增加
|
||||
|
||||
let newAttr = new AttributeCal();
|
||||
newAttr.setLv(update.lv||originHero.lv);
|
||||
@@ -138,7 +137,7 @@ async function reCalRoleAttr(type: number, heros: Array<HeroType>, role: RoleTyp
|
||||
}
|
||||
|
||||
// 计算单个武将战力
|
||||
export function calPlayerCe(hero: HeroType, update: HeroUpdate, type: number, args: Array<number> = []) {
|
||||
export async function calPlayerCe(hero: HeroType, update: HeroUpdate, type: number, args: Array<number> = [], params) {
|
||||
let heroAttrs: CeAttrData[] = []; // {"hp": {"base": number, "fixUp": number, "ratioUp": number}}
|
||||
|
||||
let addSeidList = new Array<number>();
|
||||
@@ -166,20 +165,27 @@ export function calPlayerCe(hero: HeroType, update: HeroUpdate, type: number, ar
|
||||
case HERO_SYSTEM_TYPE.CONNECT:
|
||||
heroAttrs = calHeroConectIncAttr(hero, update, args[0]);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.EQUIP:
|
||||
heroAttrs = calEquipPutOnOffIncAttr(hero, args, addSeidList, removeSeidList);
|
||||
case HERO_SYSTEM_TYPE.COMPOSE_EQUIP:
|
||||
heroAttrs = calComposeEquipIncAttr(hero, update, args[0]);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.EQUIP_BASE:
|
||||
heroAttrs = calHeroEquipIncAttr(hero);
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STRENGTH:
|
||||
heroAttrs = calEquipStrengthIncAttr(hero, update, args);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.RESTRENGTHEN:
|
||||
heroAttrs = calRestrengthenIncAttr(hero, args.shift(), args, addSeidList, removeSeidList);
|
||||
case HERO_SYSTEM_TYPE.EQUIP_QUALITY:
|
||||
heroAttrs = calEquipQualityIncAttr(hero, update, args);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.JEWEL_ON:
|
||||
heroAttrs = calHeroCeWhenJewelOnOrOff(hero, args[0], args[1]);
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STAR:
|
||||
heroAttrs = calEquipStarIncAttr(hero, update, args, addSeidList, removeSeidList);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.JEWEL_OFF:
|
||||
heroAttrs = calHeroCeWhenJewelOnOrOff(hero, 0, args[0]);
|
||||
case HERO_SYSTEM_TYPE.EQUIP_JEWEL:
|
||||
heroAttrs = calEquipPutOnOrOffJewelIncAttr(hero, update, args, params, addSeidList, removeSeidList);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STONE:
|
||||
heroAttrs = calEquipPutOnOrOffStoneIncAttr(hero, update, args, params, addSeidList, removeSeidList);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.JEWEL_RESET_RANDSE:
|
||||
case HERO_SYSTEM_TYPE.JEWEL_QUENCH:
|
||||
heroAttrs = calJewelResetRandSeIncAttr(hero, args, params, addSeidList, removeSeidList);
|
||||
break;
|
||||
case HERO_SYSTEM_TYPE.SCROLL:
|
||||
heroAttrs = calHeroCeScrollIncAttr(hero, update);
|
||||
@@ -603,183 +609,175 @@ export function calHeroFavourUpIncAttr(originHero: HeroType, update: HeroUpdate)
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 穿脱, removeSeidList原来身上穿着的所有装备的seid,包括套装的
|
||||
* @param {HeroType} hero 武将
|
||||
* @param {number[]} seids args 原来穿着的装备的seid
|
||||
* @param {number[]} addSeidList 用于更新被动
|
||||
* @param {number[]} removeSeidList 用于更新被动
|
||||
*/
|
||||
export function calEquipPutOnOffIncAttr(hero: HeroType, seids: Array<number>, addSeidList: Array<number>, removeSeidList: Array<number>) {
|
||||
// 计算身上所有装备的战力值(特技相关以外)
|
||||
let heroAttrs = calHeroEquipIncAttr(hero);
|
||||
|
||||
// 计算被动技能
|
||||
let resultSeid = calEquipSeids(hero);
|
||||
for(let seid of resultSeid) {
|
||||
addSeidList.push(seid);
|
||||
}
|
||||
|
||||
for (let seid of seids) {
|
||||
removeSeidList.push(seid)
|
||||
}
|
||||
|
||||
return heroAttrs
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算一个武将身上的所有被动seid
|
||||
* @param {HeroType} hero 武将,equip需要populate
|
||||
*/
|
||||
export function calEquipSeids(hero: HeroType) {
|
||||
let seids: number[] = [];
|
||||
// 计算被动技能
|
||||
let { ePlace } = hero;
|
||||
let suits = new Map<number, Map<number, { dic: DicSuit, count: number }>>(); // suitType => starLevel => DicSuit
|
||||
|
||||
for (let { equip } of ePlace) {
|
||||
if (equip) {
|
||||
let e = <EquipType>equip;
|
||||
if (!!e.randSe) {
|
||||
for (let { seid, rand } of e.randSe) {
|
||||
seids.push(seid, rand);
|
||||
}
|
||||
}
|
||||
if (e.suitId > 0) {
|
||||
let { suitType, starLevel } = gameData.suit.get(e.suitId);
|
||||
if (!suits.has(suitType)) {
|
||||
suits.set(suitType, new Map<number, { dic: DicSuit, count: number }>());
|
||||
}
|
||||
for(let lv = 1; lv <= starLevel; lv++) {
|
||||
let dicSuit = getDicSuitByTypeAndLv(suitType, lv); // 计算同type的低阶套装
|
||||
if(dicSuit) {
|
||||
if(!suits.get(suitType).has(lv)) {
|
||||
suits.get(suitType).set(lv, { dic: dicSuit, count: 0 });
|
||||
}
|
||||
suits.get(suitType).get(lv).count ++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export function calComposeEquipIncAttr(hero: HeroType, update: HeroUpdate, eplaceId: number) {
|
||||
let { attr: heroAttrs } = hero;
|
||||
let newEquip = update.ePlace.find(cur => cur.id == eplaceId);
|
||||
if(newEquip) {
|
||||
let dicEquip = gameData.equipById.get(newEquip.equipId);
|
||||
for(let attr of dicEquip.attribute) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
}
|
||||
|
||||
for(let [ _suitType, map ] of suits) {
|
||||
let effectSeid = new Map<number, { starLevel: number, seid: number }>(); // count => { starLevel, seid }
|
||||
for(let [ starLevel, { dic: { effect }, count } ] of map) {
|
||||
for(let { count: effectCount, seid} of effect) {
|
||||
if(count >= effectCount ) { // 生效
|
||||
if(!effectSeid.has(effectCount) || effectSeid.get(effectCount).starLevel < starLevel) { // 没有同数量效果
|
||||
effectSeid.set(effectCount, { starLevel, seid });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for(let [_count, { seid }] of effectSeid) {
|
||||
seids.push(seid, 0);
|
||||
}
|
||||
}
|
||||
return seids;
|
||||
}
|
||||
|
||||
/**
|
||||
* 装备,装备栏升级,装备精炼等涉及到值的
|
||||
* @param {HeroType} hero 装备更新过的武将
|
||||
*/
|
||||
export function calHeroEquipIncAttr(hero: HeroType) {
|
||||
let { ePlace, attr: heroAttrs } = hero;
|
||||
|
||||
let setMap = new Map<number, number>();
|
||||
for (let { equip, lv, refineLv } of ePlace) {
|
||||
if (equip) {
|
||||
let e = <EquipType>equip;
|
||||
let dicGoods = gameData.goods.get(e.id);
|
||||
let { goodsAbility, goodsAbilityUp } = dicGoods;
|
||||
let dicRefine = gameData.refine.get(refineLv);
|
||||
|
||||
let jewel = new Map<number, number>();
|
||||
for (let { jewel: jewelId } of e.holes) {
|
||||
if (jewelId > 0) {
|
||||
let g = gameData.goods.get(jewelId);
|
||||
if (g) {
|
||||
let jGoods = g.goodsAbility;
|
||||
jGoods.forEach((value, key) => {
|
||||
if (!jewel.has(key)) {
|
||||
jewel.set(key, value);
|
||||
} else {
|
||||
jewel.set(key, jewel.get(key) + value);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let randMainMap = new Map<number, number>();
|
||||
for(let {id, rand} of (e.randMain||[])) {
|
||||
randMainMap.set(id, rand);
|
||||
}
|
||||
for (let i = ABI_TYPE.ABI_HP; i < ABI_TYPE.ABI_MAX; i++) {
|
||||
// console.log('***', i);
|
||||
let value1 = goodsAbility.get(i) || 0 * (HERO_CE_RATIO + e.randRange);
|
||||
// console.log('基础值', value1);
|
||||
let valueup = goodsAbilityUp.get(i) || 0;
|
||||
// console.log('成长', lv, valueup);
|
||||
let valueRefine = dicRefine ? dicRefine.upPercent : 0;
|
||||
// console.log('精炼', dicRefine?dicRefine.upPercent:0 );
|
||||
let valueJewel = jewel.get(i) || 0;
|
||||
// console.log('宝石', valueJewel);
|
||||
let valueGrade = randMainMap.get(i)||0;
|
||||
// console.log('品相', valueGrade)
|
||||
let attr = (value1 + lv * valueup) * valueGrade * (HERO_CE_RATIO + valueRefine) + valueJewel * HERO_CE_RATIO * HERO_CE_RATIO;
|
||||
|
||||
if(attr >= 0) {
|
||||
// console.log('装备战力:', i, attr);
|
||||
if(setMap.has(i)) {
|
||||
setMap.set(i, setMap.get(i) + Math.floor(attr / HERO_CE_RATIO));
|
||||
} else {
|
||||
setMap.set(i, Math.floor(attr / HERO_CE_RATIO));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (let i = ABI_TYPE.ABI_HP; i < ABI_TYPE.ABI_MAX; i++) {
|
||||
let attr = setMap.get(i)||0;
|
||||
updateHeroAttr(heroAttrs, i, { set: { equipUp: attr } })
|
||||
}
|
||||
|
||||
hero.attr = heroAttrs;
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 洗炼
|
||||
* @param {HeroType} hero 更新过的武将
|
||||
* @param {number} ePaceId 更新的栏位id
|
||||
* @param {number[]} seids 移除的seid
|
||||
* @param {number[]} addSeidList 用于更新被动
|
||||
* @param {number[]} removeSeidList 用于更新被动
|
||||
*/
|
||||
export function calRestrengthenIncAttr(hero: HeroType, ePaceId: number, seids: Array<number>, addSeidList: Array<number>, removeSeidList: Array<number>) {
|
||||
export function calEquipStrengthIncAttr(hero: HeroType, update: HeroUpdate, eplaceIds: number[]) {
|
||||
let { attr: heroAttrs, ePlace: oldEplace } = hero;
|
||||
let { ePlace: newEplace } = update;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let oldEquip = oldEplace.find(cur => cur.id == eplaceId);
|
||||
let newEquip = newEplace.find(cur => cur.id == eplaceId);
|
||||
if(newEquip && oldEquip) {
|
||||
let dicEquip = gameData.equipById.get(oldEquip.equipId);
|
||||
for(let attr of dicEquip.attributeUp) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: attr.num * (newEquip.lv - oldEquip.lv) * HERO_CE_RATIO } });
|
||||
}
|
||||
}
|
||||
}
|
||||
return heroAttrs
|
||||
}
|
||||
|
||||
let { attr: heroAttrs } = hero;
|
||||
let { ePlace } = hero;
|
||||
export function calEquipQualityIncAttr(hero: HeroType, update: HeroUpdate, eplaceIds: number[]) {
|
||||
let { attr: heroAttrs, ePlace: oldEplace } = hero;
|
||||
let { ePlace: newEplace } = update;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let oldEquip = oldEplace.find(cur => cur.id == eplaceId);
|
||||
let newEquip = newEplace.find(cur => cur.id == eplaceId);
|
||||
if(newEquip && oldEquip) {
|
||||
let dicOldEquipQuality = getEquipQualityIdByEquipIdAndPoint(oldEquip.equipId, oldEquip.quality, oldEquip.qualityStage);
|
||||
let dicNewEquipQuality = getEquipQualityIdByEquipIdAndPoint(newEquip.equipId, newEquip.quality, newEquip.qualityStage);
|
||||
for(let attr of dicOldEquipQuality.attribute) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: -1 * attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
for(let attr of dicNewEquipQuality.attribute) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
}
|
||||
}
|
||||
return heroAttrs
|
||||
}
|
||||
|
||||
let curPlace = ePlace.find(cur => cur.id == ePaceId);
|
||||
if (curPlace && curPlace.equip) {
|
||||
let e = <EquipType>curPlace.equip;
|
||||
for (let { seid, rand } of e.randSe) {
|
||||
addSeidList.push(seid, rand);
|
||||
|
||||
export function calEquipStarIncAttr(hero: HeroType, update: HeroUpdate, eplaceIds: number[], addSeidList: number[], removeSeidList: number[]) {
|
||||
// 升星本身的属性加成
|
||||
let { hid, attr: heroAttrs, ePlace: oldEplace } = hero;
|
||||
let { ePlace: newEplace } = update;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let oldEquip = oldEplace.find(cur => cur.id == eplaceId);
|
||||
let newEquip = newEplace.find(cur => cur.id == eplaceId);
|
||||
if(newEquip && oldEquip) {
|
||||
let dicOldEquipStar = getEquipStarIdByEquipId(oldEquip.equipId, oldEquip.star);
|
||||
let dicNewEquipStar = getEquipStarIdByEquipId(newEquip.equipId, newEquip.star);
|
||||
// 主属性
|
||||
for(let attr of getEquipStarMainAttrByStage(oldEquip.equipId, oldEquip.star, oldEquip.starStage)) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: -1 * attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
for(let attr of getEquipStarMainAttrByStage(newEquip.equipId, newEquip.star, newEquip.starStage)) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
for(let attr of dicOldEquipStar.subAttr) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: -1 * attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
for(let attr of dicNewEquipStar.subAttr) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (let seid of seids) {
|
||||
removeSeidList.push(seid)
|
||||
// 套装属性
|
||||
calEquipSuitIncAttr(hid, oldEplace, newEplace, addSeidList, removeSeidList);
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
function calEquipSuitIncAttr(hid: number, oldEplace: EPlace[], newEplace: EPlace[], addSeidList: number[], removeSeidList: number[]) {
|
||||
let dicEquipSuit = getEquipSuitByHero(hid);
|
||||
let oldSuitStars: number[] = [], newSuitStars: number[] = [];
|
||||
for(let equipId of dicEquipSuit.equips) {
|
||||
let oldEquip = oldEplace.find(cur => cur.equipId == equipId);
|
||||
oldSuitStars.push(oldEquip? oldEquip.star: 0);
|
||||
let newEquip = newEplace.find(cur => cur.equipId == equipId);
|
||||
newSuitStars.push(newEquip? newEquip.star: 0);
|
||||
}
|
||||
let oldStar = Math.min(...oldSuitStars);
|
||||
let newStar = Math.min(...newSuitStars);
|
||||
|
||||
for(let { star, seid } of dicEquipSuit.effect) {
|
||||
if(oldStar >= star) removeSeidList.push(seid);
|
||||
if(newStar >= star) addSeidList.push(seid, 0);
|
||||
}
|
||||
}
|
||||
|
||||
export function calEquipPutOnOrOffJewelIncAttr(hero: HeroType, update: HeroUpdate, eplaceIds: number[], params: { oldJewel: JewelType, newJewel: JewelType }, addSeidList: number[], removeSeidList: number[]) {
|
||||
let { attr: heroAttrs, ePlace: oldEplace } = hero;
|
||||
let { ePlace: newEplace } = update;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let oldEquip = oldEplace.find(cur => cur.id == eplaceId);
|
||||
setRandSeToSeidList(params.oldJewel, oldEquip, removeSeidList);
|
||||
let newEquip = newEplace.find(cur => cur.id == eplaceId);
|
||||
setRandSeToSeidList(params.newJewel, newEquip, addSeidList);
|
||||
}
|
||||
|
||||
return heroAttrs
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
function setRandSeToSeidList(jewel: JewelType, equip: EPlace, list: number[]) {
|
||||
if(equip && jewel) {
|
||||
for(let { id, seid, rand } of jewel.randSe) {
|
||||
if(isRandSeUnLock(jewel.id, id, equip.stones)) {
|
||||
list.push(seid, rand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isRandSeUnLock(jewelId: number, randSeId: number, stones: Stone[]) {
|
||||
let dicJewel = gameData.jewel.get(jewelId);
|
||||
let dicJewelCondition = getJewelConditionByLvAndSeId(dicJewel.lv, randSeId);
|
||||
let stoneCnt = 0, stoneLv = 0;
|
||||
for(let { stone } of stones) {
|
||||
let dicStone = gameData.stone.get(stone);
|
||||
if(dicStone) {
|
||||
stoneCnt++;
|
||||
stoneLv += dicStone.lv;
|
||||
}
|
||||
}
|
||||
return stoneCnt >= dicJewelCondition.stoneCnt && stoneLv >= dicJewelCondition.stoneLv;
|
||||
}
|
||||
|
||||
export function calEquipPutOnOrOffStoneIncAttr(hero: HeroType, update: HeroUpdate, eplaceIds: number[], params: { jewel: JewelType }, addSeidList: number[], removeSeidList: number[]) {
|
||||
let { attr: heroAttrs, ePlace: oldEplace } = hero;
|
||||
let { ePlace: newEplace } = update;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let oldEquip = oldEplace.find(cur => cur.id == eplaceId);
|
||||
updateHeroAttrOfStone(heroAttrs, oldEquip, -1);
|
||||
setRandSeToSeidList(params.jewel, oldEquip, removeSeidList);
|
||||
let newEquip = newEplace.find(cur => cur.id == eplaceId);
|
||||
updateHeroAttrOfStone(heroAttrs, newEquip, 1);
|
||||
setRandSeToSeidList(params.jewel, newEquip, addSeidList); // 地玉石阶数变化可能导致属性词条解锁变化
|
||||
}
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
function updateHeroAttrOfStone(heroAttrs: CeAttrData[], equip: EPlace, ratio: number) {
|
||||
for(let { stone } of equip.stones) {
|
||||
let dicStone = gameData.stone.get(stone);
|
||||
if(dicStone) {
|
||||
for(let attr of dicStone.attribute) {
|
||||
updateHeroAttr(heroAttrs, attr.id, { inc: { fixUp: ratio * attr.num * HERO_CE_RATIO } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export function calJewelResetRandSeIncAttr(hero: HeroType, eplaceIds: number[], params: { oldJewel: JewelType, newJewel: JewelType }, addSeidList: number[], removeSeidList: number[]) {
|
||||
let { attr: heroAttrs, ePlace } = hero;
|
||||
for(let eplaceId of eplaceIds) {
|
||||
let equip = ePlace.find(cur => cur.id == eplaceId);
|
||||
setRandSeToSeidList(params.oldJewel, equip, removeSeidList);
|
||||
setRandSeToSeidList(params.newJewel, equip, addSeidList);
|
||||
}
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
// 添加技能增加的被动属性
|
||||
@@ -824,6 +822,7 @@ function addSeidEffect(heroAttrs: CeAttrData[], addSeidList: Array<number>, remo
|
||||
|
||||
// 获取dic_zyz_se内容
|
||||
function addSeid(effectList: Array<any>, seidId: number, rand: number, seidValue = new Array<number>()) {
|
||||
console.log('##### addSeid', effectList, seidId, rand, seidValue)
|
||||
let curSeid: DicSe | DicRandomEffectPool = gameData.se.get(seidId);
|
||||
if (!curSeid) curSeid = gameData.randomEffectPool.get(seidId);
|
||||
if (!curSeid) { console.log("seidId not found:" + seidId); return; }
|
||||
@@ -836,40 +835,13 @@ function addSeid(effectList: Array<any>, seidId: number, rand: number, seidValue
|
||||
return;
|
||||
}
|
||||
let seid: DicSe | DicRandomEffectPool = deepCopy(curSeid);
|
||||
console.log('#####', seid)
|
||||
if (curSeid.index > 0) {
|
||||
seid.gainValueArr[curSeid.index - 1] = rand;
|
||||
}
|
||||
effectList.push(seid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 带上宝石
|
||||
* @param {HeroType} hero 武将数据
|
||||
* @param {number} id 带上的宝石
|
||||
* @param {number} oldId 脱下的宝石
|
||||
*/
|
||||
function calHeroCeWhenJewelOnOrOff(hero: HeroType, id: number, oldId: number) {
|
||||
let { attr: heroAttrs } = hero;
|
||||
let { goodsAbility } = gameData.goods.get(id)||{ goodsAbility: new Map<number, number>() };
|
||||
let { goodsAbility: oldGoodsAbility } = gameData.goods.get(oldId)||{ goodsAbility: new Map<number, number>() };
|
||||
|
||||
let allIds: number[] = [];
|
||||
for(let [ id ] of goodsAbility) {
|
||||
allIds.push(id);
|
||||
}
|
||||
for(let [ id ] of oldGoodsAbility) {
|
||||
if(allIds.indexOf(id) == -1) allIds.push(id);
|
||||
}
|
||||
for(let id of allIds) {
|
||||
let value = goodsAbility.get(id)||0;
|
||||
let oldValue = oldGoodsAbility.get(id)||0;
|
||||
updateHeroAttr(heroAttrs, id, { inc: { equipUp: (value - oldValue) * HERO_CE_RATIO } })
|
||||
}
|
||||
|
||||
hero.attr = heroAttrs;
|
||||
return heroAttrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局加成,百家学宫
|
||||
* @param role 角色
|
||||
|
||||
@@ -15,7 +15,6 @@ import { reduceCe, resResult } from "./util";
|
||||
import { calculatetopLineup, } from "./playerCe";
|
||||
import { GuildModel, GuildType } from "../db/Guild";
|
||||
import { PvpDefenseModel } from "../db/PvpDefense";
|
||||
import { EquipModel } from '../db/Equip';
|
||||
import { ActionPointModel } from '../db/ActionPoint';
|
||||
import { BattleDropModel } from '../db/BattleDrop';
|
||||
import { BattleRecordModel } from '../db/BattleRecord';
|
||||
@@ -101,6 +100,7 @@ import { HeroShowParam } from '../domain/roleField/hero';
|
||||
import { saveCeChangeLog } from "./logUtil";
|
||||
import { ActivityInRemote } from "../domain/activityField/activityField";
|
||||
import { AttributeCal } from "../domain/roleField/attribute";
|
||||
import { JewelModel } from "../db/Jewel";
|
||||
|
||||
// 储存在内存中的初始数据
|
||||
export function getInitRoleInfo() {
|
||||
@@ -418,7 +418,7 @@ export async function deletRole(roleId: string) {
|
||||
await ChatInfoModel.updateMany({ 'recentPrivateChats.targetRoleId': roleId }, { $pull: { recentPrivateChats: { targetRoleId: roleId } } });
|
||||
await DailyRecordModel.deleteMany({ roleId });
|
||||
await DungeonFirstModel.deleteMany({ roleId });
|
||||
await EquipModel.deleteMany({ roleId });
|
||||
await JewelModel.deleteMany({ roleId });
|
||||
await EquipPrintDropModel.deleteMany({ roleId });
|
||||
await EventRecordModel.deleteMany({ roleId });
|
||||
await ExpeditionPointModel.deleteMany({ roleId });
|
||||
|
||||
+71
-72
@@ -6,7 +6,6 @@ import { RoleType, RoleModel } from '../db/Role';
|
||||
import { TaskParam, TaskListReturn } from '../domain/roleField/task';
|
||||
import { getZeroPoint } from './timeUtil';
|
||||
import { HeroType } from '../db/Hero';
|
||||
import { EquipType, EquipModel } from '../db/Equip';
|
||||
import { ItemInter } from './interface';
|
||||
import { DailyChallengesData } from '../domain/activityField/dailyChallengesField';
|
||||
import { splitString } from './util';
|
||||
@@ -130,10 +129,10 @@ export async function checkTaskWithHero(roleId: string, taskType: number, hero:
|
||||
pushMessage = await checkTask(roleId, taskType, 1, true, { favourLv: hero.favourLv, oldLv: args[0] })
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_BY_HERO) {
|
||||
// arg[0] 1:穿上 -1:脱下
|
||||
let { ePlace } = hero;
|
||||
let count = ePlace.filter(cur => cur.equip).length;
|
||||
pushMessage = await checkTask(roleId, taskType, args[0], true, { count, isPutOn: args[0], oldCount: args[1] });
|
||||
// // arg[0] 1:穿上 -1:脱下
|
||||
// let { ePlace } = hero;
|
||||
// let count = ePlace.filter(cur => cur.equip).length;
|
||||
// pushMessage = await checkTask(roleId, taskType, args[0], true, { count, isPutOn: args[0], oldCount: args[1] });
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_STRENGTHEN) {
|
||||
// args: 依次为原先的装备的强化等级
|
||||
@@ -149,61 +148,61 @@ export async function checkTaskWithHero(roleId: string, taskType: number, hero:
|
||||
}
|
||||
|
||||
|
||||
export async function checkTaskWithEquip(roleId: string, taskType: number, equip: EquipType, args: number[] = []) {
|
||||
let pushMessage = new Array<TaskListReturn>();
|
||||
if (taskType == TASK_TYPE.EQUIP_QUALITY) {
|
||||
// args[0] 1:装上 -1:脱下
|
||||
let dicGood = gameData.goods.get(equip.id);
|
||||
pushMessage = await checkTask(roleId, taskType, args[0], true, { quality: dicGood.quality })
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_JEWEL) {
|
||||
// args[0] 原来镶嵌了多少宝石
|
||||
let { holes } = equip;
|
||||
let jewelCount = holes.filter(cur => cur.jewel > 0).length;
|
||||
if (jewelCount > 0 && args[0] <= 0) { // 原来没有,镶嵌上了
|
||||
pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
} else if (jewelCount <= 0 && args[0] > 0) { // 原来镶嵌着,现在没了
|
||||
pushMessage = await checkTask(roleId, taskType, -1, true, {});
|
||||
}
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_COMPOSE_SUIT) {
|
||||
let dicGood = gameData.goods.get(equip.id);
|
||||
if (dicGood.suitId) {
|
||||
pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
}
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_SUIT) {
|
||||
let dicGood = gameData.goods.get(equip.id);
|
||||
if (dicGood.suitId) {
|
||||
let suit = gameData.suit.get(dicGood.suitId);
|
||||
let equips = await EquipModel.getEquipsByIds(roleId, suit.tireInfo);
|
||||
let everyEquip = new Map<number, number>();
|
||||
for (let equip of equips) {
|
||||
if (everyEquip.has(equip.id)) {
|
||||
everyEquip.set(equip.id, everyEquip.get(equip.id) + 1);
|
||||
} else {
|
||||
everyEquip.set(equip.id, 1);
|
||||
}
|
||||
}
|
||||
let minCount = 0, curCount = 0;
|
||||
for (let id of suit.tireInfo) {
|
||||
let count = everyEquip.get(id) || 0;
|
||||
if (minCount > count) minCount = count;
|
||||
if (id == equip.id) curCount = count;
|
||||
}
|
||||
if (curCount == minCount) {
|
||||
pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_JEWEL_SUM) {
|
||||
// args[0] 原来镶嵌了多少宝石
|
||||
let { holes } = equip;
|
||||
let jewelCount = holes.filter(cur => cur.jewel > 0).length;
|
||||
pushMessage = await checkTask(roleId, taskType, jewelCount - args[0], true, {});
|
||||
}
|
||||
return pushMessage
|
||||
}
|
||||
// export async function checkTaskWithEquip(roleId: string, taskType: number, equip: EquipType, args: number[] = []) {
|
||||
// let pushMessage = new Array<TaskListReturn>();
|
||||
// if (taskType == TASK_TYPE.EQUIP_QUALITY) {
|
||||
// // args[0] 1:装上 -1:脱下
|
||||
// let dicGood = gameData.goods.get(equip.id);
|
||||
// pushMessage = await checkTask(roleId, taskType, args[0], true, { quality: dicGood.quality })
|
||||
// }
|
||||
// else if (taskType == TASK_TYPE.EQUIP_JEWEL) {
|
||||
// // args[0] 原来镶嵌了多少宝石
|
||||
// let { holes } = equip;
|
||||
// let jewelCount = holes.filter(cur => cur.jewel > 0).length;
|
||||
// if (jewelCount > 0 && args[0] <= 0) { // 原来没有,镶嵌上了
|
||||
// pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
// } else if (jewelCount <= 0 && args[0] > 0) { // 原来镶嵌着,现在没了
|
||||
// pushMessage = await checkTask(roleId, taskType, -1, true, {});
|
||||
// }
|
||||
// }
|
||||
// else if (taskType == TASK_TYPE.EQUIP_COMPOSE_SUIT) {
|
||||
// let dicGood = gameData.goods.get(equip.id);
|
||||
// if (dicGood.suitId) {
|
||||
// pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
// }
|
||||
// }
|
||||
// else if (taskType == TASK_TYPE.EQUIP_SUIT) {
|
||||
// let dicGood = gameData.goods.get(equip.id);
|
||||
// if (dicGood.suitId) {
|
||||
// let suit = gameData.suit.get(dicGood.suitId);
|
||||
// let equips = await EquipModel.getEquipsByIds(roleId, suit.tireInfo);
|
||||
// let everyEquip = new Map<number, number>();
|
||||
// for (let equip of equips) {
|
||||
// if (everyEquip.has(equip.id)) {
|
||||
// everyEquip.set(equip.id, everyEquip.get(equip.id) + 1);
|
||||
// } else {
|
||||
// everyEquip.set(equip.id, 1);
|
||||
// }
|
||||
// }
|
||||
// let minCount = 0, curCount = 0;
|
||||
// for (let id of suit.tireInfo) {
|
||||
// let count = everyEquip.get(id) || 0;
|
||||
// if (minCount > count) minCount = count;
|
||||
// if (id == equip.id) curCount = count;
|
||||
// }
|
||||
// if (curCount == minCount) {
|
||||
// pushMessage = await checkTask(roleId, taskType, 1, true, {});
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (taskType == TASK_TYPE.EQUIP_JEWEL_SUM) {
|
||||
// // args[0] 原来镶嵌了多少宝石
|
||||
// let { holes } = equip;
|
||||
// let jewelCount = holes.filter(cur => cur.jewel > 0).length;
|
||||
// pushMessage = await checkTask(roleId, taskType, jewelCount - args[0], true, {});
|
||||
// }
|
||||
// return pushMessage
|
||||
// }
|
||||
|
||||
export async function checkTaskWithArgs(roleId: string, taskType: number, args: number[]) {
|
||||
let pushMessage = new Array<TaskListReturn>();
|
||||
@@ -217,18 +216,18 @@ export async function checkTaskWithArgs(roleId: string, taskType: number, args:
|
||||
}
|
||||
}
|
||||
else if (taskType == TASK_TYPE.EQUIP_JEWEL_STAGE) {
|
||||
// args 装上的, 卸下的
|
||||
let [putOnJewel, putOffJewel] = args;
|
||||
if (putOnJewel > 0) {
|
||||
let dicGood = gameData.goods.get(putOnJewel);
|
||||
let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited });
|
||||
pushMessage.push(...push);
|
||||
}
|
||||
if (putOffJewel > 0) {
|
||||
let dicGood = gameData.goods.get(putOffJewel);
|
||||
let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited });
|
||||
pushMessage.push(...push);
|
||||
}
|
||||
// // args 装上的, 卸下的
|
||||
// let [putOnJewel, putOffJewel] = args;
|
||||
// if (putOnJewel > 0) {
|
||||
// let dicGood = gameData.goods.get(putOnJewel);
|
||||
// let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited });
|
||||
// pushMessage.push(...push);
|
||||
// }
|
||||
// if (putOffJewel > 0) {
|
||||
// let dicGood = gameData.goods.get(putOffJewel);
|
||||
// let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited });
|
||||
// pushMessage.push(...push);
|
||||
// }
|
||||
}
|
||||
else if (taskType == TASK_TYPE.CHAT) {
|
||||
// args[0] 聊天type 1-系统 2-世界 3-军团 4-组队 5-私聊
|
||||
|
||||
@@ -180,7 +180,7 @@ export function shouldRefreshWeek(preTime: Date, now: Date, day: number = 1, hou
|
||||
*/
|
||||
export function getRandEelm<T>(source: Array<T> = [], cnt = 1): Array<T> {
|
||||
if (cnt == 0) return [];
|
||||
if (cnt >= source.length) return source;
|
||||
if (cnt >= source.length) return sortArrRandom(source);
|
||||
let idxs = new Set();
|
||||
|
||||
while (1) {
|
||||
@@ -337,6 +337,11 @@ export const cal = {
|
||||
}
|
||||
};
|
||||
|
||||
export function getDecimalCnt(num: number) {
|
||||
let str = num.toString();
|
||||
return str.split('.')[1]? str.split('.')[1].length: 0;
|
||||
}
|
||||
|
||||
//计算公式
|
||||
// export function calculateNum(ratio: { A: number, B: number }, params: { num: number }, defaultVal = 0) {
|
||||
// // result = a * num + b
|
||||
|
||||
@@ -2,265 +2,151 @@
|
||||
{
|
||||
"id": 1,
|
||||
"quality": 1,
|
||||
"starLevel": 1,
|
||||
"levelMin": 1,
|
||||
"levelMax": 20,
|
||||
"qualityLevel": 1,
|
||||
"preposition": "&",
|
||||
"honourConsume": "40005&40",
|
||||
"max": 1,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"quality": 2,
|
||||
"starLevel": 1,
|
||||
"levelMin": 1,
|
||||
"levelMax": 20,
|
||||
"preposition": "&",
|
||||
"quality": 1,
|
||||
"qualityLevel": 2,
|
||||
"preposition": "1&",
|
||||
"max": 2,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 19000,
|
||||
"timeConsume": 1200
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"quality": 3,
|
||||
"starLevel": 1,
|
||||
"levelMin": 1,
|
||||
"levelMax": 20,
|
||||
"preposition": "2&",
|
||||
"honourConsume": "40005&100",
|
||||
"quality": 1,
|
||||
"qualityLevel": 3,
|
||||
"preposition": "2&3",
|
||||
"max": 3,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 27000,
|
||||
"timeConsume": 1800
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"quality": 4,
|
||||
"starLevel": 1,
|
||||
"levelMin": 1,
|
||||
"levelMax": 20,
|
||||
"preposition": "3&",
|
||||
"honourConsume": "40005&140",
|
||||
"quality": 2,
|
||||
"qualityLevel": 1,
|
||||
"preposition": "1&",
|
||||
"max": 1,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 40000,
|
||||
"timeConsume": 2700
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"quality": 1,
|
||||
"starLevel": 2,
|
||||
"levelMin": 21,
|
||||
"levelMax": 40,
|
||||
"preposition": "&",
|
||||
"quality": 2,
|
||||
"qualityLevel": 2,
|
||||
"preposition": "2&4",
|
||||
"max": 2,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
"fundConsume": 40000,
|
||||
"timeConsume": 2700
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"quality": 2,
|
||||
"starLevel": 2,
|
||||
"levelMin": 21,
|
||||
"levelMax": 40,
|
||||
"preposition": "2&",
|
||||
"honourConsume": "40005&110",
|
||||
"qualityLevel": 3,
|
||||
"preposition": "3&5",
|
||||
"max": 3,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 31000,
|
||||
"timeConsume": 2700
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"quality": 3,
|
||||
"starLevel": 2,
|
||||
"levelMin": 21,
|
||||
"levelMax": 40,
|
||||
"preposition": "3&6",
|
||||
"honourConsume": "40005&160",
|
||||
"qualityLevel": 1,
|
||||
"preposition": "4&",
|
||||
"max": 1,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 45000,
|
||||
"timeConsume": 4800
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"quality": 4,
|
||||
"starLevel": 2,
|
||||
"levelMin": 21,
|
||||
"levelMax": 40,
|
||||
"preposition": "4&7",
|
||||
"honourConsume": "40005&210",
|
||||
"quality": 3,
|
||||
"qualityLevel": 2,
|
||||
"preposition": "5&7",
|
||||
"max": 2,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 60000,
|
||||
"timeConsume": 7200
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"quality": 1,
|
||||
"starLevel": 3,
|
||||
"levelMin": 41,
|
||||
"levelMax": 60,
|
||||
"preposition": "&",
|
||||
"honourConsume": "40005&100",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
"quality": 3,
|
||||
"qualityLevel": 3,
|
||||
"preposition": "6&8",
|
||||
"max": 3,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 40000,
|
||||
"timeConsume": 2700
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"quality": 2,
|
||||
"starLevel": 3,
|
||||
"levelMin": 41,
|
||||
"levelMax": 60,
|
||||
"preposition": "6&",
|
||||
"honourConsume": "40005&170",
|
||||
"quality": 4,
|
||||
"qualityLevel": 1,
|
||||
"preposition": "7&",
|
||||
"max": 1,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 48000,
|
||||
"timeConsume": 5400
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"quality": 3,
|
||||
"starLevel": 3,
|
||||
"levelMin": 41,
|
||||
"levelMax": 60,
|
||||
"preposition": "7&10",
|
||||
"honourConsume": "40005&230",
|
||||
"quality": 4,
|
||||
"qualityLevel": 2,
|
||||
"preposition": "8&10",
|
||||
"max": 2,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 66000,
|
||||
"timeConsume": 8400
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"quality": 4,
|
||||
"starLevel": 3,
|
||||
"levelMin": 41,
|
||||
"levelMax": 60,
|
||||
"preposition": "8&11",
|
||||
"honourConsume": "40005&300",
|
||||
"qualityLevel": 3,
|
||||
"preposition": "9&11",
|
||||
"max": 3,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 86000,
|
||||
"timeConsume": 10800
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"quality": 1,
|
||||
"starLevel": 4,
|
||||
"levelMin": 61,
|
||||
"levelMax": 80,
|
||||
"preposition": "&",
|
||||
"honourConsume": "40005&170",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
"quality": 5,
|
||||
"qualityLevel": 1,
|
||||
"preposition": "10&",
|
||||
"max": 1,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 40000,
|
||||
"timeConsume": 2700
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"quality": 2,
|
||||
"starLevel": 4,
|
||||
"levelMin": 61,
|
||||
"levelMax": 80,
|
||||
"preposition": "10&",
|
||||
"honourConsume": "40005&280",
|
||||
"quality": 5,
|
||||
"qualityLevel": 2,
|
||||
"preposition": "11&13",
|
||||
"max": 2,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 84000,
|
||||
"timeConsume": 10800
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"quality": 3,
|
||||
"starLevel": 4,
|
||||
"levelMin": 61,
|
||||
"levelMax": 80,
|
||||
"preposition": "11&14",
|
||||
"honourConsume": "40005&400",
|
||||
"quality": 5,
|
||||
"qualityLevel": 3,
|
||||
"preposition": "12&14",
|
||||
"max": 3,
|
||||
"honourConsume": "40005&70",
|
||||
"fundConsume": 115000,
|
||||
"timeConsume": 16800
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"quality": 4,
|
||||
"starLevel": 4,
|
||||
"levelMin": 61,
|
||||
"levelMax": 80,
|
||||
"preposition": "12&15",
|
||||
"honourConsume": "40005&540",
|
||||
"fundConsume": 150000,
|
||||
"timeConsume": 25200
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"quality": 1,
|
||||
"starLevel": 5,
|
||||
"levelMin": 81,
|
||||
"levelMax": 99,
|
||||
"preposition": "&",
|
||||
"honourConsume": "40005&270",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"quality": 2,
|
||||
"starLevel": 5,
|
||||
"levelMin": 81,
|
||||
"levelMax": 99,
|
||||
"preposition": "14&",
|
||||
"honourConsume": "40005&450",
|
||||
"fundConsume": 130000,
|
||||
"timeConsume": 18000
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"quality": 3,
|
||||
"starLevel": 5,
|
||||
"levelMin": 81,
|
||||
"levelMax": 99,
|
||||
"preposition": "15&18",
|
||||
"honourConsume": "40005&600",
|
||||
"fundConsume": 184000,
|
||||
"timeConsume": 28800
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"quality": 4,
|
||||
"starLevel": 5,
|
||||
"levelMin": 81,
|
||||
"levelMax": 99,
|
||||
"preposition": "16&19",
|
||||
"honourConsume": "40005&900",
|
||||
"fundConsume": 240000,
|
||||
"timeConsume": 36000
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"quality": 1,
|
||||
"starLevel": 6,
|
||||
"levelMin": 100,
|
||||
"levelMax": 100,
|
||||
"preposition": "&",
|
||||
"honourConsume": "40005&400",
|
||||
"fundConsume": 0,
|
||||
"timeConsume": 0
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"quality": 2,
|
||||
"starLevel": 6,
|
||||
"levelMin": 100,
|
||||
"levelMax": 100,
|
||||
"preposition": "18&",
|
||||
"honourConsume": "40005&700",
|
||||
"fundConsume": 190000,
|
||||
"timeConsume": 32400
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"quality": 3,
|
||||
"starLevel": 6,
|
||||
"levelMin": 100,
|
||||
"levelMax": 100,
|
||||
"preposition": "19&22",
|
||||
"honourConsume": "40005&1000",
|
||||
"fundConsume": 280000,
|
||||
"timeConsume": 46800
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"quality": 4,
|
||||
"starLevel": 6,
|
||||
"levelMin": 100,
|
||||
"levelMax": 100,
|
||||
"preposition": "20&23",
|
||||
"honourConsume": "40005&1350",
|
||||
"fundConsume": 380000,
|
||||
"timeConsume": 64800
|
||||
}
|
||||
]
|
||||
Executable → Regular
+20
-30
@@ -3,9 +3,8 @@
|
||||
"id": 1,
|
||||
"structureId": 2,
|
||||
"level": 1,
|
||||
"starProduce": 1,
|
||||
"levelProduce": 19,
|
||||
"qualityProduce": "1&2&3&4",
|
||||
"quality": 1,
|
||||
"levelProduce": "1&2&3",
|
||||
"consume": 50000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -14,9 +13,8 @@
|
||||
"id": 2,
|
||||
"structureId": 2,
|
||||
"level": 2,
|
||||
"starProduce": 2,
|
||||
"levelProduce": 19,
|
||||
"qualityProduce": "1&2&3&4",
|
||||
"quality": 2,
|
||||
"levelProduce": "1&2",
|
||||
"consume": 125000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -25,9 +23,8 @@
|
||||
"id": 3,
|
||||
"structureId": 2,
|
||||
"level": 3,
|
||||
"starProduce": 3,
|
||||
"levelProduce": 39,
|
||||
"qualityProduce": "1&2",
|
||||
"quality": 2,
|
||||
"levelProduce": "1&2&3",
|
||||
"consume": 350000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -36,9 +33,8 @@
|
||||
"id": 4,
|
||||
"structureId": 2,
|
||||
"level": 4,
|
||||
"starProduce": 3,
|
||||
"levelProduce": 39,
|
||||
"qualityProduce": "3&4",
|
||||
"quality": 3,
|
||||
"levelProduce": "1&2",
|
||||
"consume": 800000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -47,9 +43,8 @@
|
||||
"id": 5,
|
||||
"structureId": 2,
|
||||
"level": 5,
|
||||
"starProduce": 4,
|
||||
"levelProduce": 59,
|
||||
"qualityProduce": "1&2",
|
||||
"quality": 3,
|
||||
"levelProduce": "1&2&3",
|
||||
"consume": 1700000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -58,9 +53,8 @@
|
||||
"id": 6,
|
||||
"structureId": 2,
|
||||
"level": 6,
|
||||
"starProduce": 4,
|
||||
"levelProduce": 59,
|
||||
"qualityProduce": "3&4",
|
||||
"quality": 4,
|
||||
"levelProduce": "1&2",
|
||||
"consume": 3500000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -69,9 +63,8 @@
|
||||
"id": 7,
|
||||
"structureId": 2,
|
||||
"level": 7,
|
||||
"starProduce": 5,
|
||||
"levelProduce": 79,
|
||||
"qualityProduce": "1&2",
|
||||
"quality": 4,
|
||||
"levelProduce": "1&2&3",
|
||||
"consume": 6125000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -80,9 +73,8 @@
|
||||
"id": 8,
|
||||
"structureId": 2,
|
||||
"level": 8,
|
||||
"starProduce": 5,
|
||||
"levelProduce": 79,
|
||||
"qualityProduce": "3&4",
|
||||
"quality": 5,
|
||||
"levelProduce": "1&",
|
||||
"consume": 9125000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -91,9 +83,8 @@
|
||||
"id": 9,
|
||||
"structureId": 2,
|
||||
"level": 9,
|
||||
"starProduce": 6,
|
||||
"levelProduce": 99,
|
||||
"qualityProduce": "1&2",
|
||||
"quality": 5,
|
||||
"levelProduce": "2&",
|
||||
"consume": 13625000,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
@@ -102,9 +93,8 @@
|
||||
"id": 10,
|
||||
"structureId": 2,
|
||||
"level": 10,
|
||||
"starProduce": 6,
|
||||
"levelProduce": 100,
|
||||
"qualityProduce": "3&4",
|
||||
"quality": 5,
|
||||
"levelProduce": "3&",
|
||||
"consume": 99999999,
|
||||
"buildWords": "&",
|
||||
"imageName": "jttubiao_2"
|
||||
|
||||
Executable → Regular
+20
-40
@@ -3,120 +3,100 @@
|
||||
"id": 1,
|
||||
"structureId": 5,
|
||||
"level": 1,
|
||||
"wishgoodsEquip": "2&2",
|
||||
"wishgoodsDrawing": "2&2",
|
||||
"wishgoodsHero": "&",
|
||||
"consume": 50000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"structureId": 5,
|
||||
"level": 2,
|
||||
"wishgoodsEquip": "2&2|3&2",
|
||||
"wishgoodsDrawing": "2&2|3&2",
|
||||
"wishgoodsHero": "&",
|
||||
"consume": 125000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"structureId": 5,
|
||||
"level": 3,
|
||||
"wishgoodsEquip": "2&2|3&2",
|
||||
"wishgoodsDrawing": "2&2|3&2",
|
||||
"wishgoodsHero": "&",
|
||||
"consume": 350000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"structureId": 5,
|
||||
"level": 4,
|
||||
"wishgoodsEquip": "2&2|3&2",
|
||||
"wishgoodsDrawing": "2&2|3&2",
|
||||
"wishgoodsHero": "1&2",
|
||||
"consume": 800000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"structureId": 5,
|
||||
"level": 5,
|
||||
"wishgoodsEquip": "2&2|3&2|4&1",
|
||||
"wishgoodsDrawing": "2&2|3&2|4&1",
|
||||
"wishgoodsHero": "1&2",
|
||||
"consume": 1700000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"structureId": 5,
|
||||
"level": 6,
|
||||
"wishgoodsEquip": "2&2|3&2|4&2",
|
||||
"wishgoodsDrawing": "2&2|3&2|4&2",
|
||||
"wishgoodsHero": "1&2|2&1",
|
||||
"consume": 3500000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"structureId": 5,
|
||||
"level": 7,
|
||||
"wishgoodsEquip": "2&4|3&2|4&2",
|
||||
"wishgoodsDrawing": "2&4|3&2|4&2",
|
||||
"wishgoodsHero": "1&2|2&1",
|
||||
"consume": 6125000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"structureId": 5,
|
||||
"level": 8,
|
||||
"wishgoodsEquip": "2&8|3&2|4&2",
|
||||
"wishgoodsDrawing": "2&8|3&2|4&2",
|
||||
"wishgoodsHero": "1&2|2&1",
|
||||
"consume": 9125000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"structureId": 5,
|
||||
"level": 9,
|
||||
"wishgoodsEquip": "2&8|3&4|4&2",
|
||||
"wishgoodsDrawing": "2&8|3&4|4&2",
|
||||
"wishgoodsHero": "1&3|2&1|3&1",
|
||||
"consume": 13625000,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"structureId": 5,
|
||||
"level": 10,
|
||||
"wishgoodsEquip": "2&8|3&4|4&4",
|
||||
"wishgoodsDrawing": "2&8|3&4|4&4",
|
||||
"wishgoodsHero": "1&3|2&1|3&1",
|
||||
"consume": 99999999,
|
||||
"buildWords": "&",
|
||||
"imageID": "jttubiao_5",
|
||||
"__EMPTY": 0,
|
||||
"__EMPTY_1": 0
|
||||
"imageID": "jttubiao_5"
|
||||
}
|
||||
]
|
||||
@@ -2,7 +2,6 @@
|
||||
{
|
||||
"id": 1,
|
||||
"itid": 25,
|
||||
"starLevel": "&",
|
||||
"quality": 1,
|
||||
"honourReward": 40,
|
||||
"__EMPTY": 0,
|
||||
@@ -13,7 +12,6 @@
|
||||
{
|
||||
"id": 2,
|
||||
"itid": 25,
|
||||
"starLevel": "&",
|
||||
"quality": 2,
|
||||
"honourReward": 80,
|
||||
"__EMPTY": 0,
|
||||
@@ -24,7 +22,6 @@
|
||||
{
|
||||
"id": 3,
|
||||
"itid": 25,
|
||||
"starLevel": "&",
|
||||
"quality": 3,
|
||||
"honourReward": 200,
|
||||
"__EMPTY": 0,
|
||||
@@ -34,8 +31,7 @@
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"itid": 40,
|
||||
"starLevel": 1,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 20,
|
||||
"__EMPTY": 0,
|
||||
@@ -45,8 +41,7 @@
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"itid": 40,
|
||||
"starLevel": 1,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 50,
|
||||
"__EMPTY": 0,
|
||||
@@ -56,8 +51,7 @@
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"itid": 40,
|
||||
"starLevel": 1,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 70,
|
||||
"__EMPTY": 0,
|
||||
@@ -67,8 +61,7 @@
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"itid": 40,
|
||||
"starLevel": 1,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 80,
|
||||
"__EMPTY": 0,
|
||||
@@ -78,8 +71,7 @@
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"itid": 40,
|
||||
"starLevel": 2,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 40,
|
||||
"__EMPTY": 0,
|
||||
@@ -89,8 +81,7 @@
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"itid": 40,
|
||||
"starLevel": 2,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 80,
|
||||
"__EMPTY": 0,
|
||||
@@ -100,8 +91,7 @@
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"itid": 40,
|
||||
"starLevel": 2,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 90,
|
||||
"__EMPTY": 0,
|
||||
@@ -111,8 +101,7 @@
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"itid": 40,
|
||||
"starLevel": 2,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 110,
|
||||
"__EMPTY": 0,
|
||||
@@ -122,8 +111,7 @@
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"itid": 40,
|
||||
"starLevel": 3,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 70,
|
||||
"__EMPTY": 0,
|
||||
@@ -133,8 +121,7 @@
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"itid": 40,
|
||||
"starLevel": 3,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 100,
|
||||
"__EMPTY": 0,
|
||||
@@ -144,8 +131,7 @@
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"itid": 40,
|
||||
"starLevel": 3,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 130,
|
||||
"__EMPTY": 0,
|
||||
@@ -155,8 +141,7 @@
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"itid": 40,
|
||||
"starLevel": 3,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 140,
|
||||
"__EMPTY": 0,
|
||||
@@ -166,8 +151,7 @@
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"itid": 40,
|
||||
"starLevel": 4,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 120,
|
||||
"__EMPTY": 0,
|
||||
@@ -177,8 +161,7 @@
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"itid": 40,
|
||||
"starLevel": 4,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 160,
|
||||
"__EMPTY": 0,
|
||||
@@ -188,8 +171,7 @@
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"itid": 40,
|
||||
"starLevel": 4,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 190,
|
||||
"__EMPTY": 0,
|
||||
@@ -199,8 +181,7 @@
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"itid": 40,
|
||||
"starLevel": 4,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 210,
|
||||
"__EMPTY": 0,
|
||||
@@ -210,8 +191,7 @@
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"itid": 40,
|
||||
"starLevel": 5,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 150,
|
||||
"__EMPTY": 0,
|
||||
@@ -221,8 +201,7 @@
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"itid": 40,
|
||||
"starLevel": 5,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 200,
|
||||
"__EMPTY": 0,
|
||||
@@ -232,8 +211,7 @@
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"itid": 40,
|
||||
"starLevel": 5,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 220,
|
||||
"__EMPTY": 0,
|
||||
@@ -243,8 +221,7 @@
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"itid": 40,
|
||||
"starLevel": 5,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 240,
|
||||
"__EMPTY": 0,
|
||||
@@ -254,8 +231,7 @@
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"itid": 40,
|
||||
"starLevel": 6,
|
||||
"itid": 41,
|
||||
"quality": 1,
|
||||
"honourReward": 170,
|
||||
"__EMPTY": 0,
|
||||
@@ -265,8 +241,7 @@
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"itid": 40,
|
||||
"starLevel": 6,
|
||||
"itid": 41,
|
||||
"quality": 2,
|
||||
"honourReward": 230,
|
||||
"__EMPTY": 0,
|
||||
@@ -276,8 +251,7 @@
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"itid": 40,
|
||||
"starLevel": 6,
|
||||
"itid": 41,
|
||||
"quality": 3,
|
||||
"honourReward": 260,
|
||||
"__EMPTY": 0,
|
||||
@@ -287,8 +261,7 @@
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"itid": 40,
|
||||
"starLevel": 6,
|
||||
"itid": 41,
|
||||
"quality": 4,
|
||||
"honourReward": 330,
|
||||
"__EMPTY": 0,
|
||||
|
||||
+881
-47689
File diff suppressed because it is too large
Load Diff
@@ -1,99 +1,31 @@
|
||||
[
|
||||
{
|
||||
"itid": 1,
|
||||
"info": "短刀(神兵)"
|
||||
"info": "神兵"
|
||||
},
|
||||
{
|
||||
"itid": 2,
|
||||
"info": "长兵(神兵)"
|
||||
"info": "宝甲"
|
||||
},
|
||||
{
|
||||
"itid": 3,
|
||||
"info": "奇门(神兵)"
|
||||
"info": "冠冕"
|
||||
},
|
||||
{
|
||||
"itid": 4,
|
||||
"info": "弓弩(神兵)"
|
||||
"info": "行具"
|
||||
},
|
||||
{
|
||||
"itid": 5,
|
||||
"info": "剑(神兵)"
|
||||
"info": "典籍"
|
||||
},
|
||||
{
|
||||
"itid": 6,
|
||||
"info": "法器(神兵)"
|
||||
},
|
||||
{
|
||||
"itid": 7,
|
||||
"info": "备用(神兵)"
|
||||
},
|
||||
{
|
||||
"itid": 8,
|
||||
"info": "备用(神兵)"
|
||||
},
|
||||
{
|
||||
"itid": 9,
|
||||
"info": "头盔(冠冕)"
|
||||
},
|
||||
{
|
||||
"itid": 10,
|
||||
"info": "发冠(冠冕)"
|
||||
},
|
||||
{
|
||||
"itid": 11,
|
||||
"info": "头巾(冠冕)"
|
||||
},
|
||||
{
|
||||
"itid": 12,
|
||||
"info": "重铠(宝甲)"
|
||||
},
|
||||
{
|
||||
"itid": 13,
|
||||
"info": "轻甲(宝甲)"
|
||||
},
|
||||
{
|
||||
"itid": 14,
|
||||
"info": "布衣(宝甲)"
|
||||
},
|
||||
{
|
||||
"itid": 15,
|
||||
"info": "兵书(典籍)"
|
||||
},
|
||||
{
|
||||
"itid": 16,
|
||||
"info": "杂记(典籍)"
|
||||
},
|
||||
{
|
||||
"itid": 17,
|
||||
"info": "经典(典籍)"
|
||||
},
|
||||
{
|
||||
"itid": 18,
|
||||
"info": "马(行具)"
|
||||
},
|
||||
{
|
||||
"itid": 19,
|
||||
"info": "鞋(行具)"
|
||||
},
|
||||
{
|
||||
"itid": 20,
|
||||
"info": "车(行具)"
|
||||
},
|
||||
{
|
||||
"itid": 21,
|
||||
"info": "佩饰(礼器)"
|
||||
},
|
||||
{
|
||||
"itid": 22,
|
||||
"info": "钟鼎(礼器)"
|
||||
},
|
||||
{
|
||||
"itid": 23,
|
||||
"info": "印章(礼器)"
|
||||
"info": "饰品"
|
||||
},
|
||||
{
|
||||
"itid": 24,
|
||||
"info": "使用类物品(如宝箱)"
|
||||
"info": "礼包"
|
||||
},
|
||||
{
|
||||
"itid": 25,
|
||||
@@ -111,41 +43,21 @@
|
||||
"itid": 28,
|
||||
"info": "藏宝图"
|
||||
},
|
||||
{
|
||||
"itid": 29,
|
||||
"info": "礼器"
|
||||
},
|
||||
{
|
||||
"itid": 30,
|
||||
"info": "宝甲"
|
||||
},
|
||||
{
|
||||
"itid": 31,
|
||||
"info": "名驹"
|
||||
},
|
||||
{
|
||||
"itid": 32,
|
||||
"info": "典籍"
|
||||
},
|
||||
{
|
||||
"itid": 33,
|
||||
"info": "神兵"
|
||||
},
|
||||
{
|
||||
"itid": 34,
|
||||
"info": "代币"
|
||||
},
|
||||
{
|
||||
"itid": 35,
|
||||
"info": "消耗类物品(经验书)"
|
||||
"info": "经验书"
|
||||
},
|
||||
{
|
||||
"itid": 36,
|
||||
"info": "消耗类物品(好感道具)"
|
||||
"info": "名望道具"
|
||||
},
|
||||
{
|
||||
"itid": 38,
|
||||
"info": "消耗类物品(材料类)"
|
||||
"info": "材料"
|
||||
},
|
||||
{
|
||||
"itid": 39,
|
||||
@@ -157,7 +69,7 @@
|
||||
},
|
||||
{
|
||||
"itid": 41,
|
||||
"info": "图纸"
|
||||
"info": "套装图纸"
|
||||
},
|
||||
{
|
||||
"itid": 42,
|
||||
@@ -177,27 +89,23 @@
|
||||
},
|
||||
{
|
||||
"itid": 46,
|
||||
"info": "礼器宝石"
|
||||
"info": "饰品宝石"
|
||||
},
|
||||
{
|
||||
"itid": 47,
|
||||
"info": "典籍宝石"
|
||||
},
|
||||
{
|
||||
"itid": 48,
|
||||
"info": "灵玄石"
|
||||
},
|
||||
{
|
||||
"itid": 49,
|
||||
"info": "玩家好感道具"
|
||||
"info": "好感道具"
|
||||
},
|
||||
{
|
||||
"itid": 50,
|
||||
"info": "形象"
|
||||
"info": "头像"
|
||||
},
|
||||
{
|
||||
"itid": 51,
|
||||
"info": "形象框"
|
||||
"info": "头像框"
|
||||
},
|
||||
{
|
||||
"itid": 52,
|
||||
@@ -205,26 +113,34 @@
|
||||
},
|
||||
{
|
||||
"itid": 53,
|
||||
"info": "武将招募令"
|
||||
},
|
||||
{
|
||||
"itid": 54,
|
||||
"info": "礼包"
|
||||
"info": "招募令"
|
||||
},
|
||||
{
|
||||
"itid": 55,
|
||||
"info": "烧肉(体力道具)"
|
||||
"info": "体力道具"
|
||||
},
|
||||
{
|
||||
"itid": 56,
|
||||
"info": "普通骰子"
|
||||
},
|
||||
{
|
||||
"itid": 57,
|
||||
"info": "天机骰子"
|
||||
"info": "活动道具"
|
||||
},
|
||||
{
|
||||
"itid": 58,
|
||||
"info": "实体化经验"
|
||||
},
|
||||
{
|
||||
"itid": 59,
|
||||
"info": "武器天晶"
|
||||
},
|
||||
{
|
||||
"itid": 60,
|
||||
"info": "衣甲天晶"
|
||||
},
|
||||
{
|
||||
"itid": 61,
|
||||
"info": "冠冕天晶"
|
||||
},
|
||||
{
|
||||
"itid": 62,
|
||||
"info": "行具天晶"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,310 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "步兵武器",
|
||||
"jobClass": 1,
|
||||
"eplaceId": 1,
|
||||
"suitId": 1,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "步兵衣甲",
|
||||
"jobClass": 1,
|
||||
"eplaceId": 2,
|
||||
"suitId": 1,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "步兵冠冕",
|
||||
"jobClass": 1,
|
||||
"eplaceId": 3,
|
||||
"suitId": 1,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "步兵行具",
|
||||
"jobClass": 1,
|
||||
"eplaceId": 4,
|
||||
"suitId": 1,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "枪兵武器",
|
||||
"jobClass": 2,
|
||||
"eplaceId": 1,
|
||||
"suitId": 2,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "枪兵衣甲",
|
||||
"jobClass": 2,
|
||||
"eplaceId": 2,
|
||||
"suitId": 2,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "枪兵冠冕",
|
||||
"jobClass": 2,
|
||||
"eplaceId": 3,
|
||||
"suitId": 2,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "枪兵行具",
|
||||
"jobClass": 2,
|
||||
"eplaceId": 4,
|
||||
"suitId": 2,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "骑兵武器",
|
||||
"jobClass": 3,
|
||||
"eplaceId": 1,
|
||||
"suitId": 3,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "骑兵衣甲",
|
||||
"jobClass": 3,
|
||||
"eplaceId": 2,
|
||||
"suitId": 3,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "骑兵冠冕",
|
||||
"jobClass": 3,
|
||||
"eplaceId": 3,
|
||||
"suitId": 3,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "骑兵行具",
|
||||
"jobClass": 3,
|
||||
"eplaceId": 4,
|
||||
"suitId": 3,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "弓兵武器",
|
||||
"jobClass": 4,
|
||||
"eplaceId": 1,
|
||||
"suitId": 4,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "弓兵衣甲",
|
||||
"jobClass": 4,
|
||||
"eplaceId": 2,
|
||||
"suitId": 4,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "弓兵冠冕",
|
||||
"jobClass": 4,
|
||||
"eplaceId": 3,
|
||||
"suitId": 4,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "弓兵行具",
|
||||
"jobClass": 4,
|
||||
"eplaceId": 4,
|
||||
"suitId": 4,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"name": "游侠武器",
|
||||
"jobClass": 5,
|
||||
"eplaceId": 1,
|
||||
"suitId": 5,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "游侠衣甲",
|
||||
"jobClass": 5,
|
||||
"eplaceId": 2,
|
||||
"suitId": 5,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "游侠冠冕",
|
||||
"jobClass": 5,
|
||||
"eplaceId": 3,
|
||||
"suitId": 5,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"name": "游侠行具",
|
||||
"jobClass": 5,
|
||||
"eplaceId": 4,
|
||||
"suitId": 5,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "策士武器",
|
||||
"jobClass": 6,
|
||||
"eplaceId": 1,
|
||||
"suitId": 6,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "策士衣甲",
|
||||
"jobClass": 6,
|
||||
"eplaceId": 2,
|
||||
"suitId": 6,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "策士冠冕",
|
||||
"jobClass": 6,
|
||||
"eplaceId": 3,
|
||||
"suitId": 6,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "策士行具",
|
||||
"jobClass": 6,
|
||||
"eplaceId": 4,
|
||||
"suitId": 6,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"name": "医者武器",
|
||||
"jobClass": 7,
|
||||
"eplaceId": 1,
|
||||
"suitId": 7,
|
||||
"attribute": "2&10",
|
||||
"attributeUp": "2&10",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"name": "医者衣甲",
|
||||
"jobClass": 7,
|
||||
"eplaceId": 2,
|
||||
"suitId": 7,
|
||||
"attribute": "4&20",
|
||||
"attributeUp": "4&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"name": "医者冠冕",
|
||||
"jobClass": 7,
|
||||
"eplaceId": 3,
|
||||
"suitId": 7,
|
||||
"attribute": "5&20",
|
||||
"attributeUp": "5&20",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"name": "医者行具",
|
||||
"jobClass": 7,
|
||||
"eplaceId": 4,
|
||||
"suitId": 7,
|
||||
"attribute": "1&50",
|
||||
"attributeUp": "1&50",
|
||||
"composeMaterial": "31002&200",
|
||||
"imageId": "qingtongjian&bintiejian&wenshijian&jinggangjian&songwenjian"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"quality": 1,
|
||||
"star": 2,
|
||||
"jewelCnt": 0,
|
||||
"stoneCnt": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"quality": 2,
|
||||
"star": 4,
|
||||
"jewelCnt": 1,
|
||||
"stoneCnt": 0
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"quality": 3,
|
||||
"star": 6,
|
||||
"jewelCnt": 1,
|
||||
"stoneCnt": 1
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"quality": 4,
|
||||
"star": 8,
|
||||
"jewelCnt": 1,
|
||||
"stoneCnt": 2
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"quality": 5,
|
||||
"star": 12,
|
||||
"jewelCnt": 1,
|
||||
"stoneCnt": 3
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,502 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"lv": 1,
|
||||
"consume": "&"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"lv": 2,
|
||||
"consume": "31002&4000"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"lv": 3,
|
||||
"consume": "31002&6000"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"lv": 4,
|
||||
"consume": "31002&8000"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"lv": 5,
|
||||
"consume": "31002&10000"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"lv": 6,
|
||||
"consume": "31002&12000"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"lv": 7,
|
||||
"consume": "31002&14000"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"lv": 8,
|
||||
"consume": "31002&16000"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"lv": 9,
|
||||
"consume": "31002&18000"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"lv": 10,
|
||||
"consume": "31002&20000"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"lv": 11,
|
||||
"consume": "31002&22000"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"lv": 12,
|
||||
"consume": "31002&24000"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"lv": 13,
|
||||
"consume": "31002&26000"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"lv": 14,
|
||||
"consume": "31002&28000"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"lv": 15,
|
||||
"consume": "31002&30000"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"lv": 16,
|
||||
"consume": "31002&32000"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"lv": 17,
|
||||
"consume": "31002&34000"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"lv": 18,
|
||||
"consume": "31002&36000"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"lv": 19,
|
||||
"consume": "31002&38000"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"lv": 20,
|
||||
"consume": "31002&40000"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"lv": 21,
|
||||
"consume": "31002&42000"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"lv": 22,
|
||||
"consume": "31002&44000"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"lv": 23,
|
||||
"consume": "31002&46000"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"lv": 24,
|
||||
"consume": "31002&48000"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"lv": 25,
|
||||
"consume": "31002&50000"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"lv": 26,
|
||||
"consume": "31002&52000"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"lv": 27,
|
||||
"consume": "31002&54000"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"lv": 28,
|
||||
"consume": "31002&56000"
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"lv": 29,
|
||||
"consume": "31002&58000"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"lv": 30,
|
||||
"consume": "31002&60000"
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"lv": 31,
|
||||
"consume": "31002&62000"
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"lv": 32,
|
||||
"consume": "31002&64000"
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"lv": 33,
|
||||
"consume": "31002&66000"
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"lv": 34,
|
||||
"consume": "31002&68000"
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"lv": 35,
|
||||
"consume": "31002&70000"
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"lv": 36,
|
||||
"consume": "31002&72000"
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"lv": 37,
|
||||
"consume": "31002&74000"
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"lv": 38,
|
||||
"consume": "31002&76000"
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"lv": 39,
|
||||
"consume": "31002&78000"
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"lv": 40,
|
||||
"consume": "31002&80000"
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"lv": 41,
|
||||
"consume": "31002&82000"
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"lv": 42,
|
||||
"consume": "31002&84000"
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"lv": 43,
|
||||
"consume": "31002&86000"
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"lv": 44,
|
||||
"consume": "31002&88000"
|
||||
},
|
||||
{
|
||||
"id": 45,
|
||||
"lv": 45,
|
||||
"consume": "31002&90000"
|
||||
},
|
||||
{
|
||||
"id": 46,
|
||||
"lv": 46,
|
||||
"consume": "31002&92000"
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"lv": 47,
|
||||
"consume": "31002&94000"
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"lv": 48,
|
||||
"consume": "31002&96000"
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"lv": 49,
|
||||
"consume": "31002&98000"
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"lv": 50,
|
||||
"consume": "31002&100000"
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"lv": 51,
|
||||
"consume": "31002&102000"
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"lv": 52,
|
||||
"consume": "31002&104000"
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"lv": 53,
|
||||
"consume": "31002&106000"
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"lv": 54,
|
||||
"consume": "31002&108000"
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"lv": 55,
|
||||
"consume": "31002&110000"
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"lv": 56,
|
||||
"consume": "31002&112000"
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"lv": 57,
|
||||
"consume": "31002&114000"
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"lv": 58,
|
||||
"consume": "31002&116000"
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"lv": 59,
|
||||
"consume": "31002&118000"
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"lv": 60,
|
||||
"consume": "31002&120000"
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"lv": 61,
|
||||
"consume": "31002&122000"
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"lv": 62,
|
||||
"consume": "31002&124000"
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"lv": 63,
|
||||
"consume": "31002&126000"
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"lv": 64,
|
||||
"consume": "31002&128000"
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"lv": 65,
|
||||
"consume": "31002&130000"
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"lv": 66,
|
||||
"consume": "31002&132000"
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"lv": 67,
|
||||
"consume": "31002&134000"
|
||||
},
|
||||
{
|
||||
"id": 68,
|
||||
"lv": 68,
|
||||
"consume": "31002&136000"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"lv": 69,
|
||||
"consume": "31002&138000"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"lv": 70,
|
||||
"consume": "31002&140000"
|
||||
},
|
||||
{
|
||||
"id": 71,
|
||||
"lv": 71,
|
||||
"consume": "31002&142000"
|
||||
},
|
||||
{
|
||||
"id": 72,
|
||||
"lv": 72,
|
||||
"consume": "31002&144000"
|
||||
},
|
||||
{
|
||||
"id": 73,
|
||||
"lv": 73,
|
||||
"consume": "31002&146000"
|
||||
},
|
||||
{
|
||||
"id": 74,
|
||||
"lv": 74,
|
||||
"consume": "31002&148000"
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"lv": 75,
|
||||
"consume": "31002&150000"
|
||||
},
|
||||
{
|
||||
"id": 76,
|
||||
"lv": 76,
|
||||
"consume": "31002&152000"
|
||||
},
|
||||
{
|
||||
"id": 77,
|
||||
"lv": 77,
|
||||
"consume": "31002&154000"
|
||||
},
|
||||
{
|
||||
"id": 78,
|
||||
"lv": 78,
|
||||
"consume": "31002&156000"
|
||||
},
|
||||
{
|
||||
"id": 79,
|
||||
"lv": 79,
|
||||
"consume": "31002&158000"
|
||||
},
|
||||
{
|
||||
"id": 80,
|
||||
"lv": 80,
|
||||
"consume": "31002&160000"
|
||||
},
|
||||
{
|
||||
"id": 81,
|
||||
"lv": 81,
|
||||
"consume": "31002&162000"
|
||||
},
|
||||
{
|
||||
"id": 82,
|
||||
"lv": 82,
|
||||
"consume": "31002&164000"
|
||||
},
|
||||
{
|
||||
"id": 83,
|
||||
"lv": 83,
|
||||
"consume": "31002&166000"
|
||||
},
|
||||
{
|
||||
"id": 84,
|
||||
"lv": 84,
|
||||
"consume": "31002&168000"
|
||||
},
|
||||
{
|
||||
"id": 85,
|
||||
"lv": 85,
|
||||
"consume": "31002&170000"
|
||||
},
|
||||
{
|
||||
"id": 86,
|
||||
"lv": 86,
|
||||
"consume": "31002&172000"
|
||||
},
|
||||
{
|
||||
"id": 87,
|
||||
"lv": 87,
|
||||
"consume": "31002&174000"
|
||||
},
|
||||
{
|
||||
"id": 88,
|
||||
"lv": 88,
|
||||
"consume": "31002&176000"
|
||||
},
|
||||
{
|
||||
"id": 89,
|
||||
"lv": 89,
|
||||
"consume": "31002&178000"
|
||||
},
|
||||
{
|
||||
"id": 90,
|
||||
"lv": 90,
|
||||
"consume": "31002&180000"
|
||||
},
|
||||
{
|
||||
"id": 91,
|
||||
"lv": 91,
|
||||
"consume": "31002&182000"
|
||||
},
|
||||
{
|
||||
"id": 92,
|
||||
"lv": 92,
|
||||
"consume": "31002&184000"
|
||||
},
|
||||
{
|
||||
"id": 93,
|
||||
"lv": 93,
|
||||
"consume": "31002&186000"
|
||||
},
|
||||
{
|
||||
"id": 94,
|
||||
"lv": 94,
|
||||
"consume": "31002&188000"
|
||||
},
|
||||
{
|
||||
"id": 95,
|
||||
"lv": 95,
|
||||
"consume": "31002&190000"
|
||||
},
|
||||
{
|
||||
"id": 96,
|
||||
"lv": 96,
|
||||
"consume": "31002&192000"
|
||||
},
|
||||
{
|
||||
"id": 97,
|
||||
"lv": 97,
|
||||
"consume": "31002&194000"
|
||||
},
|
||||
{
|
||||
"id": 98,
|
||||
"lv": 98,
|
||||
"consume": "31002&196000"
|
||||
},
|
||||
{
|
||||
"id": 99,
|
||||
"lv": 99,
|
||||
"consume": "31002&198000"
|
||||
},
|
||||
{
|
||||
"id": 100,
|
||||
"lv": 100,
|
||||
"consume": "31002&200000"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,44 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"jobClass": 1,
|
||||
"equips": "1&2&3&4",
|
||||
"effect": "4&10011|8&10013|12&80003"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"jobClass": 2,
|
||||
"equips": "5&6&7&8",
|
||||
"effect": "4&20011|8&10012|12&80023"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"jobClass": 3,
|
||||
"equips": "9&10&11&12",
|
||||
"effect": "4&60032|8&60034|12&80002"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"jobClass": 4,
|
||||
"equips": "13&14&15&16",
|
||||
"effect": "4&10011|8&10013|12&80003"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"jobClass": 5,
|
||||
"equips": "17&18&19&20",
|
||||
"effect": "4&20011|8&10012|12&80023"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"jobClass": 6,
|
||||
"equips": "21&22&23&24",
|
||||
"effect": "4&60032|8&60034|12&80002"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"jobClass": 7,
|
||||
"equips": "25&26&27&28",
|
||||
"effect": "4&60032|8&60034|12&80002"
|
||||
}
|
||||
]
|
||||
@@ -25,7 +25,7 @@
|
||||
"count": "1&5",
|
||||
"free": "1&1",
|
||||
"cost": "22002&1",
|
||||
"percent": "4&5|5&15|6&15|7&10|8&10|9&15|10&10|13&5|14&10|15&5",
|
||||
"percent": "4&5|5&15|6&15|7&15|8&15|9&15|10&10|11&10",
|
||||
"floorReward": 1,
|
||||
"indirectId": 2
|
||||
},
|
||||
|
||||
@@ -0,0 +1,542 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"good_id": 80001,
|
||||
"name": "一阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33001,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6001
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"good_id": 80002,
|
||||
"name": "二阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33002,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6002
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"good_id": 80003,
|
||||
"name": "三阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33003,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6003
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"good_id": 80004,
|
||||
"name": "四阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33004,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6004
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"good_id": 80005,
|
||||
"name": "五阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33005,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6005
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"good_id": 80006,
|
||||
"name": "六阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33006,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6006
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"good_id": 80007,
|
||||
"name": "七阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33007,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6007
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"good_id": 80008,
|
||||
"name": "八阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33008,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6008
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"good_id": 80009,
|
||||
"name": "九阶武器天晶",
|
||||
"eplaceId": 1,
|
||||
"itId": 59,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068&80054&80089",
|
||||
"mapGoodId": 33009,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6009
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"good_id": 80011,
|
||||
"name": "一阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33010,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6010
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"good_id": 80012,
|
||||
"name": "二阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33011,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6011
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"good_id": 80013,
|
||||
"name": "三阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33012,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6012
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"good_id": 80014,
|
||||
"name": "四阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33013,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6013
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"good_id": 80015,
|
||||
"name": "五阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33014,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6014
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"good_id": 80016,
|
||||
"name": "六阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33015,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6015
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"good_id": 80017,
|
||||
"name": "七阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33016,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6016
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"good_id": 80018,
|
||||
"name": "八阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33017,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6017
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"good_id": 80019,
|
||||
"name": "九阶衣甲天晶",
|
||||
"eplaceId": 2,
|
||||
"itId": 60,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&60034&80001&80012&80033&80047&80075",
|
||||
"mapGoodId": 33018,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6018
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"good_id": 80021,
|
||||
"name": "一阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33019,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6019
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"good_id": 80022,
|
||||
"name": "二阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33020,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6020
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"good_id": 80023,
|
||||
"name": "三阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33021,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6021
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"good_id": 80024,
|
||||
"name": "四阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33022,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6022
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"good_id": 80025,
|
||||
"name": "五阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33023,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6023
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"good_id": 80026,
|
||||
"name": "六阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33024,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6024
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"good_id": 80027,
|
||||
"name": "七阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33025,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6025
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"good_id": 80028,
|
||||
"name": "八阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33026,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6026
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"good_id": 80029,
|
||||
"name": "九阶冠冕天晶",
|
||||
"eplaceId": 3,
|
||||
"itId": 61,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60032&40035&80001&80019&80033&80047&80082",
|
||||
"mapGoodId": 33027,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6027
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"good_id": 80031,
|
||||
"name": "一阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33028,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6028
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"good_id": 80032,
|
||||
"name": "二阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33029,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6029
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"good_id": 80033,
|
||||
"name": "三阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33030,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6030
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"good_id": 80034,
|
||||
"name": "四阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"effectCount": 2,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33031,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6031
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"good_id": 80035,
|
||||
"name": "五阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33032,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6032
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"good_id": 80036,
|
||||
"name": "六阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"effectCount": 3,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33033,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6033
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"good_id": 80037,
|
||||
"name": "七阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33034,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6034
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"good_id": 80038,
|
||||
"name": "八阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33035,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6035
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"good_id": 80039,
|
||||
"name": "九阶行具天晶",
|
||||
"eplaceId": 4,
|
||||
"itId": 62,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"effectCount": 4,
|
||||
"randomEffect": "60031&10033&80002&80005&80026&80040&80061&80068",
|
||||
"mapGoodId": 33036,
|
||||
"quenchConsume": "31001&500",
|
||||
"successConsume": "17057&100",
|
||||
"gkId": 6036
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,184 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"jewelLv": 1,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"jewelLv": 1,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"jewelLv": 2,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"jewelLv": 2,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 2
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"jewelLv": 3,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"jewelLv": 3,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 3
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"jewelLv": 4,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"jewelLv": 4,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 4
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"jewelLv": 5,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"jewelLv": 5,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 5
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"jewelLv": 5,
|
||||
"randSeId": 3,
|
||||
"stoneCnt": 2,
|
||||
"stoneLv": 10
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"jewelLv": 6,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"jewelLv": 6,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 6
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"jewelLv": 6,
|
||||
"randSeId": 3,
|
||||
"stoneCnt": 2,
|
||||
"stoneLv": 12
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"jewelLv": 7,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"jewelLv": 7,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 7
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"jewelLv": 7,
|
||||
"randSeId": 3,
|
||||
"stoneCnt": 2,
|
||||
"stoneLv": 14
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"jewelLv": 7,
|
||||
"randSeId": 4,
|
||||
"stoneCnt": 3,
|
||||
"stoneLv": 21
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"jewelLv": 8,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"jewelLv": 8,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 8
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"jewelLv": 8,
|
||||
"randSeId": 3,
|
||||
"stoneCnt": 2,
|
||||
"stoneLv": 16
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"jewelLv": 8,
|
||||
"randSeId": 4,
|
||||
"stoneCnt": 3,
|
||||
"stoneLv": 24
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"jewelLv": 9,
|
||||
"randSeId": 1,
|
||||
"stoneCnt": 0,
|
||||
"stoneLv": 0
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"jewelLv": 9,
|
||||
"randSeId": 2,
|
||||
"stoneCnt": 1,
|
||||
"stoneLv": 9
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"jewelLv": 9,
|
||||
"randSeId": 3,
|
||||
"stoneCnt": 2,
|
||||
"stoneLv": 18
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"jewelLv": 9,
|
||||
"randSeId": 4,
|
||||
"stoneCnt": 3,
|
||||
"stoneLv": 27
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,83 +29,48 @@
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "适用等级蓝色藏宝图",
|
||||
"type": 3,
|
||||
"name": "随机一阶地玉",
|
||||
"type": 4,
|
||||
"param": "1&",
|
||||
"count": 4
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "适用等级紫色藏宝图",
|
||||
"type": 3,
|
||||
"name": "随机二级地玉",
|
||||
"type": 4,
|
||||
"param": "2&",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "适用等级橙色藏宝图",
|
||||
"type": 3,
|
||||
"name": "随机三级地玉",
|
||||
"type": 4,
|
||||
"param": "3&",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "适用等级红色藏宝图",
|
||||
"type": 3,
|
||||
"name": "随机四级地玉",
|
||||
"type": 4,
|
||||
"param": "4&",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "随机一级宝石",
|
||||
"type": 4,
|
||||
"param": "1&",
|
||||
"count": 4
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "随机二级宝石",
|
||||
"type": 4,
|
||||
"param": "2&",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "随机三级宝石",
|
||||
"type": 4,
|
||||
"param": "3&",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "随机四级宝石",
|
||||
"type": 4,
|
||||
"param": "4&",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "适用等级的套装图纸",
|
||||
"type": 6,
|
||||
"param": "&",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "武将碎片 * 5",
|
||||
"type": 2,
|
||||
"param": "0&",
|
||||
"count": 5
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"id": 10,
|
||||
"name": "武将碎片 *10",
|
||||
"type": 2,
|
||||
"param": "0&",
|
||||
"count": 10
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"id": 11,
|
||||
"name": "强化神像素材",
|
||||
"type": 5,
|
||||
"param": "17054&",
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"good_id": 60001,
|
||||
"name": "一阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"composeMaterial": "&",
|
||||
"attribute": "2&100"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"good_id": 60002,
|
||||
"name": "二阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"composeMaterial": "60001&3",
|
||||
"attribute": "2&400"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"good_id": 60003,
|
||||
"name": "三阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60002&3",
|
||||
"attribute": "2&900"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"good_id": 60004,
|
||||
"name": "四阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60003&3",
|
||||
"attribute": "2&1600"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"good_id": 60005,
|
||||
"name": "五阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60004&3",
|
||||
"attribute": "2&2500"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"good_id": 60006,
|
||||
"name": "六阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60005&3",
|
||||
"attribute": "2&3600"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"good_id": 60007,
|
||||
"name": "七阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60006&3|17056&9",
|
||||
"attribute": "2&4900"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"good_id": 60008,
|
||||
"name": "八阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60007&3|17056&9",
|
||||
"attribute": "2&6400"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"good_id": 60009,
|
||||
"name": "九阶赤焰钻",
|
||||
"eplaceId": 1,
|
||||
"itId": 42,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"composeMaterial": "60008&3|17056&9",
|
||||
"attribute": "2&8000"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"good_id": 60011,
|
||||
"name": "一阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"composeMaterial": "&",
|
||||
"attribute": "4&60"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"good_id": 60012,
|
||||
"name": "二阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"composeMaterial": "60011&3",
|
||||
"attribute": "4&240"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"good_id": 60013,
|
||||
"name": "三阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60012&3",
|
||||
"attribute": "4&540"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"good_id": 60014,
|
||||
"name": "四阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60013&3",
|
||||
"attribute": "4&960"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"good_id": 60015,
|
||||
"name": "五阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60014&3",
|
||||
"attribute": "4&1500"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"good_id": 60016,
|
||||
"name": "六阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60015&3",
|
||||
"attribute": "4&2160"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"good_id": 60017,
|
||||
"name": "七阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60016&3|17056&9",
|
||||
"attribute": "4&2940"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"good_id": 60018,
|
||||
"name": "八阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60017&3|17056&9",
|
||||
"attribute": "4&3840"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"good_id": 60019,
|
||||
"name": "九阶暗芒皓",
|
||||
"eplaceId": 2,
|
||||
"itId": 43,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"composeMaterial": "60018&3|17056&9",
|
||||
"attribute": "4&4800"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"good_id": 60021,
|
||||
"name": "一阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"composeMaterial": "&",
|
||||
"attribute": "5&60"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"good_id": 60022,
|
||||
"name": "二阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"composeMaterial": "60021&3",
|
||||
"attribute": "5&240"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"good_id": 60023,
|
||||
"name": "三阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60022&3",
|
||||
"attribute": "5&540"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"good_id": 60024,
|
||||
"name": "四阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60023&3",
|
||||
"attribute": "5&960"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"good_id": 60025,
|
||||
"name": "五阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60024&3",
|
||||
"attribute": "5&1500"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"good_id": 60026,
|
||||
"name": "六阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60025&3",
|
||||
"attribute": "5&2160"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"good_id": 60027,
|
||||
"name": "七阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60026&3|17056&9",
|
||||
"attribute": "5&2940"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"good_id": 60028,
|
||||
"name": "八阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60027&3|17056&9",
|
||||
"attribute": "5&3840"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"good_id": 60029,
|
||||
"name": "九阶昆仑玉",
|
||||
"eplaceId": 3,
|
||||
"itId": 44,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"composeMaterial": "60028&3|17056&9",
|
||||
"attribute": "5&4800"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"good_id": 60031,
|
||||
"name": "一阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 1,
|
||||
"quality": 1,
|
||||
"composeMaterial": "&",
|
||||
"attribute": "1&200"
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"good_id": 60032,
|
||||
"name": "二阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 2,
|
||||
"quality": 1,
|
||||
"composeMaterial": "60031&3",
|
||||
"attribute": "1&800"
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"good_id": 60033,
|
||||
"name": "三阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 3,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60032&3",
|
||||
"attribute": "1&1800"
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"good_id": 60034,
|
||||
"name": "四阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 4,
|
||||
"quality": 2,
|
||||
"composeMaterial": "60033&3",
|
||||
"attribute": "1&3200"
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"good_id": 60035,
|
||||
"name": "五阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 5,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60034&3",
|
||||
"attribute": "1&5000"
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"good_id": 60036,
|
||||
"name": "六阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 6,
|
||||
"quality": 3,
|
||||
"composeMaterial": "60035&3",
|
||||
"attribute": "1&7200"
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"good_id": 60037,
|
||||
"name": "七阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 7,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60036&3|17056&9",
|
||||
"attribute": "1&9800"
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"good_id": 60038,
|
||||
"name": "八阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 8,
|
||||
"quality": 4,
|
||||
"composeMaterial": "60037&3|17056&9",
|
||||
"attribute": "1&12800"
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"good_id": 60039,
|
||||
"name": "九阶风灵石",
|
||||
"eplaceId": 4,
|
||||
"itId": 45,
|
||||
"lv": 9,
|
||||
"quality": 5,
|
||||
"composeMaterial": "60038&3|17056&9",
|
||||
"attribute": "1&16000"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user