战力:修复bug
This commit is contained in:
@@ -356,7 +356,7 @@ export class EquipHandler {
|
||||
// 目标镶嵌上
|
||||
let curJewel = await JewelModel.putOnOrOff(seqId, hid, ePlaceId);
|
||||
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { jewel: seqId });
|
||||
await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_JEWEL, roleId, serverId, sid, hid, { ePlace: newEplace }, { ePlaceIds: [ePlaceId], jewels: [curJewel] });
|
||||
await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_JEWEL, roleId, serverId, sid, hid, { ePlace: newEplace }, { ePlaceId, jewel: curJewel });
|
||||
await checkTaskInPutJewel(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, originJewel, curJewel);
|
||||
|
||||
let curHero = {
|
||||
@@ -384,7 +384,7 @@ export class EquipHandler {
|
||||
|
||||
let curJewel = await JewelModel.putOnOrOff(curEquip.jewel, 0, 0);
|
||||
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, { jewel: 0 });
|
||||
await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_JEWEL, roleId, serverId, sid, hid, { ePlace: newEplace }, { ePlaceIds: [ePlaceId], jewels: [] });
|
||||
await calculateCeWithHero(HERO_SYSTEM_TYPE.EQUIP_JEWEL, roleId, serverId, sid, hid, { ePlace: newEplace }, { ePlaceId, jewel: null });
|
||||
await checkTaskInPutJewel(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, null, curJewel);
|
||||
|
||||
let curHero = {
|
||||
|
||||
@@ -246,7 +246,7 @@ export class CalCe {
|
||||
for(let { lv, seid } of dicHeroTalent.level) {
|
||||
if(level >= lv) {
|
||||
if(!seids.has(id)) seids.set(id, []);
|
||||
seids.get(id).push(seid);
|
||||
seids.get(id).push(seid, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,13 +382,15 @@ export class CalCe {
|
||||
|
||||
// 神像相关
|
||||
public setTeraph(teraphs: Teraph[]) {
|
||||
|
||||
this.data.clearRoleAttr('teraph');
|
||||
let teraphOfAttrId = new Map<number, number>();
|
||||
for(let teraph of teraphs) {
|
||||
for(let [attrId, value] of teraph.attr) { // 主属性
|
||||
addToMap(teraphOfAttrId, attrId, value);
|
||||
}
|
||||
let dicTeraph = getTeraph(teraph.id, teraph.grade);
|
||||
for(let [attrId, value] of teraph.attr) { // 主属性
|
||||
let basic = dicTeraph.basicAttrValue.get(attrId)||0;
|
||||
addToMap(teraphOfAttrId, attrId, value + basic);
|
||||
}
|
||||
for(let [attrId, value] of dicTeraph.assiAttrValue) { // 次属性
|
||||
addToMap(teraphOfAttrId, attrId, value);
|
||||
}
|
||||
@@ -445,7 +447,8 @@ export class CalCe {
|
||||
}
|
||||
|
||||
// console.log('effectList', JSON.stringify(effectList));
|
||||
for (let { type, gainValueArr: [ability, value] } of effectList) {
|
||||
for (let { type, id, gainValueArr: [ability, value] } of effectList) {
|
||||
// console.log('##### addToMap type', type, 'id', id, 'ability', ability, 'value', value)
|
||||
if (type == SEID_TYPE.FIX) { // 加值
|
||||
addToMap(fixUp, ability, value);
|
||||
} else if (type == SEID_TYPE.MAIN_RATIO||type == SEID_TYPE.MAIN_RATIO_2) { // 主属性加百分比
|
||||
@@ -454,7 +457,7 @@ export class CalCe {
|
||||
}
|
||||
} else if (type == SEID_TYPE.SUB_RATIO||type == SEID_TYPE.SUB_RATIO_2) { // 次级属性加百分比
|
||||
if(!ABI_TYPE_MAIN.includes(ability)) {
|
||||
addToMap(ratioUp, ability, value * 100);
|
||||
addToMap(ratioUp, ability, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ export async function checkTaskInEquipLvUp(serverId: number, roleId: string, sid
|
||||
export async function checkTaskInPutJewel(serverId: number, roleId: string, sid: string, oldEplace: EPlace[], newEplace: EPlace[], ePlaceId: number, originJewel: JewelType, curJewel: JewelType) {
|
||||
let { oldEquip, newEquip } = getEquipById(oldEplace, newEplace, ePlaceId);
|
||||
let task = new CheckTask(serverId, roleId);
|
||||
task.setParam(TASK_TYPE.EQUIP_PUT_JEWEL, { oldEquip, newEplace, jewels: [originJewel, curJewel ] });
|
||||
task.setParam(TASK_TYPE.EQUIP_PUT_JEWEL, { oldEquip, newEquip, jewels: [originJewel, curJewel ] });
|
||||
task.setParam(TASK_TYPE.EQUIP_PUT_JEWEL_CNT, { oldEquip, newEquip });
|
||||
task.setParam(TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, { oldEquip, newEplace, jewels: [originJewel, curJewel ] });
|
||||
task.setParam(TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, { oldEquip, newEquip, jewels: [originJewel, curJewel ] });
|
||||
await task.saveAndPush(sid);
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ export async function checkTaskInPutStone(serverId: number, roleId: string, sid:
|
||||
task.setParam(TASK_TYPE.EQUIP_PUT_STONE_CNT, { oldEquip, newEquip });
|
||||
task.setParam(TASK_TYPE.EQUIP_STONE_CNT, { oldEquip, newEquip });
|
||||
task.setParam(TASK_TYPE.EQUIP_STONE_CNT_LV, { oldEquip, newEquip });
|
||||
task.setParam(TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, { oldEquip, newEplace, jewels: [jewel ] });
|
||||
task.setParam(TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, { oldEquip, newEquip, jewels: [jewel ] });
|
||||
await task.saveAndPush(sid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user