This commit is contained in:
Putoo
2026-05-29 19:06:51 +08:00
parent 69ae1e3174
commit bd1535aee9
48 changed files with 1571 additions and 133 deletions

View File

@@ -18,7 +18,7 @@ public class MapController : ControllerBase
private readonly IMessageService _messageService;
public MapController(IUnitUserService userService, IGameMapService mapService, IGameChatService chatService,
IUnitUserAttrService attrService,IMessageService messageService)
IUnitUserAttrService attrService, IMessageService messageService)
{
_userService = userService;
_mapService = mapService;
@@ -69,7 +69,7 @@ public class MapController : ControllerBase
//公聊信息
string teamId = "";
string groupId = "";
var chatData = await _chatService.GetChatTop(area, 2, teamId, groupId);
var chatData = await _chatService.GetChatTop(userId, area, 2, teamId, groupId);
var npcData = await _mapService.GetMapNpc(mapInfo.mapId); //NPC信息
@@ -81,7 +81,8 @@ public class MapController : ControllerBase
var cityInfo = await _mapService.GetCityInfo((int)mapInfo.cityId); //城市信息
var cityShow = await _mapService.GetCityShowMap(cityInfo.cityId); //城内地图
int noReadMsg = await _messageService.GetNoReadCount(userId);
var noReadMsg = await _messageService.GetNoReadCount(userId);
#region 线
string ip = ComHelper.GetClientUserIp(HttpContext);
@@ -89,7 +90,7 @@ public class MapController : ControllerBase
#endregion
object ret = new { mapInfo, cityInfo, npcData, chatData, cityShow, nearUser,noReadMsg };
object ret = new { mapInfo, cityInfo, npcData, chatData, cityShow, nearUser, noReadMsg = noReadMsg[3] };
return PoAction.Ok(ret);
}
@@ -166,7 +167,7 @@ public class MapController : ControllerBase
}
}
#region npc相关
#region npc相关
/// <summary>
/// 获取NPC相关信息
@@ -197,6 +198,5 @@ public class MapController : ControllerBase
return PoAction.Ok(data);
}
#endregion
}