强化
This commit is contained in:
@@ -10,14 +10,8 @@ import { getTeraphAttr, getAtrrNameById } from '../../../consts/constModules/abi
|
||||
const _ = require('underscore');
|
||||
import { SclResultInter, SclPosInter } from '../../../pubUtils/interface';
|
||||
import { SchoolModel } from '../../../db/School';
|
||||
<<<<<<< Updated upstream
|
||||
import { checkMaterialEnough } from '../../../services/roleService'
|
||||
import { calPlayerCeAndSave, calAllHeroCe } from '../../../services/playerCeService';
|
||||
=======
|
||||
import { checkMaterialEnough } from '../../../services/roleService';
|
||||
import { calAllHeroCe } from '../../../services/playerCeService';
|
||||
import { calPlayerCeAndSave } from '../../../services/playerCeService';
|
||||
>>>>>>> Stashed changes
|
||||
import { HERO_SYSTEM_TYPE } from '../../../consts';
|
||||
|
||||
export default function(app: Application) {
|
||||
@@ -102,8 +96,8 @@ export class RoleHandler {
|
||||
}
|
||||
|
||||
//神像强化
|
||||
async roleTeraphStrengthen(msg: {id: number, type: number}, session: BackendSession){
|
||||
let {id, type} = msg;
|
||||
async roleTeraphStrengthen(msg: {id: number, count: number}, session: BackendSession){
|
||||
let {id, count} = msg;
|
||||
let roleId = session.get('roleId');
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
let sid: string = session.get('sid');
|
||||
@@ -123,7 +117,7 @@ export class RoleHandler {
|
||||
}
|
||||
if (!attrs.length)
|
||||
return resResult(STATUS.ROLE_TERAPH_NOT_STRENGTHEN);
|
||||
let {attr, consumes} = checkMaterialEnough(type, attrs, teraphInfo, teraph);
|
||||
let {attr, consumes} = checkMaterialEnough(count, attrs, teraphInfo, teraph);
|
||||
for (let key in attr) {
|
||||
teraph[key] += attr[key];
|
||||
role.globalCeAttr[key].fixUp += attr[key];
|
||||
|
||||
Reference in New Issue
Block a user