✨ feat(将魂出售): 修复将魂回收的问题
4cfbce94e - 2fa8c7a91 by zhangxk
This commit is contained in:
@@ -1983,8 +1983,8 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "role.shopHandler.recycleSoulFast":
|
||||
{
|
||||
if (!checkNaturalArray(msg.recycleSoulFastPara)) return false;
|
||||
for (let { hid, goodsId, count } of msg.recycleSoulFastPara) {
|
||||
if (!checkNaturalNumbers(hid, goodsId, count)) return false;
|
||||
for (let { hid, count } of msg.recycleSoulFastPara) {
|
||||
if (!checkNaturalNumbers(hid, count)) return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -362,8 +362,6 @@ export async function getComposeStoneCostAndAdd(curItem, itId) {
|
||||
export async function calUpSixColorsResidueFragment(roleId: string, hero: HeroType, hid: number, count?: number) {
|
||||
let needFragment = 0;
|
||||
|
||||
// if (isHeroHidden(hid)) return;
|
||||
|
||||
let dicHero = gameData.hero.get(hid);
|
||||
if (!dicHero) return;
|
||||
let { pieceId, jobid } = dicHero;
|
||||
@@ -371,9 +369,6 @@ export async function calUpSixColorsResidueFragment(roleId: string, hero: HeroTy
|
||||
let dicJob = gameData.job.get(jobid);
|
||||
if (!dicJob) return;
|
||||
|
||||
// let hero = await HeroModel.findByHidAndRole(hid, roleId);
|
||||
// if (!hero) return;
|
||||
|
||||
let curItemCount = count;
|
||||
if (!count) {
|
||||
let item = await ItemModel.findbyRoleAndGid(roleId, pieceId);
|
||||
@@ -387,7 +382,11 @@ export async function calUpSixColorsResidueFragment(roleId: string, hero: HeroTy
|
||||
if (oldStar < HERO_GROW_MAX.STAR) {
|
||||
for (let starIndex = oldStar; starIndex < HERO_GROW_MAX.STAR; starIndex++) {
|
||||
const curDicHeroStar = getHeroStarByQuality(dicJob.job_class, oldQuality, starIndex);
|
||||
needFragment += (curDicHeroStar?.advanceUpFragmentNum || 0) * (ABI_STAGE.END - oldStarStage);
|
||||
if (starIndex == oldStar) {
|
||||
needFragment += (curDicHeroStar?.advanceUpFragmentNum || 0) * (ABI_STAGE.END - oldStarStage);
|
||||
continue;
|
||||
}
|
||||
needFragment += (curDicHeroStar?.advanceUpFragmentNum || 0) * ABI_STAGE.END;
|
||||
}
|
||||
}
|
||||
if (curItemCount < needFragment) return;
|
||||
@@ -396,7 +395,7 @@ export async function calUpSixColorsResidueFragment(roleId: string, hero: HeroTy
|
||||
if (oldQuality < HERO_GROW_MAX.QUALITY) {
|
||||
for (let qualityIndex = oldQuality; qualityIndex < HERO_GROW_MAX.QUALITY; qualityIndex++) {
|
||||
const curDicHeroQualityUp = gameData.heroQualityUp.get(qualityIndex);
|
||||
needFragment += curDicHeroQualityUp?.fragmentNum || 0
|
||||
needFragment += curDicHeroQualityUp?.fragmentNum || 0;
|
||||
}
|
||||
}
|
||||
if (curItemCount < needFragment) return;
|
||||
@@ -409,7 +408,11 @@ export async function calUpSixColorsResidueFragment(roleId: string, hero: HeroTy
|
||||
needFragment += curDicHeroStar?.fragmentNum || 0;
|
||||
continue;
|
||||
}
|
||||
needFragment += (curDicHeroStar?.fragmentNum || 0) * (ABI_STAGE.END - oldColorStarStage)
|
||||
if (colorStarIndex == oldColorStar) {
|
||||
needFragment += (curDicHeroStar?.fragmentNum || 0) * (ABI_STAGE.END - oldColorStarStage);
|
||||
continue;
|
||||
}
|
||||
needFragment += (curDicHeroStar?.fragmentNum || 0) * ABI_STAGE.END;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user