This commit is contained in:
Putoo
2026-07-09 22:46:28 +08:00
parent 010ca90575
commit cfe6612a7a
33 changed files with 1355 additions and 39 deletions

View File

@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
namespace Application.Web.Controllers.Map;
/// <summary>
@@ -24,12 +23,13 @@ public class MapController : ControllerBase
private readonly IGameMonsterService _monsterService;
private readonly IGameFightService _fightService;
private readonly IOnHookService _hookService;
private readonly IGameTaskService _taskService;
public MapController(IUnitUserService userService, IGameMapService mapService, IGameChatService chatService,
IUnitUserAttrService attrService, IMessageService messageService, IUnitUserWeight weightService,
IUnitUserAccService accService, IGameSkillService skillService, IGameGoodsService goodsService,
IGameTeamService teamService, IGameMonsterService monsterService, IGameFightService fightService,
IOnHookService hookService)
IOnHookService hookService, IGameTaskService taskService)
{
_userService = userService;
_mapService = mapService;
@@ -44,6 +44,7 @@ public class MapController : ControllerBase
_monsterService = monsterService;
_fightService = fightService;
_hookService = hookService;
_taskService = taskService;
}
#region
@@ -106,8 +107,7 @@ public class MapController : ControllerBase
var chatData = await _chatService.GetChatTop(userId, area, 2, teamId, groupId);
var npcData = await _mapService.GetMapNpc(mapInfo.mapId); //NPC信息
npcData = npcData.FindAll(it => GameTool.AreaVerify(StateHelper.areaId, it.areaId));
var npcData = await _mapService.GetMapNpcModel(userId, mapInfo.mapId, area); //NPC信息
//获取怪物
var monsterData = await _monsterService.GetMapMonster(userId, mapInfo.mapId, teamId);
@@ -668,7 +668,13 @@ public class MapController : ControllerBase
return PoAction.Message("Npc不存在!");
}
return PoAction.Ok(data);
List<UserTaskModel> task = new List<UserTaskModel>();
if (data.code == nameof(MapEnum.NpcCode.Task))
{
task = await _taskService.GetTaskDataByNpc(userId, npcId);
}
return PoAction.Ok(new { data, task });
}
#endregion