接龙新增本周最高记录字段

This commit is contained in:
meixiongfeng 2023-10-17 16:17:28 +08:00
parent 684892291f
commit 2167ade864
12 changed files with 171 additions and 102 deletions

View File

@ -112,6 +112,7 @@ const (
ModuleVenture core.M_Modules = "venture" // ModuleVenture core.M_Modules = "venture" //
ModuleAchieve core.M_Modules = "achieve" //全局成就 ModuleAchieve core.M_Modules = "achieve" //全局成就
ModuleJielong core.M_Modules = "jielong" // ModuleJielong core.M_Modules = "jielong" //
ModuleEntertainment core.M_Modules = "entertainment" //
) )
// 数据表名定义处 // 数据表名定义处

View File

@ -23,7 +23,7 @@ type Entertainment struct {
// 模块名 // 模块名
func (this *Entertainment) GetType() core.M_Modules { func (this *Entertainment) GetType() core.M_Modules {
return comm.ModuleDragon return comm.ModuleEntertainment
} }
// 模块初始化接口 注册用户创建角色事件 // 模块初始化接口 注册用户创建角色事件
@ -42,11 +42,16 @@ func (this *Entertainment) OnInstallComp() {
this.model = this.RegisterComp(new(modelComp)).(*modelComp) this.model = this.RegisterComp(new(modelComp)).(*modelComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.gameMgr = this.RegisterComp(new(gameMgrComp)).(*gameMgrComp) this.gameMgr = this.RegisterComp(new(gameMgrComp)).(*gameMgrComp)
//this.xxl = this.RegisterComp(new(MapData)).(*MapData)
} }
func (this *Entertainment) Start() (err error) { func (this *Entertainment) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil { if err = this.ModuleBase.Start(); err != nil {
return return
} }
this.xxl = new(MapData)
this.xxl.InitMap()
this.xxl.SwapGirde(1, 0)
return return
} }

View File

@ -8,9 +8,6 @@ import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules/entertainment" "go_dreamfactory/modules/entertainment"
"go_dreamfactory/modules/equipment"
"go_dreamfactory/modules/items"
"go_dreamfactory/modules/user"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/services" "go_dreamfactory/services"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
@ -56,23 +53,36 @@ func (this *TestService) InitSys() {
} }
} }
var (
conf = flag.String("conf", "../../bin/conf/worker_1.yaml", "获取需要启动的服务配置文件") //启动服务的Id
)
type Service struct {
services.ServiceBase
}
func NewService(ops ...rpcx.Option) core.IService {
s := new(Service)
s.Configure(ops...)
return s
}
func Test_Main(t *testing.T) { func Test_Main(t *testing.T) {
service = newService( flag.Parse()
rpcx.SetConfPath("../../bin/conf/worker_1.yaml"), s := NewService(
rpcx.SetConfPath(*conf),
rpcx.SetVersion("1.0.0.0"),
) )
service.OnInstallComp( //装备组件 s.OnInstallComp( //装备组件
s_gateComp, //此服务需要接受用户的消息 需要装备网关组件 services.NewGateRouteComp(), //此服务需要接受用户的消息 需要装备网关组件
) )
go func() { go func() {
lego.Run(service, //运行模块 lego.Run(s, //运行模块
entertainment.NewModule(), entertainment.NewModule(),
items.NewModule(),
user.NewModule(),
equipment.NewModule(),
) )
}() }()
time.Sleep(time.Second * 2) time.Sleep(time.Second * 2000)
//equipment.CloneEquipment() //equipment.CloneEquipment()
} }
@ -98,3 +108,16 @@ func wordSepNormalizeFunc(f *flag.FlagSet, name string) flag.NormalizedName {
} }
return flag.NormalizedName(name) return flag.NormalizedName(name)
} }
// 初始化worker需要的一些系统工具
func (this *Service) InitSys() {
this.ServiceBase.InitSys()
//初始化配置中心系统 每个服务都会用到的就在这个初始化就好
//存储系统
if err := db.OnInit(this.GetSettings().Sys["db"], db.SetServiceId(this.GetTag())); err != nil {
panic(fmt.Sprintf("init sys.db err: %s", err.Error()))
} else {
log.Infof("init sys.db success!")
}
}

