热更新:handler监听热更新
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Application, BackendSession, pinus } from "pinus";
|
||||
import { Application, BackendSession, pinus, HandlerService, } from "pinus";
|
||||
import { resResult, parseGoodStr, getRandSingleEelm } from "../../../pubUtils/util";
|
||||
import { STATUS, TASK_FUN_TYPE, SHOP_REFRESH_TYPE } from "../../../consts";
|
||||
import { gameData } from "../../../pubUtils/data";
|
||||
@@ -16,6 +16,7 @@ import { RoleModel } from "../../../db/Role";
|
||||
import { roleLevelup } from "../../../services/normalBattleService";
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
return new ShopHandler(app);
|
||||
}
|
||||
|
||||
@@ -79,7 +80,7 @@ export class ShopHandler {
|
||||
}
|
||||
|
||||
let goods = await addItems(roleId, roleName, sid, taskReward);
|
||||
if(expItem && expItem.count > 0) {
|
||||
if (expItem && expItem.count > 0) {
|
||||
await roleLevelup(roleId, expItem.count, session);
|
||||
goods.push(expItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user