This commit is contained in:
Putoo
2026-07-05 18:51:01 +08:00
parent fdb16f5d91
commit a1dbce8a96
15 changed files with 468 additions and 47 deletions

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Application.Domain
{
public class BusEventsEnum
{
public enum BusEventsName
{
PutFightAward,//战斗奖励事件
}
}
}

View File

@@ -0,0 +1,17 @@
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);
}
}
}