Reintroduce friend support for live

- Return approved friends in live/partyList
- Use the selected support center unit during live play
- Fall back to self support when no friend is available
- Align friend_status with client display expectations

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-05 22:39:04 +08:00
parent 009dcbb7cb
commit bac2335f14
3 changed files with 193 additions and 61 deletions
+4 -12
View File
@@ -312,18 +312,10 @@ func play(ctx *gin.Context) {
}
// 好友主唱技能加成
// TODO 好友支援存入数据库
// var tomoUnitId int64
// partyList := gjson.Parse(utils.ReadAllText("assets/serverdata/partylist.json")).Get("response_data.party_list")
// partyList.ForEach(func(key, value gjson.Result) bool {
// if value.Get("user_info.user_id").Int() == playReq.PartyUserID {
// tomoUnitId = value.Get("center_unit_info.unit_id").Int()
// return false
// }
// return true
// })
// TODO: 好友功能实装前先使用自己的卡组助战
tomoUnitId := myCenterUnitId
tomoUnitId, err := getSupportCenterUnitID(ss, int(playReq.PartyUserID), myCenterUnitId)
if ss.CheckErr(err) {
return
}
// fmt.Println("好友UnitID:", tomoUnitId)
// 好友主唱技能加成:主C技能(这里不使用新C技能,即以某属性的百分比提升另一属性)