diff --git a/game-server/app/services/gmService.ts b/game-server/app/services/gmService.ts index 53d840b50..415274367 100644 --- a/game-server/app/services/gmService.ts +++ b/game-server/app/services/gmService.ts @@ -110,7 +110,7 @@ export async function initMaintenance(maintenance?: MaintenanceType) { let { startTime, marquee } = maintenance; if(marquee) { let result = await generateMarqueeSchedule(marquee); - console.log(result); + // console.log(result); } if(Date.now() > startTime.getTime()) { await startMaintenance(maintenance); diff --git a/game-server/app/services/redisService.ts b/game-server/app/services/redisService.ts index acfbd5173..11657d8d4 100644 --- a/game-server/app/services/redisService.ts +++ b/game-server/app/services/redisService.ts @@ -360,7 +360,7 @@ export async function incOnlineTime(userCode: string, isToday: boolean, incTime: let tomorrow = moment().add(1, 'days').hours(0).minutes(0).seconds(0).unix(); let result = await redisClient().hincrbyAsync(key, userCode, incTime); let result2 = await redisClient().expireatAsync(key, tomorrow); - console.log(result2) + // console.log(result2) return result; } else { return await redisClient().hincrbyAsync(key, userCode, incTime); diff --git a/shared/consts/constModules/abilityConst.ts b/shared/consts/constModules/abilityConst.ts index 1c43a75e6..812d956e3 100644 --- a/shared/consts/constModules/abilityConst.ts +++ b/shared/consts/constModules/abilityConst.ts @@ -99,13 +99,11 @@ export const ABI_TYPE_SUB = [ export enum SEID_TYPE { /**属性固定值加成(数值) */ - TYPE101 = 101, - /**属性固定值加成(百分比) */ - TYPE102 = 102, + TYPE101 = 1, /**基础属性加百分比,除以1000以后加到ratioUp */ - TYPE103 = 103, + TYPE103 = 2, /**次级属性的百分比加成,乘以100后加到fixUp */ - TYPE104 = 104, + TYPE104 = 3, /**复合属性 */ TYPE999 = 999, } diff --git a/shared/domain/roleField/calCe.ts b/shared/domain/roleField/calCe.ts index 46e1a1b16..121e11ae9 100644 --- a/shared/domain/roleField/calCe.ts +++ b/shared/domain/roleField/calCe.ts @@ -1,4 +1,4 @@ -import { ABI_STAGE, ABI_STAGE_TO_TYPE, ABI_TYPE, ABI_TYPE_MAIN, HERO_SUB_ATTR_RATIO, HERO_SYSTEM_TYPE, SEID_TYPE } from "../../consts"; +import { ABI_STAGE, ABI_STAGE_TO_TYPE, ABI_TYPE, ABI_TYPE_MAIN, HERO_CE_RATIO, HERO_SUB_ATTR_RATIO, HERO_SYSTEM_TYPE, SEID_TYPE } from "../../consts"; import { HeroModel, HeroUpdate, CeAttrData } from "../../db/Hero"; import { CeAttrDataRole, RoleUpdate } from "../../db/Role"; import { gameData, getHeroStarByQuality, getHeroWakeByQuality } from "../../pubUtils/data"; @@ -217,13 +217,16 @@ function addSeidEffect(this: CalRoleCe|CalHeroCe, seidList: number[]) { for (let { type, gainValueArr: [ability, value] } of effectList) { if (type == SEID_TYPE.TYPE101) { // 加值 this.getSingleAttrObj(ability).updateAttr({ inc: { fixUp: value } }); - } else if (type == SEID_TYPE.TYPE102) { // 加百分比 + } else if (type == SEID_TYPE.TYPE103) { // 主属性加百分比 if(ABI_TYPE_MAIN.includes(ability)) { - this.getSingleAttrObj(ability).updateAttr({ inc: {ratioUp: value } }); - } else { // 次级属性102特殊处理 - this.getSingleAttrObj(ability).updateAttr({ inc: {fixUp: value * HERO_SUB_ATTR_RATIO } }); + this.getSingleAttrObj(ability).updateAttr({ inc: {ratioUp: value / 1000} }); + } + } else if (type == SEID_TYPE.TYPE104) { // 次级属性加百分比 + if(!ABI_TYPE_MAIN.includes(ability)) { + this.getSingleAttrObj(ability).updateAttr({ inc: { fixUp: value * 100 * HERO_CE_RATIO } }); } } + } } diff --git a/shared/pubUtils/playerCe.ts b/shared/pubUtils/playerCe.ts index 2c20c60a6..c41998726 100644 --- a/shared/pubUtils/playerCe.ts +++ b/shared/pubUtils/playerCe.ts @@ -865,12 +865,6 @@ function addSeidEffect(heroAttrs: CeAttrData[], addSeidList: Array, remo for (let { type, gainValueArr: [ability, value] } of effectList) { if (type == SEID_TYPE.TYPE101) { // 加值 updateHeroAttr(heroAttrs, ability, { inc: {fixUp: value * multi * HERO_CE_RATIO} }); - } else if (type == SEID_TYPE.TYPE102) { // 加百分比 - if(ABI_TYPE_MAIN.includes(ability)) { - updateHeroAttr(heroAttrs, ability, { inc: {ratioUp: value * multi} }); - } else { // 次级属性102特殊处理 - updateHeroAttr(heroAttrs, ability, { inc: {fixUp: value * multi * HERO_SUB_ATTR_RATIO } }); - } } else if (type == SEID_TYPE.TYPE103) { // 主属性加百分比 if(ABI_TYPE_MAIN.includes(ability)) { updateHeroAttr(heroAttrs, ability, { inc: {ratioUp: value / 1000 * multi} });