View File

@ -3,6 +3,7 @@ package entertainment
import ( import (
"crypto/rand" "crypto/rand"
"fmt" "fmt"
"go_dreamfactory/lego/core"
"math/big" "math/big"
) )
@ -23,6 +24,11 @@ type MapData struct {
Data map[int32]*Girde // 地图数据 Data map[int32]*Girde // 地图数据
} }
func (this *MapData) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.Data = make(map[int32]*Girde, Width*Height)
return
}
// func (this *MapData) init() { // func (this *MapData) init() {
// this.Data = make(map[int32]*Girde, Width*Height) // this.Data = make(map[int32]*Girde, Width*Height)
// } // }
@ -50,7 +56,7 @@ func (this *MapData) GetKeyData(key int32) (data *Girde) {
// 初始化地图数据 // 初始化地图数据
func (this *MapData) InitMap() { func (this *MapData) InitMap() {
this.Data = make(map[int32]*Girde, Width*Height) this.Data = make(map[int32]*Girde, Width*Height)
for i := 0; i < Width; i++ { for i := Width - 1; i >= 0; i-- {
for j := 0; j < Height; j++ { for j := 0; j < Height; j++ {
tmp := GetRandType() tmp := GetRandType()
key := int32(i*10 + j) key := int32(i*10 + j)
@ -62,14 +68,14 @@ func (this *MapData) InitMap() {
Itype: tmp, Itype: tmp,
} }
// 校验 检查格子的左边的左边 和下边和下下边 // 校验 检查格子的左边的左边 和下边和下下边
if j-2 > 0 { if j-2 >= 0 {
i1 := this.GetKeyType(int32(i*10 + j - 1)) i1 := this.GetKeyType(int32(i*10 + j - 1))
i2 := this.GetKeyType(int32(i*10 + j - 2)) i2 := this.GetKeyType(int32(i*10 + j - 2))
if i1 == i2 && tmp == i1 { if i1 == i2 && tmp == i1 {
bOk = false bOk = false
} }
} }
if i-2 > 0 { if i-2 >= 0 {
i1 := this.GetKeyType(int32((i-1)*10 + j)) i1 := this.GetKeyType(int32((i-1)*10 + j))
i2 := this.GetKeyType(int32((i-2)*10 + j)) i2 := this.GetKeyType(int32((i-2)*10 + j))
if i1 == i2 && tmp == i1 { if i1 == i2 && tmp == i1 {
@ -86,11 +92,14 @@ func (this *MapData) InitMap() {
} }
this.Data[key].Itype = tmp this.Data[key].Itype = tmp
} }
fmt.Printf("key:%d,x:%d,y:%d,type:%d \n", key, i, j, tmp)
} }
} }
this.Debugf()
} }
// 交换2个元素 // 交换2个元素(参数 id )
func (this *MapData) SwapGirde(i, j int32) bool { func (this *MapData) SwapGirde(i, j int32) bool {
var ( var (
bSwap bool // 能否交换 bSwap bool // 能否交换
@ -103,7 +112,7 @@ func (this *MapData) SwapGirde(i, j int32) bool {
} }
// 校验是不是挨着的 // 校验是不是挨着的
if g1.X+1 == g2.X { if g1.X-1 == g2.X {
bSwap = true bSwap = true
} }
if g1.X+1 == g2.X { if g1.X+1 == g2.X {
@ -112,17 +121,33 @@ func (this *MapData) SwapGirde(i, j int32) bool {
if g1.Y+1 == g2.Y { if g1.Y+1 == g2.Y {
bSwap = true bSwap = true
} }
if g1.Y+1 == g2.Y { if g1.Y-1 == g2.Y {
bSwap = true bSwap = true
} }
// 更新地图数据 // 更新地图数据
tmp = new(Girde) tmp = &Girde{
*tmp = *g1 X: g1.X,
Y: g1.Y,
ID: g1.ID,
Itype: g1.Itype,
}
this.Data[i] = g2 this.Data[i] = g2
this.Data[j] = tmp this.Data[j] = tmp
this.Debugf()
return bSwap return bSwap
} }
func (this *MapData) Debugf() {
fmt.Printf("================\n")
for i := Width - 1; i >= 0; i-- {
for j := 0; j < Height; j++ {
key := int32(i*10 + j)
fmt.Printf("%d-%d-%d ", i, j, this.Data[key].Itype)
}
fmt.Printf("\n")
}
}
// 校验地图可消除的 判断各组上面2个和右边两个是否三个相等 // 校验地图可消除的 判断各组上面2个和右边两个是否三个相等
func (this *MapData) CheckMap() { func (this *MapData) CheckMap() {
var ( var (
@ -130,7 +155,7 @@ func (this *MapData) CheckMap() {
) )
del = map[int32]struct{}{} del = map[int32]struct{}{}
for i := 0; i < Width; i++ { for i := Width - 1; i >= 0; i-- {
for j := 0; j < Height; j++ { for j := 0; j < Height; j++ {
key := int32(i*10 + j) key := int32(i*10 + j)
iType := this.GetKeyType(key) iType := this.GetKeyType(key)
@ -167,7 +192,7 @@ func (this *MapData) CheckMap() {
// 下落 生成新的格子 // 下落 生成新的格子
func (this *MapData) DropGirde() (Data map[int32]*Girde) { func (this *MapData) DropGirde() (Data map[int32]*Girde) {
for i := 0; i < Width; i++ { for i := Width - 1; i >= 0; i-- {
for j := 0; j < Height; j++ { for j := 0; j < Height; j++ {
key := int32(i*10 + j) key := int32(i*10 + j)
var sz []*Girde var sz []*Girde

View File

@ -35,10 +35,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.JielongGetListRe
if list.Lasttime < configure.Now().Unix() { if list.Lasttime < configure.Now().Unix() {
update := make(map[string]interface{}, 0) update := make(map[string]interface{}, 0)
list.Lasttime = utils.WeekIntervalTime() list.Lasttime = utils.WeekIntervalTime()
list.Wincount = 0 list.Curwin = 0 // 本周连胜
list.Weekmax = 0 // 本周最大连胜
list.Reward = map[int32]int32{} list.Reward = map[int32]int32{}
update["lasttime"] = list.Lasttime update["lasttime"] = list.Lasttime
update["wincount"] = list.Wincount update["curwin"] = list.Curwin
update["weekmax"] = list.Weekmax
update["reward"] = list.Reward update["reward"] = list.Reward
this.module.modelJielong.changeJielongData(session.GetUserId(), update) this.module.modelJielong.changeJielongData(session.GetUserId(), update)
} }

View File

@ -34,15 +34,19 @@ func (this *apiComp) Result(session comm.IUserSession, req *pb.JielongResultReq)
list.Status = 0 list.Status = 0
update["status"] = list.Status // 重置状态 update["status"] = list.Status // 重置状态
if req.Bwin { if req.Bwin {
list.Wincount += 1 // 连胜+1 list.Curwin += 1 // 连胜+1
if list.Wincount > list.Hisotry { if list.Curwin > list.Weekmax {
list.Hisotry = list.Wincount list.Weekmax = list.Curwin
update["weekmax"] = list.Weekmax
}
if list.Weekmax > list.Hisotry {
list.Hisotry = list.Weekmax
update["hisotry"] = list.Hisotry update["hisotry"] = list.Hisotry
} }
} else { } else {
list.Wincount = 0 // 连胜清零 list.Curwin = 0 // 连胜清零
} }
update["wincount"] = list.Wincount update["curwin"] = list.Curwin
this.module.modelJielong.changeJielongData(session.GetUserId(), update) this.module.modelJielong.changeJielongData(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "result", &pb.JielongResultResp{ session.SendMsg(string(this.module.GetType()), "result", &pb.JielongResultResp{
Data: list, Data: list,

View File

@ -44,7 +44,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.JielongRewardReq)
return return
} else { } else {
for _, v := range c { for _, v := range c {
if list.Wincount >= v.Condition { if list.Weekmax >= v.Condition {
if _, ok := list.Reward[v.Condition]; !ok { if _, ok := list.Reward[v.Condition]; !ok {
res = append(res, v.Reward...) res = append(res, v.Reward...)
list.Reward[v.Condition] = 1 list.Reward[v.Condition] = 1

View File

@ -7,12 +7,12 @@ import (
) )
// 参数校验 // 参数校验
func (this *apiComp) StartGameCheck(session comm.IUserSession, req *pb.JielongStarGameReq) (errdata *pb.ErrorData) { func (this *apiComp) StartGameCheck(session comm.IUserSession, req *pb.JielongStartGameReq) (errdata *pb.ErrorData) {
return return
} }
func (this *apiComp) StartGame(session comm.IUserSession, req *pb.JielongStarGameReq) (errdata *pb.ErrorData) { func (this *apiComp) StartGame(session comm.IUserSession, req *pb.JielongStartGameReq) (errdata *pb.ErrorData) {
var ( var (
list *pb.DBJielongData list *pb.DBJielongData
err error err error
@ -39,13 +39,13 @@ func (this *apiComp) StartGame(session comm.IUserSession, req *pb.JielongStarGam
return return
} }
if list.Status == 1 { if list.Status == 1 {
list.Wincount = 0 list.Curwin = 0
update["wincount"] = list.Wincount update["curwin"] = list.Curwin
} }
if len(update) > 0 { if len(update) > 0 {
this.module.modelJielong.changeJielongData(session.GetUserId(), update) this.module.modelJielong.changeJielongData(session.GetUserId(), update)
} }
session.SendMsg(string(this.module.GetType()), "startgame", &pb.JielongStarGameResp{ session.SendMsg(string(this.module.GetType()), "startgame", &pb.JielongStartGameResp{
Susses: true, Susses: true,
}) })
return return

View File

@ -38,9 +38,7 @@ func (this *ModelJielong) getUserJielongData(uid string) (results *pb.DBJielongD
results = &pb.DBJielongData{ results = &pb.DBJielongData{
Id: primitive.NewObjectID().Hex(), Id: primitive.NewObjectID().Hex(),
Uid: uid, Uid: uid,
Wincount: 0,
Reward: map[int32]int32{}, Reward: map[int32]int32{},
Hisotry: 0,
Gotarr: map[int32]int32{}, Gotarr: map[int32]int32{},
Lasttime: utils.WeekIntervalTime(), Lasttime: utils.WeekIntervalTime(),
} }

View File

@ -28,12 +28,13 @@ type DBJielongData struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
Wincount int32 `protobuf:"varint,3,opt,name=wincount,proto3" json:"wincount"` // 次数 Curwin int32 `protobuf:"varint,3,opt,name=curwin,proto3" json:"curwin"` // 本周连胜次数
Reward map[int32]int32 `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` Reward map[int32]int32 `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Hisotry int32 `protobuf:"varint,5,opt,name=hisotry,proto3" json:"hisotry"` // 历史最高连胜次数 Hisotry int32 `protobuf:"varint,5,opt,name=hisotry,proto3" json:"hisotry"` // 历史最高连胜次数
Gotarr map[int32]int32 `protobuf:"bytes,6,rep,name=gotarr,proto3" json:"gotarr" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 历史最高记录奖励 Gotarr map[int32]int32 `protobuf:"bytes,6,rep,name=gotarr,proto3" json:"gotarr" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 历史最高记录奖励
Lasttime int64 `protobuf:"varint,7,opt,name=lasttime,proto3" json:"lasttime"` Lasttime int64 `protobuf:"varint,7,opt,name=lasttime,proto3" json:"lasttime"`
Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 记录状态 此字段客户端忽略 Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status"` // 记录状态 此字段客户端忽略
Weekmax int32 `protobuf:"varint,9,opt,name=weekmax,proto3" json:"weekmax"` // 本周最大连胜次数
} }
func (x *DBJielongData) Reset() { func (x *DBJielongData) Reset() {
@ -82,9 +83,9 @@ func (x *DBJielongData) GetUid() string {
return "" return ""
} }
func (x *DBJielongData) GetWincount() int32 { func (x *DBJielongData) GetCurwin() int32 {
if x != nil { if x != nil {
return x.Wincount return x.Curwin
} }
return 0 return 0
} }
@ -124,36 +125,44 @@ func (x *DBJielongData) GetStatus() int32 {
return 0 return 0
} }
func (x *DBJielongData) GetWeekmax() int32 {
if x != nil {
return x.Weekmax
}
return 0
}
var File_jielong_jielong_db_proto protoreflect.FileDescriptor var File_jielong_jielong_db_proto protoreflect.FileDescriptor
var file_jielong_jielong_db_proto_rawDesc = []byte{ var file_jielong_jielong_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x2f, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x0a, 0x18, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x2f, 0x6a, 0x69, 0x65, 0x6c, 0x6f, 0x6e,
0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x02, 0x0a, 0x0d, 0x44, 0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x03, 0x0a, 0x0d, 0x44,
0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16,
0x0a, 0x08, 0x77, 0x69, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x77, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
0x52, 0x08, 0x77, 0x69, 0x6e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x75, 0x72, 0x77, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64,
0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f,
0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74,
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69,
0x0a, 0x07, 0x68, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x73, 0x6f, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x69, 0x73,
0x07, 0x68, 0x69, 0x73, 0x6f, 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x6f, 0x74, 0x72, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x18, 0x06,
0x72, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67,
0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74,
0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74,
0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08,
0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x77, 0x65, 0x65, 0x6b, 0x6d, 0x61, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x65, 0x65, 0x6b, 0x6d, 0x61, 0x78, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -303,14 +303,14 @@ func (x *JielongRewardResp) GetRes() []*UserAtno {
} }
// 开始接龙 // 开始接龙
type JielongStarGameReq struct { type JielongStartGameReq struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
} }
func (x *JielongStarGameReq) Reset() { func (x *JielongStartGameReq) Reset() {
*x = JielongStarGameReq{} *x = JielongStartGameReq{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_jielong_jielong_msg_proto_msgTypes[6] mi := &file_jielong_jielong_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -318,13 +318,13 @@ func (x *JielongStarGameReq) Reset() {
} }
} }
func (x *JielongStarGameReq) String() string { func (x *JielongStartGameReq) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*JielongStarGameReq) ProtoMessage() {} func (*JielongStartGameReq) ProtoMessage() {}
func (x *JielongStarGameReq) ProtoReflect() protoreflect.Message { func (x *JielongStartGameReq) ProtoReflect() protoreflect.Message {
mi := &file_jielong_jielong_msg_proto_msgTypes[6] mi := &file_jielong_jielong_msg_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -336,12 +336,12 @@ func (x *JielongStarGameReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use JielongStarGameReq.ProtoReflect.Descriptor instead. // Deprecated: Use JielongStartGameReq.ProtoReflect.Descriptor instead.
func (*JielongStarGameReq) Descriptor() ([]byte, []int) { func (*JielongStartGameReq) Descriptor() ([]byte, []int) {
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{6} return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{6}
} }
type JielongStarGameResp struct { type JielongStartGameResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -349,8 +349,8 @@ type JielongStarGameResp struct {
Susses bool `protobuf:"varint,1,opt,name=susses,proto3" json:"susses"` Susses bool `protobuf:"varint,1,opt,name=susses,proto3" json:"susses"`
} }
func (x *JielongStarGameResp) Reset() { func (x *JielongStartGameResp) Reset() {
*x = JielongStarGameResp{} *x = JielongStartGameResp{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_jielong_jielong_msg_proto_msgTypes[7] mi := &file_jielong_jielong_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -358,13 +358,13 @@ func (x *JielongStarGameResp) Reset() {
} }
} }
func (x *JielongStarGameResp) String() string { func (x *JielongStartGameResp) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*JielongStarGameResp) ProtoMessage() {} func (*JielongStartGameResp) ProtoMessage() {}
func (x *JielongStarGameResp) ProtoReflect() protoreflect.Message { func (x *JielongStartGameResp) ProtoReflect() protoreflect.Message {
mi := &file_jielong_jielong_msg_proto_msgTypes[7] mi := &file_jielong_jielong_msg_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -376,12 +376,12 @@ func (x *JielongStarGameResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use JielongStarGameResp.ProtoReflect.Descriptor instead. // Deprecated: Use JielongStartGameResp.ProtoReflect.Descriptor instead.
func (*JielongStarGameResp) Descriptor() ([]byte, []int) { func (*JielongStartGameResp) Descriptor() ([]byte, []int) {
return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{7} return file_jielong_jielong_msg_proto_rawDescGZIP(), []int{7}
} }
func (x *JielongStarGameResp) GetSusses() bool { func (x *JielongStartGameResp) GetSusses() bool {
if x != nil { if x != nil {
return x.Susses return x.Susses
} }
@ -413,13 +413,13 @@ var file_jielong_jielong_msg_proto_rawDesc = []byte{
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x4a, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x4a,
0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x12, 0x1b, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x12, 0x1b, 0x0a, 0x03, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x14, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x73, 0x22, 0x15, 0x0a,
0x12, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x13, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, 0x74, 0x47, 0x61, 0x6d,
0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x13, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x53, 0x74, 0x65, 0x52, 0x65, 0x71, 0x22, 0x2e, 0x0a, 0x14, 0x4a, 0x69, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x53,
0x61, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x74, 0x61, 0x72, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06,
0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x75, 0x73, 0x73, 0x73, 0x75, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x75,
0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x73, 0x73, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x33, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -436,16 +436,16 @@ func file_jielong_jielong_msg_proto_rawDescGZIP() []byte {
var file_jielong_jielong_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_jielong_jielong_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_jielong_jielong_msg_proto_goTypes = []interface{}{ var file_jielong_jielong_msg_proto_goTypes = []interface{}{
(*JielongGetListReq)(nil), // 0: JielongGetListReq (*JielongGetListReq)(nil), // 0: JielongGetListReq
(*JielongGetListResp)(nil), // 1: JielongGetListResp (*JielongGetListResp)(nil), // 1: JielongGetListResp
(*JielongResultReq)(nil), // 2: JielongResultReq (*JielongResultReq)(nil), // 2: JielongResultReq
(*JielongResultResp)(nil), // 3: JielongResultResp (*JielongResultResp)(nil), // 3: JielongResultResp
(*JielongRewardReq)(nil), // 4: JielongRewardReq (*JielongRewardReq)(nil), // 4: JielongRewardReq
(*JielongRewardResp)(nil), // 5: JielongRewardResp (*JielongRewardResp)(nil), // 5: JielongRewardResp
(*JielongStarGameReq)(nil), // 6: JielongStarGameReq (*JielongStartGameReq)(nil), // 6: JielongStartGameReq
(*JielongStarGameResp)(nil), // 7: JielongStarGameResp (*JielongStartGameResp)(nil), // 7: JielongStartGameResp
(*DBJielongData)(nil), // 8: DBJielongData (*DBJielongData)(nil), // 8: DBJielongData
(*UserAtno)(nil), // 9: UserAtno (*UserAtno)(nil), // 9: UserAtno
} }
var file_jielong_jielong_msg_proto_depIdxs = []int32{ var file_jielong_jielong_msg_proto_depIdxs = []int32{
8, // 0: JielongGetListResp.data:type_name -> DBJielongData 8, // 0: JielongGetListResp.data:type_name -> DBJielongData
@ -540,7 +540,7 @@ func file_jielong_jielong_msg_proto_init() {
} }
} }
file_jielong_jielong_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_jielong_jielong_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*JielongStarGameReq); i { switch v := v.(*JielongStartGameReq); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -552,7 +552,7 @@ func file_jielong_jielong_msg_proto_init() {
} }
} }
file_jielong_jielong_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_jielong_jielong_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*JielongStarGameResp); i { switch v := v.(*JielongStartGameResp); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:

View File

@ -20,6 +20,7 @@ import (
"go_dreamfactory/modules/dispatch" "go_dreamfactory/modules/dispatch"
"go_dreamfactory/modules/dragon" "go_dreamfactory/modules/dragon"
"go_dreamfactory/modules/enchant" "go_dreamfactory/modules/enchant"
"go_dreamfactory/modules/entertainment"
"go_dreamfactory/modules/equipment" "go_dreamfactory/modules/equipment"
"go_dreamfactory/modules/forum" "go_dreamfactory/modules/forum"
"go_dreamfactory/modules/friend" "go_dreamfactory/modules/friend"
@ -165,6 +166,7 @@ func main() {
venture.NewModule(), venture.NewModule(),
achieve.NewModule(), achieve.NewModule(),
jielong.NewModule(), jielong.NewModule(),
entertainment.NewModule(),
) )
} }