This commit is contained in:
Putoo
2026-07-07 18:43:01 +08:00
parent 7f29fd46b8
commit 037e845622
37 changed files with 854 additions and 106 deletions

View File

@@ -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);
}