24 lines
910 B
C#
24 lines
910 B
C#
namespace Application.Domain
|
|
{
|
|
public class BusEventsSubscriber : IEventSubscriber
|
|
{
|
|
/// <summary>
|
|
/// 处理贡献提成
|
|
/// </summary>
|
|
/// <param name="context"></param>
|
|
[EventSubscribe(BusEventsEnum.BusEventsName.PutFightAward, NumRetries = 0)]
|
|
public async Task HandleQueueBonus(EventHandlerExecutingContext context)
|
|
{
|
|
var data = context.GetPayload<game_fight_data>();
|
|
var fightService = App.GetService<IGameFightService>();
|
|
await fightService.HandleFight(data);
|
|
}
|
|
|
|
[EventSubscribe(BusEventsEnum.BusEventsName.HandleOnHook, NumRetries = 0,RetryTimeout = 999999999)]
|
|
public async Task HandleOnHook(EventHandlerExecutingContext context)
|
|
{
|
|
var hookService = App.GetService<IOnHookService>();
|
|
await hookService.HandleHook();
|
|
}
|
|
}
|
|
} |