✨ feat(宝物): 宝物seqId修改

This commit is contained in:
luying
2023-03-31 13:41:00 +08:00
parent da747a7fba
commit 2caf169055
10 changed files with 36 additions and 32 deletions
@@ -201,15 +201,15 @@ export class ArtifactHandler {
let serverId: number = session.get('serverId');
let taskCount = 0;
const batchCode = genCode(10), delSeqIds: number[] = [];
const batchCode = genCode(10), delSeqIds: (number|string)[] = [];
for(let [_, { quality, canComposeAll }] of gameData.artifactQualityById) {
if(!canComposeAll) continue;
let artifacts = await ArtifactModel.findByQuality(roleId, quality);
let used: number[] = [], materials: ItemInter[] = [], target: ArtifactModelUpdate[] = [];
let used: (number|string)[] = [], materials: ItemInter[] = [], target: ArtifactModelUpdate[] = [];
for(let artifact of artifacts) {
if(used.indexOf(artifact.seqId) > -1) continue;
let tmpUsed: number[] = [artifact.seqId];
let tmpUsed: (number|string)[] = [artifact.seqId];
let dicNextArtifact = getNextArtifact(artifact.artifactId);
if(!dicNextArtifact) continue;
@@ -336,7 +336,7 @@ export class ArtifactHandler {
let artifacts = await ArtifactModel.findbySeqIds(roleId, seqIds);
if (artifacts.length < seqIds.length) return resResult(STATUS.ARTIFACT_IS_NOT_FIND);
let cost: ItemInter[] = [], add: ItemInter[] = [], delSeqIds: number[] = [];
let cost: ItemInter[] = [], add: ItemInter[] = [], delSeqIds: (number|string)[] = [];
for(let artifact of artifacts) {
if(artifact.hid > 0 || hasArtifactStrength(artifact)) return resResult(STATUS.ARTIFACT_CANNOT_DECOMPOSE);
let dicArtifact = getArtifactWithQuality(artifact.artifactId);