package assemble import ( "encoding/json" "mongo.games.com/game/gamesrv/slotspkg/internal/module/shared" "strings" ) type CustomFortune struct { FreeStatus int `json:"fss"` //free状态 FreeSpinNum int64 `json:"fsn"` //剩余freespin FreeNumMax int64 `json:"fnm"` //总次数 FreeNumTrigger int64 `json:"fnt"` //新增freespin ForceRound int64 `json:"fr"` //第n次 ScatterWin int64 `json:"sw,omitempty"` } func getDataByTheme(NodeTree *shared.LiteNodeTree) (map[int64]*shared.SpinLock, CustomFortune, int64) { var Special = make(map[int64]*shared.SpinLock) var customFortune CustomFortune var FeatureTotalWin int64 for _, feature := range NodeTree.Features { if strings.Contains(feature.Type, "Special") && len(feature.Custom) > 2 { sp := shared.SpinLock{} json.Unmarshal([]byte(feature.Custom), &sp) Special[feature.NodeID] = &sp json.Unmarshal([]byte(feature.Custom), &customFortune) } FeatureTotalWin += feature.Win } return Special, customFortune, FeatureTotalWin }