网安:修复sms获取bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* 体力系统
|
||||
*/
|
||||
|
||||
import { HERO_SYSTEM_TYPE, ABI_TYPE, HERO_CE_RATIO, HERO_SUB_ATTR_RATIO, LINEUP_NUM, REDIS_KEY } from '../consts';
|
||||
import { HERO_SYSTEM_TYPE, ABI_TYPE, HERO_CE_RATIO, HERO_SUB_ATTR_RATIO, LINEUP_NUM } from '../consts';
|
||||
|
||||
import { deepCopy, getAllAttrStage, reduceCe } from './util';
|
||||
import { HeroModel, HeroType, HeroUpdate } from '../db/Hero';
|
||||
@@ -19,7 +19,6 @@ import { PvpDefenseModel } from '../db/PvpDefense';
|
||||
import { findIndex } from 'underscore';
|
||||
import { GuildModel } from '../db/Guild';
|
||||
import { DicJob } from './dictionary/DicJob';
|
||||
import { redisUserInfoUpdate } from '../services/redisService';
|
||||
|
||||
// 修改并下发战力
|
||||
export async function calPlayerCeAndSave(type: number, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
|
||||
@@ -46,9 +45,6 @@ export async function calPlayerCeAndSave(type: number, roleId: string, originHer
|
||||
|
||||
await PvpDefenseModel.updateCe(roleId, originHero.hid, heroCe); // 更新pvp防守阵战力
|
||||
let guild = await GuildModel.updateCe(roleId, incCe); // 公会更新战力
|
||||
if(guild) {
|
||||
await redisUserInfoUpdate(REDIS_KEY.GUILD_INFO, guild.code, [{ field: 'guildCe', value: guild.guildCe }])
|
||||
}
|
||||
|
||||
let pushHeros = new Array<{ hid: number, ce: number, incHeroCe: number }>();
|
||||
pushHeros.push({
|
||||
@@ -56,7 +52,7 @@ export async function calPlayerCeAndSave(type: number, roleId: string, originHer
|
||||
ce: reduceCe(heroCe),
|
||||
incHeroCe: reduceCe(incCe),
|
||||
});
|
||||
return { pushHeros, role, topLineupCe, hero }
|
||||
return { pushHeros, role, topLineupCe, hero, guild }
|
||||
}
|
||||
|
||||
//全局属性加成
|
||||
|
||||
Reference in New Issue
Block a user