This commit is contained in:
Putoo
2026-07-04 18:07:37 +08:00
parent ea32e7046e
commit fa00fc5d66
26 changed files with 871 additions and 69 deletions

View File

@@ -14,13 +14,15 @@ namespace Application.Web.Controllers.Pub
private readonly INoticeService _noticeService;
private readonly IGameAccountService _accountService;
private readonly IUnitUserService _userService;
private readonly IGameMonsterService _monsterService;
public PubController(IAreaService areaService, INoticeService noticeService, IGameAccountService accountService,IUnitUserService userService)
public PubController(IAreaService areaService, INoticeService noticeService, IGameAccountService accountService,IUnitUserService userService,IGameMonsterService monsterService)
{
_areaService = areaService;
_noticeService = noticeService;
_accountService = accountService;
_userService = userService;
_monsterService = monsterService;
}
/// <summary>
@@ -134,5 +136,21 @@ namespace Application.Web.Controllers.Pub
return PoAction.Ok(areaInfo);
}
/// <summary>
/// 怪物信息
/// </summary>
/// <param name="monsterId"></param>
/// <returns></returns>
[HttpGet]
public async Task<IPoAction> GetMonsterInfo(string monsterId)
{
var monster = await _monsterService.GetMonsterInfo(monsterId);
if (monster == null)
{
return PoAction.Message("怪物不存在!");
}
return PoAction.Ok(monster);
}
}
}