You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
540 B
25 lines
540 B
|
1 year ago
|
package crash
|
||
|
|
|
||
|
|
import (
|
||
|
|
"server/game"
|
||
|
|
"server/pb"
|
||
|
|
"strconv"
|
||
|
|
|
||
|
|
"github.com/liangdas/mqant/module"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Sub struct {
|
||
|
|
*game.Module
|
||
|
|
}
|
||
|
|
|
||
|
|
var Module = func() module.Module {
|
||
|
|
m := game.NewModule(int(pb.ServerType_ServerTypeCrash), game.GameTypeMillion, "Crash", NewTable)
|
||
|
|
m.Sub = &Sub{Module: m}
|
||
|
|
return m
|
||
|
|
}
|
||
|
|
|
||
|
|
func (s *Sub) RegistHandler() {
|
||
|
|
s.GetServer().RegisterGO("/"+strconv.Itoa(int(pb.CrashProtocol_CrashCashOutReq)), OnCashout)
|
||
|
|
s.GetServer().RegisterGO("/"+strconv.Itoa(int(pb.CrashProtocol_CrashAutoCashoutReq)), OnAutoCashout)
|
||
|
|
}
|