1212121
This commit is contained in:
@@ -23,11 +23,13 @@ public class MapController : ControllerBase
|
||||
private readonly IGameTeamService _teamService;
|
||||
private readonly IGameMonsterService _monsterService;
|
||||
private readonly IGameFightService _fightService;
|
||||
private readonly IOnHookService _hookService;
|
||||
|
||||
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)
|
||||
IGameTeamService teamService, IGameMonsterService monsterService, IGameFightService fightService,
|
||||
IOnHookService hookService)
|
||||
{
|
||||
_userService = userService;
|
||||
_mapService = mapService;
|
||||
@@ -41,6 +43,7 @@ public class MapController : ControllerBase
|
||||
_teamService = teamService;
|
||||
_monsterService = monsterService;
|
||||
_fightService = fightService;
|
||||
_hookService = hookService;
|
||||
}
|
||||
|
||||
#region 地图相关
|
||||
@@ -150,6 +153,10 @@ public class MapController : ControllerBase
|
||||
var mapGoods = await _fightService.GetMapFightGoods(mapInfo.mapId);
|
||||
mapGoods = mapGoods.FindAll(it => it.userId == "0" || it.userId == userId).Take(3).ToList();
|
||||
|
||||
int isHook = 0; //挂机处理
|
||||
var onHook = await _hookService.GetUserOnHook(userId);
|
||||
isHook = (int)onHook.status;
|
||||
|
||||
object ret = new
|
||||
{
|
||||
mapInfo,
|
||||
@@ -165,9 +172,11 @@ public class MapController : ControllerBase
|
||||
broadcast,
|
||||
monster = monsterData,
|
||||
fightId,
|
||||
gameTips
|
||||
gameTips,
|
||||
isHook
|
||||
};
|
||||
|
||||
|
||||
return PoAction.Ok(ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user