🐞 fix(宝物): 词条策划确认不会做战场外面板操作故删
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,31 +566,32 @@ 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[]) {
|
||||
|
||||
Reference in New Issue
Block a user