武将养成系统分类
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ActionPointModel } from '../db/ActionPoint';
|
import { ActionPointModel } from '../db/ActionPoint';
|
||||||
import { ACTION_POIN } from '../consts/consts';
|
import { HERO_SYSTEM_TYPE } from '../consts/consts';
|
||||||
import { pinus } from 'pinus';
|
import { pinus } from 'pinus';
|
||||||
import { STATUS } from '../consts/statusCode';
|
import { STATUS } from '../consts/statusCode';
|
||||||
import {resResult } from '../pubUtils/util';
|
import {resResult } from '../pubUtils/util';
|
||||||
@@ -11,17 +11,17 @@ import {HeroModel} from '../db/Hero';
|
|||||||
import {RoleModel} from '../db/Role';
|
import {RoleModel} from '../db/Role';
|
||||||
|
|
||||||
//战力计算TODO
|
//战力计算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 ce = 0;
|
||||||
let incAttr;
|
let incAttr;
|
||||||
if (type == 1) {
|
if (HERO_SYSTEM_TYPE.STAR == 1) {
|
||||||
incAttr = calHeroStarIncAttr(hero, args);
|
incAttr = calHeroStarIncAttr(hero, args);
|
||||||
}
|
}
|
||||||
return ce;
|
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 playerCe = 0;
|
||||||
let pushHeros = [];
|
let pushHeros = [];
|
||||||
for (let hero of heros) {
|
for (let hero of heros) {
|
||||||
@@ -42,7 +42,7 @@ export async function calPlayerCeAndSave(sid: string, roleId: string, heros:Arra
|
|||||||
return heros;
|
return heros;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calHeroStarIncAttr (hero:any, args: Array<{id: number}>) {
|
export function calHeroStarIncAttr (hero:any, args: Array<number>) {
|
||||||
let incHp = 0;
|
let incHp = 0;
|
||||||
return {incHp};//属性增量可以是多个
|
return {incHp};//属性增量可以是多个
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,10 @@ export const ACTION_POIN = {
|
|||||||
MAX: 100000,
|
MAX: 100000,
|
||||||
PER: 6 * 60 * 1000
|
PER: 6 * 60 * 1000
|
||||||
};
|
};
|
||||||
|
//武将养成系统分类
|
||||||
|
export const HERO_SYSTEM_TYPE = {
|
||||||
|
STAR:1,
|
||||||
|
};
|
||||||
|
|
||||||
export const BATTLE_REWARD_TYPE = {
|
export const BATTLE_REWARD_TYPE = {
|
||||||
FIX_REWARD: 1,
|
FIX_REWARD: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user