52 lines
1.4 KiB
Go
52 lines
1.4 KiB
Go
package fortunemouse
|
|
|
|
import (
|
|
"mongo.games.com/game/gamerule/fortunemouse"
|
|
"mongo.games.com/game/gamesrv/base"
|
|
"mongo.games.com/game/gamesrv/slotspkg/slots"
|
|
)
|
|
|
|
type FortuneMousePlayerData struct {
|
|
*base.Player
|
|
leaveTime int32 //离开时间
|
|
SlotsSession *base.SlotsSession
|
|
|
|
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
|
|
BetLevelIndex int64 `json:"bli"` //选中的等级下标
|
|
BetLineIndex int64 `json:"bii"` //选中的线数下标
|
|
BetMode int64 `json:"bm,optional"` //0.常规 1.必中
|
|
|
|
taxCoin int64
|
|
winCoin int64
|
|
currentLogId string
|
|
totalBet int64
|
|
|
|
isRespin bool //只用于判断是否可以离开
|
|
}
|
|
|
|
type SpinLock struct {
|
|
ReSpinStatus int `json:"rs,omitempty"` //0.默认 1.第一次触发 2.进行中 3.结束
|
|
//OXSpecial
|
|
NewSuperStack []int64 `json:"nss,omitempty"`
|
|
}
|
|
|
|
func (p *FortuneMousePlayerData) init() {
|
|
p.SlotsSession = base.NewSession(uint64(p.SnId), p.Coin*fortunemouse.NowByte)
|
|
}
|
|
func (p *FortuneMousePlayerData) Clear() {
|
|
p.taxCoin = 0
|
|
p.winCoin = 0
|
|
p.currentLogId = ""
|
|
}
|
|
|
|
// 需要带到world上进行数据处理
|
|
func (p *FortuneMousePlayerData) PushPlayer() map[string]string {
|
|
cache := slots.SlotsMgrSington.PushPlayer(p.SlotsSession)
|
|
return cache
|
|
}
|
|
|
|
// 进房的时候需要带进来
|
|
func (p *FortuneMousePlayerData) PullPlayer(data map[string]string) {
|
|
slots.SlotsMgrSington.PullPlayer(p.SlotsSession, data)
|
|
}
|