12121
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user