战力:修复切换皮肤后套装属性加错的问题
This commit is contained in:
@@ -115,15 +115,17 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.SKIN: // 7. 穿皮肤
|
||||
{
|
||||
let { hero: { quality, star, starStage, colorStar, colorStarStage } } = param;
|
||||
let { hero: { quality, star, starStage, colorStar, colorStarStage, jobStage } } = param;
|
||||
for(let [hid, { skinId, job, ePlace, skins }] of heroUpdates) {
|
||||
calCe.setHeroBase(hid, skinId);
|
||||
calCe.setHeroStar(hid, job, quality, star, starStage, colorStar, colorStarStage);
|
||||
calCe.setJob(hid, job, jobStage);
|
||||
for(let { id, equipId, quality, qualityStage, lv, star, starStage } of ePlace) {
|
||||
calCe.setEquipQuality(hid, id, equipId, quality, qualityStage);
|
||||
calCe.setEquipStrength(hid, id, equipId, lv);
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
calCe.setEquipSuit(hid, skinId, ePlace);
|
||||
calCe.setTalent(hid, skins);
|
||||
}
|
||||
break;
|
||||
@@ -185,7 +187,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.COMPOSE_EQUIP: // 21. 合成装备
|
||||
{
|
||||
let { ePlaceId } = param;
|
||||
let { ePlaceId, skinId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, quality, qualityStage, lv, star, starStage } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
@@ -194,7 +196,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
calCe.setEquipSuit(hid, skinId, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -224,14 +226,14 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STAR: // 24. 装备升星
|
||||
{
|
||||
let { ePlaceId } = param;
|
||||
let { ePlaceId, skinId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, equipId, star, starStage } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setEquipStar(hid, id, equipId, star, starStage);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
calCe.setEquipSuit(hid, skinId, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -239,20 +241,20 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
case HERO_SYSTEM_TYPE.JEWEL_RESET_RANDSE: // 27. 洗练
|
||||
case HERO_SYSTEM_TYPE.JEWEL_QUENCH: // 28. 淬炼
|
||||
{
|
||||
let { ePlaceId, jewel: curJewel } = param;
|
||||
let { ePlaceId, jewel: curJewel, skinId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, stones } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
calCe.setJewel(hid, id, stones, curJewel);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
calCe.setEquipSuit(hid, skinId, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HERO_SYSTEM_TYPE.EQUIP_STONE: // 26. 装备地玉
|
||||
{
|
||||
let { ePlaceId, jewel: curJewel } = param;
|
||||
let { ePlaceId, jewel: curJewel, skinId } = param;
|
||||
for(let [hid, { ePlace = [] }] of heroUpdates) {
|
||||
for(let { id, stones } of ePlace) {
|
||||
if(ePlaceId == id) {
|
||||
@@ -260,7 +262,7 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
|
||||
calCe.setJewel(hid, id, stones, curJewel);
|
||||
}
|
||||
}
|
||||
calCe.setEquipSuit(hid, ePlace);
|
||||
calCe.setEquipSuit(hid, skinId, ePlace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -340,9 +340,9 @@ export class CalCe {
|
||||
}
|
||||
|
||||
// 装备套装
|
||||
public setEquipSuit(hid: number, ePlace: EPlace[]) {
|
||||
public setEquipSuit(hid: number, skinId: number, ePlace: EPlace[]) {
|
||||
this.data.clearHeroAttrByHid(hid, 'equipSuit');
|
||||
let dicEquipSuit = getEquipSuitByHero(hid);
|
||||
let dicEquipSuit = getEquipSuitByHero(skinId);
|
||||
let suitStars: number[] = [];
|
||||
for(let equipId of dicEquipSuit.equips) {
|
||||
let equip = ePlace.find(cur => cur.equipId == equipId);
|
||||
|
||||
@@ -1008,8 +1008,8 @@ export class CheckSingleTask {
|
||||
}
|
||||
case TASK_TYPE.EQUIP_SUIT_SEID_NUM: // 92. x名武将激活X条套装属性
|
||||
{
|
||||
let { oldEplace, newEplace, hid } = param;
|
||||
let dicEquipSuit = getEquipSuitByHero(hid);
|
||||
let { oldEplace, newEplace, skinId } = param;
|
||||
let dicEquipSuit = getEquipSuitByHero(skinId);
|
||||
let oldSuitStars: number[] = [], newSuitStars: number[] = [];
|
||||
for(let equipId of dicEquipSuit.equips) {
|
||||
let oldEquip = oldEplace.find(cur => cur.equipId == equipId);
|
||||
|
||||
@@ -262,12 +262,12 @@ export async function checkTaskInPutStone(serverId: number, roleId: string, sid:
|
||||
await task.saveAndPush(sid);
|
||||
}
|
||||
|
||||
export async function checkTaskInEquipStarUp(serverId: number, roleId: string, sid: string, oldEplace: EPlace[], newEplace: EPlace[], ePlaceId: number, hid: number, isUpStar: boolean, equipStarSum: number, count: number) {
|
||||
export async function checkTaskInEquipStarUp(serverId: number, roleId: string, sid: string, oldEplace: EPlace[], newEplace: EPlace[], ePlaceId: number, hid: number, isUpStar: boolean, equipStarSum: number, count: number, skinId: number) {
|
||||
let task = new CheckTask(serverId, roleId);
|
||||
if(isUpStar) {
|
||||
let { oldEquip, newEquip } = getEquipById(oldEplace, newEplace, ePlaceId);
|
||||
task.setParam(TASK_TYPE.EQUIP_STAR_UP_TO, { oldEquip, newEquip });
|
||||
task.setParam(TASK_TYPE.EQUIP_SUIT_SEID_NUM, { oldEplace, newEplace, ePlaceId, hid });
|
||||
task.setParam(TASK_TYPE.EQUIP_SUIT_SEID_NUM, { oldEplace, newEplace, ePlaceId, skinId });
|
||||
}
|
||||
task.setParam(TASK_TYPE.EQUIP_STAR_UP_CNT, { hid, ePlaceId, count });
|
||||
task.setParam(TASK_TYPE.EQUIP_STAR_UP_CNT_SUM, { count });
|
||||
|
||||
Reference in New Issue
Block a user