This commit is contained in:
Putoo
2026-06-29 18:17:54 +08:00
parent e47a5a19a6
commit 93d21ba9fd
35 changed files with 1073 additions and 293 deletions

View File

@@ -17,11 +17,12 @@ public class UserController : ControllerBase
private readonly IGameChatService _chatService;
private readonly IGameSkillService _skillService;
private readonly IGameTeamService _teamService;
private readonly IGameEquService _equService;
public UserController(IUnitUserService userService, IUnitUserAttrService attrService,
IUnitUserAccService accService, IGameMapService mapService, IUnitUserRelationService relationService,
IGameGoodsService goodsService, IGameChatService chatService, IGameSkillService skillService,
IGameTeamService teamService)
IGameTeamService teamService, IGameEquService equService)
{
_userService = userService;
_attrService = attrService;
@@ -32,6 +33,7 @@ public class UserController : ControllerBase
_chatService = chatService;
_skillService = skillService;
_teamService = teamService;
_equService = equService;
}
@@ -52,7 +54,10 @@ public class UserController : ControllerBase
var vigourInfo = await _attrService.GetUserVigourInfo(userId);
var accInfo = await _accService.GetUserAccInfo(userId);
object acc = new { accInfo.gold, accInfo.cowry, accInfo.teach, accInfo.renown };
object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc };
var buff = await _attrService.GetUserStateData(userId,"ALL");
object result = new { user, attr = attrInfo, exp, vigourInfo.vitality, acc,buff };
return PoAction.Ok(result);
}
@@ -165,7 +170,13 @@ public class UserController : ControllerBase
bool isFriend = await _relationService.CheckIsFriend(userId, userInfo.userId);
bool isEnemy = await _relationService.CheckUserEnemy(userId, userInfo.userId);
var team = await _teamService.GetUserTeamInfo(userInfo.userId);
object result = new { user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team };
var equ = await _equService.GetUserOnEqu(userInfo.userId);
var suit = await _equService.GetUserEquSuit(userInfo.userId);
object result = new
{
user, attr = new { attrInfo.lev }, acc, isOnline, onMapName, isFriend, isEnemy, team, equ,suit
};
return PoAction.Ok(result);
}
@@ -408,7 +419,7 @@ public class UserController : ControllerBase
}
else
{
return PoAction.Message("添加失败,请稍后尝试!");
return PoAction.Message("添加失败,请稍后尝试!");
}
}
else