refactor: 重构 PVP 匹配逻辑使用模型结构体
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-05 11:21:38 +08:00
committed by cnb
parent 2e7215946b
commit b1ca686e06
5 changed files with 61 additions and 39 deletions

View File

@@ -5,6 +5,7 @@ import (
"blazing/cool"
"blazing/logic/service/common"
"blazing/logic/service/fight"
"blazing/logic/service/fight/info"
"blazing/logic/service/player"
"context"
)
@@ -17,7 +18,10 @@ type PetTOPLEVELnboundInfo struct {
}
func (h Controller) JoINtop(data *PetTOPLEVELnboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
cool.RedisDo(context.TODO(), "sun:join:2458", data.Head.UserID)
cool.RedisDo(context.TODO(), "sun:join", info.RPCFightinfo{
PlayerID: c.Info.UserID,
Mode: data.Mode,
})
// // 类型断言为 UniversalClient
// universalClient, _ := client.(goredis.UniversalClient)