diff --git a/game-server/app/services/playerCeService.ts b/game-server/app/services/playerCeService.ts index b16c9b8b5..9c345306d 100644 --- a/game-server/app/services/playerCeService.ts +++ b/game-server/app/services/playerCeService.ts @@ -3,7 +3,7 @@ */ import { ActionPointModel } from '../db/ActionPoint'; -import { ACTION_POIN } from '../consts/consts'; +import { HERO_SYSTEM_TYPE } from '../consts/consts'; import { pinus } from 'pinus'; import { STATUS } from '../consts/statusCode'; import {resResult } from '../pubUtils/util'; @@ -11,17 +11,17 @@ import {HeroModel} from '../db/Hero'; import {RoleModel} from '../db/Role'; //战力计算TODO -export function calPlayerCe(hero:any, type: number, args: Array<{id: number}>) { +export function calPlayerCe(hero:any, type: number, args: Array) { let ce = 0; let incAttr; - if (type == 1) { + if (HERO_SYSTEM_TYPE.STAR == 1) { incAttr = calHeroStarIncAttr(hero, args); - } + } return ce; } //修改并下发战力 -export async function calPlayerCeAndSave(sid: string, roleId: string, heros:Array, type?: number, args?: Array<{id: number}>) { +export async function calPlayerCeAndSave(sid: string, roleId: string, heros:Array, type?: number, args?: Array) { let playerCe = 0; let pushHeros = []; for (let hero of heros) { @@ -42,7 +42,7 @@ export async function calPlayerCeAndSave(sid: string, roleId: string, heros:Arra return heros; } -export function calHeroStarIncAttr (hero:any, args: Array<{id: number}>) { +export function calHeroStarIncAttr (hero:any, args: Array) { let incHp = 0; return {incHp};//属性增量可以是多个 -} \ No newline at end of file +} diff --git a/shared/consts/consts.ts b/shared/consts/consts.ts index 6d5e84b01..f7258d4b0 100644 --- a/shared/consts/consts.ts +++ b/shared/consts/consts.ts @@ -21,7 +21,11 @@ export const ACTION_POIN = { MAX: 100000, PER: 6 * 60 * 1000 }; - +//武将养成系统分类 +export const HERO_SYSTEM_TYPE = { + STAR:1, +}; + export const BATTLE_REWARD_TYPE = { FIX_REWARD: 1, CONDITION_REWARD: 2,