chore: 将事件执行标记为 ignoreReplay

This commit is contained in:
unanmed 2026-09-13 20:52:42 +08:00
parent b623e8ac98
commit aa3c7296c7
2 changed files with 5 additions and 2 deletions

View File

@ -179,8 +179,9 @@ export function shouldReplay(message: string): ReplayDecorator {
/**
*
* 使
* @param _msg
*/
export function ignoreReplay(): ReplayDecorator {
export function ignoreReplay(_msg: string): ReplayDecorator {
return function <This, Args extends unknown[], Return>(
this: This,
method: ReplayMethod<This, Args, Return>

View File

@ -1,5 +1,5 @@
import { logger } from '@motajs/common';
import { IGameEventStore } from '@user/data-common';
import { IGameEventStore, ignoreReplay } from '@user/data-common';
import { AnonTokyoInterpreter } from '@motajs/anon-tokyo';
import {
EventExecuteMode,
@ -52,6 +52,8 @@ export class EventExecutor implements IGameEventExecutor {
}
}
// @ts-expect-error 泛型无法推导
@ignoreReplay('事件一般由其他动作被动触发,不应计入录像')
async execute<R = void>(
events: IGameEventInvocation[],
param: IBlockEventParam