From 10653ed8f9e8592b54e7a36197d918f6548d560a Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 11 Jan 2023 16:23:47 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=F0=9F=90=9E=20fix(=E5=AE=9D=E7=89=A9?= =?UTF-8?q?):=20=E8=AF=8D=E6=9D=A1=E7=AD=96=E5=88=92=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=81=9A=E6=88=98=E5=9C=BA=E5=A4=96=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=93=8D=E4=BD=9C=E6=95=85=E5=88=A0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 223e14a28de86224bf7accfaf9af133b83742bb3. --- game-server/app/services/playerCeService.ts | 8 ++-- game-server/app/services/role/calCe.ts | 47 ++++++++++----------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/game-server/app/services/playerCeService.ts b/game-server/app/services/playerCeService.ts index 0a9ec57ce..abea54d95 100644 --- a/game-server/app/services/playerCeService.ts +++ b/game-server/app/services/playerCeService.ts @@ -146,7 +146,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve } calCe.setEquipSuit(hid, skinId, ePlace); calCe.setTalent(hid, skins); - // if(artifact) calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); + if(artifact) calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); } break; } @@ -365,7 +365,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve for(let [hid ] of heroUpdates) { calCe.setPutArtifact(hid, skinId, job, artifact); calCe.setArtifactQuality(hid, artifact.artifactId); - // calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); + calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); ceChangeTxt.push(`武将 ${hid} 装备宝物 ${artifact.artifactId}`); } break; @@ -394,7 +394,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve if(!artifact) break; for(let [hid ] of heroUpdates) { calCe.setArtifactQuality(hid, artifact.artifactId); - // calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); + calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); ceChangeTxt.push(`武将 ${hid} 装备的宝物 ${artifact.seqId} 升至 ${artifact.artifactId}`); } break; @@ -406,7 +406,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve for(let [hid ] of heroUpdates) { calCe.setArtifactLv(hid, artifact.artifactId, artifact.lv); calCe.setArtifactQuality(hid, artifact.artifactId); - // calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); + calCe.setArtifactSeid(hid, skinId, job, artifact.artifactId); ceChangeTxt.push(`武将 ${hid} 装备的宝物 ${artifact.seqId} 转换至 ${artifact.artifactId}`); } break; diff --git a/game-server/app/services/role/calCe.ts b/game-server/app/services/role/calCe.ts index 0b296a289..3e37a0e0b 100644 --- a/game-server/app/services/role/calCe.ts +++ b/game-server/app/services/role/calCe.ts @@ -528,7 +528,7 @@ export class CalCe { if(artifact) { this.setArtifactLv(hid, artifact.artifactId, artifact.lv); this.setArtifactQuality(hid, artifact.artifactId); - // this.setArtifactSeid(hid, skinId, job, artifact.lv); + this.setArtifactSeid(hid, skinId, job, artifact.lv); } } @@ -566,32 +566,31 @@ export class CalCe { } } - // 宝物词条不涉及战场外面板 - // // 宝物词条 - // public setArtifactSeid(hid: number, skinId: number, job: number, artifactId: number) { - // this.data.clearHeroAttrByHid(hid, 'artifactSeid'); + // 宝物词条 + public setArtifactSeid(hid: number, skinId: number, job: number, artifactId: number) { + this.data.clearHeroAttrByHid(hid, 'artifactSeid'); - // let dicArtifact = gameData.artifact.get(artifactId); - // if(!dicArtifact) return; - // let dicJob = gameData.job.get(job); - // if(!dicJob) return; + let dicArtifact = gameData.artifact.get(artifactId); + if(!dicArtifact) return; + let dicJob = gameData.job.get(job); + if(!dicJob) return; - // let seids: number[] = []; // id, seids - // for(let seid of dicArtifact.seids) { - // let dicArtifactSeid = gameData.artifactSeid.get(seid); - // if(!dicArtifactSeid) continue; - // if(dicArtifactSeid.jobClass != 0 && dicArtifactSeid.jobClass != dicJob.job_class) continue; - // if(dicArtifactSeid.hid != 0 && dicArtifactSeid.hid != skinId) continue; - // if(dicArtifactSeid.quality > dicArtifact.quality) continue; - // seids.push(dicArtifactSeid.seid); - // } + let seids: number[] = []; // id, seids + for(let seid of dicArtifact.seids) { + let dicArtifactSeid = gameData.artifactSeid.get(seid); + if(!dicArtifactSeid) continue; + if(dicArtifactSeid.jobClass != 0 && dicArtifactSeid.jobClass != dicJob.job_class) continue; + if(dicArtifactSeid.hid != 0 && dicArtifactSeid.hid != skinId) continue; + if(dicArtifactSeid.quality > dicArtifact.quality) continue; + seids.push(dicArtifactSeid.seid); + } - // let { ratioUp } = this.addSeidEffect(seids); - // for(let [attrId, val] of ratioUp) { - // let heroAttr = this.data.getHeroAttrByHidAndId(hid, attrId); - // heroAttr.artifactSeid = val; - // } - // } + let { ratioUp } = this.addSeidEffect(seids); + for(let [attrId, val] of ratioUp) { + let heroAttr = this.data.getHeroAttrByHidAndId(hid, attrId); + heroAttr.artifactSeid = val; + } + } // 添加技能增加的被动属性 private addSeidEffect(seidList: number[]) {