diff --git a/src/api_s2c/chat/ApiSend.ts b/src/api_s2c/chat/ApiSend.ts index a081f7d..4d182d0 100644 --- a/src/api_s2c/chat/ApiSend.ts +++ b/src/api_s2c/chat/ApiSend.ts @@ -7,7 +7,7 @@ import { getGud } from "../../public/gud"; export default async function (call: ApiCall) { - 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); let data = call.req; diff --git a/src/shared/public/hero.ts b/src/shared/public/hero.ts index 8869338..dbddc83 100644 --- a/src/shared/public/hero.ts +++ b/src/shared/public/hero.ts @@ -238,7 +238,9 @@ export class HeroShared { let find = Object.entries(posObj).find(v => v[1] == hero._id); 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); } }