Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix

This commit is contained in:
ciniao 2023-12-26 14:33:14 +08:00
commit fb28f2d4e7
3 changed files with 16 additions and 14 deletions

View File

@ -12,7 +12,7 @@ export default async function (call: ApiCall<ReqFight, ResFight>) {
let change: Partial<ResOpen> = {};
let data = await DxltFun.getData(call);
if (data.killBoss >= G.gc.dxlt_com.dayFightLayer) return call.error(globalThis.lng.dixialeitai_2);
if (data.killBoss >= G.gc.dxlt_com.dayFightLayer) return call.error(globalThis.lng.dixialeitai_13);
if (G.gc.dxlt_layer[data.curLayer].type != 1) return call.error(globalThis.lng.dixialeitai_3);
if (data.over) return call.error(globalThis.lng.dixialeitai_4);
if (!data.heros[call.req]) return call.error(globalThis.lng.dixialeitai_5);

View File

@ -131,6 +131,7 @@ class Lng {
dixialeitai_10 = "dixialeitai_10";
dixialeitai_11 = "dixialeitai_11";
dixialeitai_12 = "dixialeitai_12";
dixialeitai_13 = "dixialeitai_13";
email_1 = "email_1";
email_2 = "email_2";

View File

@ -5,7 +5,7 @@ import {ShiwuFun} from './shiwu';
type shopData = ResOpen;
type changeData = {
[k in keyof shopData]: shopData[k]
[k in keyof (shopData & { version?: number | string })]: (shopData & { version?: number | string })[k]
};
export class ShopFun {
@ -105,7 +105,8 @@ export class ShopFun {
}
if (shopConf.version && shopConf.version != shopData.version) {
await this.changeShopData(uid, shopId, {shopItems: this.getShopItems(shopId, lv)})
shopData.shopItems = this.getShopItems(shopId, lv);
await this.changeShopData(uid, shopId, { shopItems: shopData.shopItems, version: shopConf.version });
}
return shopData