fix script

This commit is contained in:
tomas 2025-02-27 17:30:33 +08:00
parent 107799f46b
commit 9674ae585d
3 changed files with 10 additions and 1 deletions

View File

@ -13,8 +13,9 @@ else
echo "converter already exists."
fi
cd ../../../
# 执行 converter 文件
./converter go /excel ../internal/exported/excel2go ..
./gamesrv/slotspkg/external/converter go gamesrv/slotspkg/external/excel gamesrv/slotspkg/internal/exported/excel2go ..
echo "Done."
read -p "Press [Enter] to exit..."

View File

@ -127,6 +127,9 @@ func (sm *SlotsMgr) Play(s *base.SlotsSession, req *base.SpinReq) (*cli.SlotsPla
if !global.Mock {
defer player.PushPlayer(s)
}
if res.IsEnd {
m.Close()
}
return res, nil
}
func (*SlotsMgr) PushPlayer(s *base.SlotsSession) map[string]string {

View File

@ -24,6 +24,11 @@ func NewMachine(s *base.SlotsSession, theme string, shell *shell.Shell, isFree b
m := &Machine{}
m.Entity = entity.NewEntity(s, theme, m, shell, isFree)
m.Init()
oldMachineInter := m.Session.Value(key.SessionMachine)
if oldMachineInter != nil {
oldMachine := oldMachineInter.(*Machine)
m.Data = oldMachine.Data
}
m.Session.Set(key.SessionMachine, m)
return m
}