12
This commit is contained in:
@@ -92,7 +92,7 @@ public class MapController : ControllerBase
|
|||||||
var npcData = await _mapService.GetMapNpc(mapInfo.mapId); //NPC信息
|
var npcData = await _mapService.GetMapNpc(mapInfo.mapId); //NPC信息
|
||||||
npcData = npcData.FindAll(it => GameTool.AreaVerify(StateHelper.areaId, it.areaId));
|
npcData = npcData.FindAll(it => GameTool.AreaVerify(StateHelper.areaId, it.areaId));
|
||||||
var nearUser =
|
var nearUser =
|
||||||
await _mapService.GetMapUser(mapInfo.mapId, area, (int)mapInfo.lookArea, new List<string> { userId },
|
await _mapService.GetMapUser(mapInfo.mapId, area, (int)mapInfo.lookArea, [userId],
|
||||||
3); //获取附近的人
|
3); //获取附近的人
|
||||||
|
|
||||||
var cityInfo = await _mapService.GetCityInfo((int)mapInfo.cityId); //城市信息
|
var cityInfo = await _mapService.GetCityInfo((int)mapInfo.cityId); //城市信息
|
||||||
@@ -110,18 +110,20 @@ public class MapController : ControllerBase
|
|||||||
if (mapInfo.isBus == 1)
|
if (mapInfo.isBus == 1)
|
||||||
{
|
{
|
||||||
var busData = await _mapService.GetMapBus(mapInfo.mapId, 0, 0);
|
var busData = await _mapService.GetMapBus(mapInfo.mapId, 0, 0);
|
||||||
business = busData.Select(it => new
|
business = busData.Select(it => new
|
||||||
{
|
{
|
||||||
busId = it.busId,
|
busId = it.busId,
|
||||||
busName = it.busName
|
busName = it.busName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//地图资源
|
//地图资源
|
||||||
List<game_city_map_res> mapRes = new List<game_city_map_res>();
|
List<game_city_map_res> mapRes = new List<game_city_map_res>();
|
||||||
if (mapInfo.isRes==1)
|
if (mapInfo.isRes == 1)
|
||||||
{
|
{
|
||||||
mapRes = await _mapService.GetMapRes(mapInfo.mapId);
|
mapRes = await _mapService.GetMapRes(mapInfo.mapId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +152,7 @@ public class MapController : ControllerBase
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IPoAction> GetMapUser(int page)
|
public async Task<IPoAction> GetMapUser(int page)
|
||||||
{
|
{
|
||||||
RefAsync<int> Total = 0;
|
RefAsync<int> total = 0;
|
||||||
string userId = StateHelper.userId;
|
string userId = StateHelper.userId;
|
||||||
int areaId = StateHelper.areaId;
|
int areaId = StateHelper.areaId;
|
||||||
var onMap = await _mapService.GetUserOnMap(userId);
|
var onMap = await _mapService.GetUserOnMap(userId);
|
||||||
@@ -161,11 +163,12 @@ public class MapController : ControllerBase
|
|||||||
return PoAction.Message("地图不存在!");
|
return PoAction.Message("地图不存在!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = await _mapService.GetMapUser(onMap.mapId, areaId, (int)mapInfo.lookArea, new List<string> { userId },
|
var data = await _mapService.GetMapUser(onMap.mapId, areaId, (int)mapInfo.lookArea,
|
||||||
|
[userId],
|
||||||
page,
|
page,
|
||||||
10, Total);
|
10, total);
|
||||||
|
|
||||||
return PoAction.Ok(new { data, total = Total.Value, map = mapInfo });
|
return PoAction.Ok(new { data, total = total.Value, map = mapInfo });
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -516,12 +519,12 @@ public class MapController : ControllerBase
|
|||||||
int safety = 0;
|
int safety = 0;
|
||||||
string busCode = $"{runInfo.onMap}_{runInfo.toMap}";
|
string busCode = $"{runInfo.onMap}_{runInfo.toMap}";
|
||||||
var busData = await _mapService.GetMapBus(busCode, (int)runInfo.position, (int)runInfo.depth);
|
var busData = await _mapService.GetMapBus(busCode, (int)runInfo.position, (int)runInfo.depth);
|
||||||
var business = busData.Select(it => new
|
var business = busData.Select(it => new
|
||||||
{
|
{
|
||||||
busId = it.busId,
|
busId = it.busId,
|
||||||
busName = it.busName
|
busName = it.busName
|
||||||
});
|
});
|
||||||
|
|
||||||
return PoAction.Ok(new
|
return PoAction.Ok(new
|
||||||
{
|
{
|
||||||
onCity = onCity.cityName,
|
onCity = onCity.cityName,
|
||||||
|
|||||||
Reference in New Issue
Block a user