fix聊天禁言,英雄阵形战力计算

This commit is contained in:
dy 2023-12-28 14:18:26 +08:00
parent 053ab1ab23
commit 4e19dc21a1
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import { getGud } from "../../public/gud";
export default async function (call: ApiCall<ReqSend, ResSend>) { export default async function (call: ApiCall<ReqSend, ResSend>) {
let status_chat = await getGud(call.uid)['status_chat']; let status_chat = (await getGud(call.uid))['status_chat'];
// 验证是否被禁言 // 验证是否被禁言
if(status_chat == 1) return call.error(lng.chat_4); if(status_chat == 1) return call.error(lng.chat_4);
let data = call.req; let data = call.req;

View File

@ -238,7 +238,9 @@ export class HeroShared {
let find = Object.entries(posObj).find(v => v[1] == hero._id); let find = Object.entries(posObj).find(v => v[1] == hero._id);
if (find) { if (find) {
let __buff = G.gc.fightPlan[select][lv].buff[Number(find[0]) - 1]; let maxLv = R.values(G.gc.fightPlan[select]).length - 1
let fixLv = lv > maxLv ? maxLv : lv
let __buff = G.gc.fightPlan[select][fixLv].buff[Number(find[0]) - 1];
__buff && PublicShared.mergeProperty(buff, __buff); __buff && PublicShared.mergeProperty(buff, __buff);
} }
} }