111
This commit is contained in:
@@ -21,9 +21,12 @@ public class MapController : ControllerBase
|
||||
private readonly IGameSkillService _skillService;
|
||||
private readonly IGameGoodsService _goodsService;
|
||||
private readonly IGameTeamService _teamService;
|
||||
private readonly IGameMonsterService _monsterService;
|
||||
|
||||
public MapController(IUnitUserService userService, IGameMapService mapService, IGameChatService chatService,
|
||||
IUnitUserAttrService attrService, IMessageService messageService, IUnitUserWeight weightService,
|
||||
IUnitUserAccService accService, IGameSkillService skillService,IGameGoodsService goodsService,IGameTeamService teamService)
|
||||
IUnitUserAccService accService, IGameSkillService skillService, IGameGoodsService goodsService,
|
||||
IGameTeamService teamService, IGameMonsterService monsterService)
|
||||
{
|
||||
_userService = userService;
|
||||
_mapService = mapService;
|
||||
@@ -35,6 +38,7 @@ public class MapController : ControllerBase
|
||||
_skillService = skillService;
|
||||
_goodsService = goodsService;
|
||||
_teamService = teamService;
|
||||
_monsterService = monsterService;
|
||||
}
|
||||
|
||||
#region 地图相关
|
||||
@@ -89,14 +93,17 @@ public class MapController : ControllerBase
|
||||
#endregion
|
||||
|
||||
//公聊信息
|
||||
var myTeam = await _teamService.GetUserTeamData(userId);
|
||||
string teamId =myTeam.teamId ;
|
||||
var myTeam = await _teamService.GetUserTeamData(userId);
|
||||
string teamId = myTeam.teamId;
|
||||
string groupId = "";
|
||||
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 monsterData = await _monsterService.GetMapMonster(userId, mapInfo.mapId, teamId);
|
||||
var nearUser =
|
||||
await _mapService.GetMapUser(mapInfo.mapId, area, (int)mapInfo.lookArea, [userId],
|
||||
3); //获取附近的人
|
||||
@@ -145,7 +152,8 @@ public class MapController : ControllerBase
|
||||
noReadMsg = noReadMsg[3],
|
||||
business,
|
||||
mapRes,
|
||||
broadcast
|
||||
broadcast,
|
||||
monster = monsterData
|
||||
};
|
||||
|
||||
return PoAction.Ok(ret);
|
||||
|
||||
Reference in New Issue
Block a user