武将养成系统分类
This commit is contained in:
@@ -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<number>) {
|
||||
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<any>, type?: number, args?: Array<{id: number}>) {
|
||||
export async function calPlayerCeAndSave(sid: string, roleId: string, heros:Array<any>, type?: number, args?: Array<number>) {
|
||||
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<number>) {
|
||||
let incHp = 0;
|
||||
return {incHp};//属性增量可以是多个
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user