Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
c8c9fec17d
274
bin/json/game_catchrabbitreward.json
Normal file
274
bin/json/game_catchrabbitreward.json
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"key": 1001,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 2,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1002,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 3,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1003,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 4,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1004,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 5,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1005,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 6,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1006,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 7,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1007,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 8,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 1008,
|
||||||
|
"type": 1,
|
||||||
|
"condition": 9,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2001,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 2,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2002,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 3,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2003,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 4,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2004,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 5,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2005,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 6,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2006,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 7,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2007,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 8,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": 2008,
|
||||||
|
"type": 2,
|
||||||
|
"condition": 9,
|
||||||
|
"reward": [
|
||||||
|
{
|
||||||
|
"a": "item",
|
||||||
|
"t": "10000001",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 100000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -3,6 +3,7 @@ package caninerabbit
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.CanineRabbitAwardReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.CanineRabbitAwardReq) (errdata *pb.ErrorData) {
|
||||||
@ -11,6 +12,7 @@ func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.CanineRabbitA
|
|||||||
|
|
||||||
func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardReq) (errdata *pb.ErrorData) {
|
||||||
var (
|
var (
|
||||||
|
conf *cfg.GameCatchrabbitrewardData
|
||||||
info *pb.DBCanineRabbit
|
info *pb.DBCanineRabbit
|
||||||
atno []*pb.UserAtno
|
atno []*pb.UserAtno
|
||||||
ok bool
|
ok bool
|
||||||
@ -19,6 +21,13 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardR
|
|||||||
if errdata = this.AwardCheck(session, req); errdata != nil {
|
if errdata = this.AwardCheck(session, req); errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if conf, err = this.module.configure.getGameGColorRewardData(req.Id); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
|
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
@ -27,14 +36,34 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardR
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok = info.Award[req.Id]; ok {
|
if _, ok = info.Award[req.Id]; ok {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ReqParameterError,
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
Message: "Allaward Claimed!",
|
Message: "Allaward Claimed!",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if conf.Type == 1 {
|
||||||
session.SendMsg(string(this.module.GetType()), "info", &pb.CanineRabbitAwardResp{Id: req.Id, Award: atno})
|
if info.Rabbitintegral < conf.Condition {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ActivityCantReward,
|
||||||
|
Message: "Rabbitintegral no enough",
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if info.Houndintegral < conf.Condition {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ActivityCantReward,
|
||||||
|
Message: "Houndintegral no enough",
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Id: req.Id, Award: atno})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -3,22 +3,19 @@ package caninerabbit
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
|
||||||
"math"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//接受切磋
|
//接受切磋
|
||||||
|
|
||||||
func (this *apiComp) SingleOverCheck(session comm.IUserSession, req *pb.DColorSingleOverReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) SingleOverCheck(session comm.IUserSession, req *pb.CanineRabbitSingleOverReq) (errdata *pb.ErrorData) {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleOverReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.CanineRabbitSingleOverReq) (errdata *pb.ErrorData) {
|
||||||
var (
|
var (
|
||||||
info *pb.DBCanineRabbit
|
info *pb.DBCanineRabbit
|
||||||
conf *cfg.GameGColorGetfractionData
|
integral int32
|
||||||
tconf *cfg.GameGColortTmedecayData
|
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
if errdata = this.SingleOverCheck(session, req); errdata != nil {
|
if errdata = this.SingleOverCheck(session, req); errdata != nil {
|
||||||
@ -31,24 +28,17 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if conf, err = this.module.configure.getGameGColorGetfractionData(int32(req.Difficulty)+1, req.Repeat, len(req.Handles)-1); err != nil {
|
if req.Stype == 0 {
|
||||||
errdata = &pb.ErrorData{
|
info.Rabbitintegral += 1
|
||||||
Code: pb.ErrorCode_ConfigNoFound,
|
integral = info.Rabbitintegral
|
||||||
Message: err.Error(),
|
} else {
|
||||||
}
|
info.Houndintegral += 1
|
||||||
return
|
integral = info.Houndintegral
|
||||||
}
|
|
||||||
if tconf, err = this.module.configure.getGameGColortTmedecayData(req.Time); err != nil {
|
|
||||||
errdata = &pb.ErrorData{
|
|
||||||
Code: pb.ErrorCode_ConfigNoFound,
|
|
||||||
Message: err.Error(),
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
info.Integral += int32(math.Floor(float64(conf.Fraction) * float64(tconf.Pro) / float64(1000)))
|
|
||||||
if err = this.module.model.Change(session.GetUserId(), map[string]interface{}{
|
if err = this.module.model.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"integral": info.Integral,
|
"rabbitintegral": info.Rabbitintegral,
|
||||||
|
"houndintegral": info.Houndintegral,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_DBError,
|
Code: pb.ErrorCode_DBError,
|
||||||
@ -56,6 +46,6 @@ func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.DColorSingleO
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "singleover", &pb.DColorSingleOverResp{Integral: info.Integral})
|
session.SendMsg(string(this.module.GetType()), "singleover", &pb.DColorSingleOverResp{Integral: integral})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
48
modules/caninerabbit/api_win.go
Normal file
48
modules/caninerabbit/api_win.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package caninerabbit
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
//接受切磋
|
||||||
|
func (this *apiComp) WinCheck(session comm.IUserSession, req *pb.CanineRabbitWinReq) (errdata *pb.ErrorData) {
|
||||||
|
if req.Roomid == "" {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) Win(session comm.IUserSession, req *pb.CanineRabbitWinReq) (errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
room *Room
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
|
||||||
|
if errdata = this.WinCheck(session, req); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.String(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = room.PlayerWin(session.GetUserId(), req); errdata != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.String(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
session.SendMsg(string(this.module.GetType()), "handle", &pb.DColorHandleResp{})
|
||||||
|
return
|
||||||
|
}
|
@ -1,130 +1,41 @@
|
|||||||
package caninerabbit
|
package caninerabbit
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/sys/configure"
|
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
game_gcolorgetfraction = "game_gcolorgetfraction.json"
|
game_catchrabbitreward = "game_catchrabbitreward.json"
|
||||||
game_gcolorreward = "game_gcolorreward.json"
|
|
||||||
game_gcolorttmedecay = "game_gcolorttmedecay.json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type configureComp struct {
|
type configureComp struct {
|
||||||
modules.MCompConfigure
|
modules.MCompConfigure
|
||||||
module *CanineRabbit
|
module *CanineRabbit
|
||||||
lock sync.RWMutex
|
|
||||||
repeatMap map[int32][]*cfg.GameGColorGetfractionData
|
|
||||||
norepeatMap map[int32][]*cfg.GameGColorGetfractionData
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||||
this.module = module.(*CanineRabbit)
|
this.module = module.(*CanineRabbit)
|
||||||
this.repeatMap = make(map[int32][]*cfg.GameGColorGetfractionData)
|
|
||||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||||
game_gcolorreward: cfg.NewGameGColorReward,
|
game_catchrabbitreward: cfg.NewGameCatchrabbitreward,
|
||||||
game_gcolorttmedecay: cfg.NewGameGColortTmedecay,
|
|
||||||
})
|
})
|
||||||
configure.RegisterConfigure(game_gcolorgetfraction, cfg.NewGameGColorGetfraction, this.updateconfigure)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新任务配置表
|
|
||||||
func (this *configureComp) updateconfigure() {
|
|
||||||
var (
|
|
||||||
v interface{}
|
|
||||||
conf *cfg.GameGColorGetfraction
|
|
||||||
ok bool
|
|
||||||
err error
|
|
||||||
)
|
|
||||||
if v, err = this.GetConfigure(game_gcolorgetfraction); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if conf, ok = v.(*cfg.GameGColorGetfraction); !ok {
|
|
||||||
this.module.Error("日常任务配置异常!")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
repeatMap := map[int32][]*cfg.GameGColorGetfractionData{}
|
|
||||||
norepeatMap := map[int32][]*cfg.GameGColorGetfractionData{}
|
|
||||||
for _, v := range conf.GetDataList() {
|
|
||||||
if v.Repeat == 1 {
|
|
||||||
if _, ok = repeatMap[v.Difficulty]; !ok {
|
|
||||||
repeatMap[v.Difficulty] = make([]*cfg.GameGColorGetfractionData, 0)
|
|
||||||
}
|
|
||||||
repeatMap[v.Difficulty] = append(repeatMap[v.Difficulty], v)
|
|
||||||
} else {
|
|
||||||
if _, ok = norepeatMap[v.Difficulty]; !ok {
|
|
||||||
norepeatMap[v.Difficulty] = make([]*cfg.GameGColorGetfractionData, 0)
|
|
||||||
}
|
|
||||||
norepeatMap[v.Difficulty] = append(norepeatMap[v.Difficulty], v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.lock.Lock()
|
|
||||||
this.repeatMap = repeatMap
|
|
||||||
this.norepeatMap = norepeatMap
|
|
||||||
this.lock.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *configureComp) getGameGColorGetfractionData(dif int32, repeat bool, index int) (conf *cfg.GameGColorGetfractionData, err error) {
|
|
||||||
var (
|
|
||||||
confs map[int32][]*cfg.GameGColorGetfractionData
|
|
||||||
ok bool
|
|
||||||
)
|
|
||||||
if repeat {
|
|
||||||
confs = this.repeatMap
|
|
||||||
} else {
|
|
||||||
confs = this.norepeatMap
|
|
||||||
}
|
|
||||||
|
|
||||||
if _, ok = confs[dif]; ok {
|
|
||||||
if len(confs[dif]) > index {
|
|
||||||
conf = confs[dif][index]
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_gcolorgetfraction, fmt.Sprintf("dif:%d repeat:%v index:%d", dif, repeat, index))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取伤害对应的评分组
|
|
||||||
func (this *configureComp) getGameGColortTmedecayData(time int32) (conf *cfg.GameGColortTmedecayData, err error) {
|
|
||||||
var (
|
|
||||||
v interface{}
|
|
||||||
)
|
|
||||||
|
|
||||||
if v, err = this.GetConfigure(game_gcolorttmedecay); err != nil {
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
for _, v := range v.(*cfg.GameGColortTmedecay).GetDataList() {
|
|
||||||
if (time >= v.Min || v.Min == -1) && (time <= v.Max || v.Max == -1) {
|
|
||||||
conf = v
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_gcolorttmedecay, time)
|
|
||||||
this.module.Errorf("err:%v", err)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取奖励列表
|
// 获取奖励列表
|
||||||
func (this *configureComp) getGameGColorRewardData(id int32) (conf *cfg.GameGColorRewardData, err error) {
|
func (this *configureComp) getGameGColorRewardData(id int32) (conf *cfg.GameCatchrabbitrewardData, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
ok bool
|
ok bool
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(game_gcolorreward); err != nil {
|
if v, err = this.GetConfigure(game_catchrabbitreward); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if conf, ok = v.(*cfg.GameGColorReward).GetDataMap()[id]; !ok {
|
if conf, ok = v.(*cfg.GameCatchrabbitreward).GetDataMap()[id]; !ok {
|
||||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_gcolorreward, id)
|
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_catchrabbitreward, id)
|
||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
package caninerabbit
|
|
||||||
|
|
||||||
import "go_dreamfactory/pb"
|
|
||||||
|
|
||||||
type GameRules struct {
|
|
||||||
Difficulty pb.DBDColorDifficulty `json:"Difficulty"`
|
|
||||||
Repeat bool `json:"Repeat"`
|
|
||||||
}
|
|
@ -37,7 +37,7 @@ func (this *modelComp) getModel(uid string) (info *pb.DBCanineRabbit, err error)
|
|||||||
info = &pb.DBCanineRabbit{
|
info = &pb.DBCanineRabbit{
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
Uid: uid,
|
Uid: uid,
|
||||||
Integral: 0,
|
Award: make(map[int32]bool),
|
||||||
}
|
}
|
||||||
err = this.Add(uid, info)
|
err = this.Add(uid, info)
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,8 @@ func (this *CanineRabbit) OnInstallComp() {
|
|||||||
|
|
||||||
func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) {
|
func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) {
|
||||||
var (
|
var (
|
||||||
rules *GameRules = &GameRules{}
|
rules *pb.DBCanineRabbitRules = &pb.DBCanineRabbitRules{}
|
||||||
|
chess []*pb.DBCanineRabbitChess
|
||||||
red *pb.DBUser
|
red *pb.DBUser
|
||||||
blue *pb.DBUser
|
blue *pb.DBUser
|
||||||
room *Room
|
room *Room
|
||||||
@ -85,7 +86,34 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
|
|||||||
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()})
|
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
chess = make([]*pb.DBCanineRabbitChess, 0)
|
||||||
roomid = primitive.NewObjectID().Hex()
|
roomid = primitive.NewObjectID().Hex()
|
||||||
|
|
||||||
|
chess = append(chess, &pb.DBCanineRabbitChess{
|
||||||
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
Stype: 0,
|
||||||
|
X: 4,
|
||||||
|
Y: 1,
|
||||||
|
})
|
||||||
|
chess = append(chess, &pb.DBCanineRabbitChess{
|
||||||
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
Stype: 1,
|
||||||
|
X: 1,
|
||||||
|
Y: 0,
|
||||||
|
})
|
||||||
|
chess = append(chess, &pb.DBCanineRabbitChess{
|
||||||
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
Stype: 1,
|
||||||
|
X: 0,
|
||||||
|
Y: 1,
|
||||||
|
})
|
||||||
|
chess = append(chess, &pb.DBCanineRabbitChess{
|
||||||
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
Stype: 1,
|
||||||
|
X: 1,
|
||||||
|
Y: 2,
|
||||||
|
})
|
||||||
|
|
||||||
if room, err = this.rooms.newRoom(&pb.DBCanineRabbitRoom{
|
if room, err = this.rooms.newRoom(&pb.DBCanineRabbitRoom{
|
||||||
Rid: roomid,
|
Rid: roomid,
|
||||||
Red: &pb.DBCanineRabbitRoomPlayer{
|
Red: &pb.DBCanineRabbitRoomPlayer{
|
||||||
@ -94,6 +122,7 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
|
|||||||
Blue: &pb.DBCanineRabbitRoomPlayer{
|
Blue: &pb.DBCanineRabbitRoomPlayer{
|
||||||
Info: comm.GetUserBaseInfo(blue),
|
Info: comm.GetUserBaseInfo(blue),
|
||||||
},
|
},
|
||||||
|
Chess: chess,
|
||||||
}, sessions); err != nil {
|
}, sessions); err != nil {
|
||||||
this.Error("创建房间错误", log.Field{Key: "err", Value: err.Error()})
|
this.Error("创建房间错误", log.Field{Key: "err", Value: err.Error()})
|
||||||
return
|
return
|
||||||
|
@ -52,10 +52,66 @@ func (this *Room) PlayerLoadEnd(uid string) (err error) {
|
|||||||
|
|
||||||
//玩家操作
|
//玩家操作
|
||||||
func (this *Room) PlayerHandle(uid string, handle *pb.CanineRabbitHandleReq) (err error) {
|
func (this *Room) PlayerHandle(uid string, handle *pb.CanineRabbitHandleReq) (err error) {
|
||||||
|
for _, v := range this.data.Chess {
|
||||||
|
if v.Id == handle.Chess.Id {
|
||||||
|
v.X = handle.Chess.X
|
||||||
|
v.Y = handle.Chess.Y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if this.currside == 1 {
|
||||||
|
this.currside = 2
|
||||||
|
} else {
|
||||||
|
this.currside = 1
|
||||||
|
}
|
||||||
|
if err = this.Broadcast("gamehandle", &pb.CanineRabbitGameHandlePush{
|
||||||
|
Roomid: this.data.Rid,
|
||||||
|
Uid: uid,
|
||||||
|
Chess: handle.Chess,
|
||||||
|
}); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//玩家操作
|
||||||
|
func (this *Room) PlayerWin(uid string, handle *pb.CanineRabbitWinReq) (err error) {
|
||||||
|
|
||||||
|
if handle.Iswin {
|
||||||
|
if this.currside == 1 {
|
||||||
|
this.data.Red.Score = 1
|
||||||
|
if this.data.Rules.RedType == 0 {
|
||||||
|
this.data.Red.Rabbitintegral += 1
|
||||||
|
} else {
|
||||||
|
this.data.Red.Houndintegral += 1
|
||||||
|
}
|
||||||
|
this.module.model.Change(this.data.Red.Info.Uid, map[string]interface{}{
|
||||||
|
"rabbitintegral": this.data.Red.Rabbitintegral,
|
||||||
|
"houndintegral": this.data.Red.Houndintegral,
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.data.Blue.Score = 1
|
||||||
|
if this.data.Rules.RedType == 0 {
|
||||||
|
this.data.Blue.Rabbitintegral += 1
|
||||||
|
} else {
|
||||||
|
this.data.Blue.Houndintegral += 1
|
||||||
|
}
|
||||||
|
this.module.model.Change(this.data.Blue.Info.Uid, map[string]interface{}{
|
||||||
|
"rabbitintegral": this.data.Red.Rabbitintegral,
|
||||||
|
"houndintegral": this.data.Red.Houndintegral,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if err = this.Broadcast("gameover", &pb.CanineRabbitGameOverPush{
|
||||||
|
Winside: this.currside,
|
||||||
|
RedIntegral: this.data.Red.Score,
|
||||||
|
BlueIntegral: this.data.Blue.Score,
|
||||||
|
}); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
func (this *Room) Broadcast(stype string, msg proto.Message) (err error) {
|
func (this *Room) Broadcast(stype string, msg proto.Message) (err error) {
|
||||||
if err = this.module.SendMsgToSession(string(this.module.GetType()), stype, msg, this.sessions...); err != nil {
|
if err = this.module.SendMsgToSession(string(this.module.GetType()), stype, msg, this.sessions...); err != nil {
|
||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
|
@ -28,8 +28,9 @@ type DBCanineRabbit 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"`
|
||||||
Integral int32 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral"`
|
Rabbitintegral int32 `protobuf:"varint,3,opt,name=rabbitintegral,proto3" json:"rabbitintegral"` //兔子积分
|
||||||
Award map[int32]bool `protobuf:"bytes,4,rep,name=award,proto3" json:"award" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
Houndintegral int32 `protobuf:"varint,4,opt,name=houndintegral,proto3" json:"houndintegral"` //猎犬积分
|
||||||
|
Award map[int32]bool `protobuf:"bytes,5,rep,name=award,proto3" json:"award" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbit) Reset() {
|
func (x *DBCanineRabbit) Reset() {
|
||||||
@ -78,9 +79,16 @@ func (x *DBCanineRabbit) GetUid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbit) GetIntegral() int32 {
|
func (x *DBCanineRabbit) GetRabbitintegral() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Integral
|
return x.Rabbitintegral
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbit) GetHoundintegral() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Houndintegral
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -92,6 +100,70 @@ func (x *DBCanineRabbit) GetAward() map[int32]bool {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//游戏规则
|
||||||
|
type DBCanineRabbitRules struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
RandomPos bool `protobuf:"varint,1,opt,name=RandomPos,proto3" json:"RandomPos"` //兔子是否是随机坐标
|
||||||
|
RedType int32 `protobuf:"varint,2,opt,name=RedType,proto3" json:"RedType"` //红方选择 0兔子 1猎犬
|
||||||
|
Headstart int32 `protobuf:"varint,3,opt,name=Headstart,proto3" json:"Headstart"` //谁先手 0 兔子 1猎犬
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) Reset() {
|
||||||
|
*x = DBCanineRabbitRules{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DBCanineRabbitRules) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use DBCanineRabbitRules.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DBCanineRabbitRules) Descriptor() ([]byte, []int) {
|
||||||
|
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) GetRandomPos() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.RandomPos
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) GetRedType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RedType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBCanineRabbitRules) GetHeadstart() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Headstart
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type DBCanineRabbitChess struct {
|
type DBCanineRabbitChess struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -106,7 +178,7 @@ type DBCanineRabbitChess struct {
|
|||||||
func (x *DBCanineRabbitChess) Reset() {
|
func (x *DBCanineRabbitChess) Reset() {
|
||||||
*x = DBCanineRabbitChess{}
|
*x = DBCanineRabbitChess{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[1]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -119,7 +191,7 @@ func (x *DBCanineRabbitChess) String() string {
|
|||||||
func (*DBCanineRabbitChess) ProtoMessage() {}
|
func (*DBCanineRabbitChess) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DBCanineRabbitChess) ProtoReflect() protoreflect.Message {
|
func (x *DBCanineRabbitChess) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[1]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -132,7 +204,7 @@ func (x *DBCanineRabbitChess) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DBCanineRabbitChess.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DBCanineRabbitChess.ProtoReflect.Descriptor instead.
|
||||||
func (*DBCanineRabbitChess) Descriptor() ([]byte, []int) {
|
func (*DBCanineRabbitChess) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{1}
|
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitChess) GetId() string {
|
func (x *DBCanineRabbitChess) GetId() string {
|
||||||
@ -172,14 +244,14 @@ type DBCanineRabbitRoomPlayer struct {
|
|||||||
Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"`
|
Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"`
|
||||||
Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"`
|
Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"`
|
||||||
Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"`
|
Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"`
|
||||||
Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"`
|
Rabbitintegral int32 `protobuf:"varint,5,opt,name=rabbitintegral,proto3" json:"rabbitintegral"` //兔子积分
|
||||||
Maxintegral int32 `protobuf:"varint,6,opt,name=maxintegral,proto3" json:"maxintegral"`
|
Houndintegral int32 `protobuf:"varint,6,opt,name=houndintegral,proto3" json:"houndintegral"` //猎犬积分
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoomPlayer) Reset() {
|
func (x *DBCanineRabbitRoomPlayer) Reset() {
|
||||||
*x = DBCanineRabbitRoomPlayer{}
|
*x = DBCanineRabbitRoomPlayer{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[2]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -192,7 +264,7 @@ func (x *DBCanineRabbitRoomPlayer) String() string {
|
|||||||
func (*DBCanineRabbitRoomPlayer) ProtoMessage() {}
|
func (*DBCanineRabbitRoomPlayer) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoomPlayer) ProtoReflect() protoreflect.Message {
|
func (x *DBCanineRabbitRoomPlayer) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[2]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -205,7 +277,7 @@ func (x *DBCanineRabbitRoomPlayer) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DBCanineRabbitRoomPlayer.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DBCanineRabbitRoomPlayer.ProtoReflect.Descriptor instead.
|
||||||
func (*DBCanineRabbitRoomPlayer) Descriptor() ([]byte, []int) {
|
func (*DBCanineRabbitRoomPlayer) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{2}
|
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoomPlayer) GetInfo() *BaseUserInfo {
|
func (x *DBCanineRabbitRoomPlayer) GetInfo() *BaseUserInfo {
|
||||||
@ -236,16 +308,16 @@ func (x *DBCanineRabbitRoomPlayer) GetScore() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoomPlayer) GetIntegral() int32 {
|
func (x *DBCanineRabbitRoomPlayer) GetRabbitintegral() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Integral
|
return x.Rabbitintegral
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoomPlayer) GetMaxintegral() int32 {
|
func (x *DBCanineRabbitRoomPlayer) GetHoundintegral() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Maxintegral
|
return x.Houndintegral
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -257,17 +329,16 @@ type DBCanineRabbitRoom struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"`
|
Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"`
|
||||||
Randomposit bool `protobuf:"varint,2,opt,name=randomposit,proto3" json:"randomposit"` //随机位置
|
Rules *DBCanineRabbitRules `protobuf:"bytes,2,opt,name=rules,proto3" json:"rules"`
|
||||||
Headstart int32 `protobuf:"varint,3,opt,name=headstart,proto3" json:"headstart"` //先手 0 兔子 1 猎犬
|
Red *DBCanineRabbitRoomPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"`
|
||||||
Red *DBCanineRabbitRoomPlayer `protobuf:"bytes,5,opt,name=red,proto3" json:"red"`
|
Blue *DBCanineRabbitRoomPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"`
|
||||||
Blue *DBCanineRabbitRoomPlayer `protobuf:"bytes,6,opt,name=blue,proto3" json:"blue"`
|
Chess []*DBCanineRabbitChess `protobuf:"bytes,5,rep,name=chess,proto3" json:"chess"`
|
||||||
Chess []*DBCanineRabbitChess `protobuf:"bytes,7,rep,name=chess,proto3" json:"chess"` //棋子
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) Reset() {
|
func (x *DBCanineRabbitRoom) Reset() {
|
||||||
*x = DBCanineRabbitRoom{}
|
*x = DBCanineRabbitRoom{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[3]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -280,7 +351,7 @@ func (x *DBCanineRabbitRoom) String() string {
|
|||||||
func (*DBCanineRabbitRoom) ProtoMessage() {}
|
func (*DBCanineRabbitRoom) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) ProtoReflect() protoreflect.Message {
|
func (x *DBCanineRabbitRoom) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[3]
|
mi := &file_caninerabbit_caninerabbit_db_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -293,7 +364,7 @@ func (x *DBCanineRabbitRoom) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DBCanineRabbitRoom.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DBCanineRabbitRoom.ProtoReflect.Descriptor instead.
|
||||||
func (*DBCanineRabbitRoom) Descriptor() ([]byte, []int) {
|
func (*DBCanineRabbitRoom) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{3}
|
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) GetRid() string {
|
func (x *DBCanineRabbitRoom) GetRid() string {
|
||||||
@ -303,18 +374,11 @@ func (x *DBCanineRabbitRoom) GetRid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) GetRandomposit() bool {
|
func (x *DBCanineRabbitRoom) GetRules() *DBCanineRabbitRules {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Randomposit
|
return x.Rules
|
||||||
}
|
}
|
||||||
return false
|
return nil
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) GetHeadstart() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Headstart
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBCanineRabbitRoom) GetRed() *DBCanineRabbitRoomPlayer {
|
func (x *DBCanineRabbitRoom) GetRed() *DBCanineRabbitRoomPlayer {
|
||||||
@ -344,52 +408,61 @@ var file_caninerabbit_caninerabbit_db_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x22, 0x63, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x2f, 0x63,
|
0x0a, 0x22, 0x63, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x2f, 0x63,
|
||||||
0x61, 0x6e, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
0x61, 0x6e, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x22, 0xba, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62,
|
0x22, 0xec, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62,
|
||||||
0x62, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x62, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 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,
|
0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x69,
|
||||||
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72,
|
||||||
0x6c, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
|
0x61, 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a,
|
||||||
0x32, 0x1a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69,
|
0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04,
|
||||||
0x74, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x77,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||||
0x61, 0x72, 0x64, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72,
|
0x72, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03,
|
||||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62,
|
||||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x62, 0x69, 0x74, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
|
||||||
0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a,
|
0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e,
|
||||||
0x13, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43,
|
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x68, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18,
|
0x6b, 0x0a, 0x13, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20,
|
0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0xbb, 0x01, 0x0a, 0x18, 0x44, 0x42, 0x43, 0x61, 0x6e,
|
0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x52, 0x61, 0x6e, 0x64, 0x6f,
|
||||||
0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61,
|
0x6d, 0x50, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||||
0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
|
||||||
0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
0x0a, 0x09, 0x48, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x61, 0x69, 0x18, 0x02,
|
0x05, 0x52, 0x09, 0x48, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0x57, 0x0a, 0x13,
|
||||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65,
|
0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68,
|
||||||
0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79,
|
0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03,
|
||||||
0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01,
|
||||||
0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69,
|
||||||
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65,
|
0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79,
|
||||||
0x67, 0x72, 0x61, 0x6c, 0x22, 0xee, 0x01, 0x0a, 0x12, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e,
|
0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72,
|
0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x20, 0x0a,
|
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x61, 0x69, 0x18, 0x02, 0x20,
|
||||||
0x0b, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
|
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61,
|
||||||
0x28, 0x08, 0x52, 0x0b, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12,
|
0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x12,
|
||||||
0x1c, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
|
0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
0x28, 0x05, 0x52, 0x09, 0x68, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2b, 0x0a,
|
0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x69,
|
||||||
0x03, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43,
|
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72,
|
||||||
0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50,
|
0x61, 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a,
|
||||||
0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6c,
|
0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x06,
|
||||||
0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||||
0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61,
|
0x72, 0x61, 0x6c, 0x22, 0xda, 0x01, 0x0a, 0x12, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65,
|
||||||
0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x68, 0x65,
|
0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69,
|
||||||
0x73, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05,
|
||||||
0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73, 0x73, 0x52, 0x05,
|
0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42,
|
||||||
0x63, 0x68, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x75, 0x6c, 0x65,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18,
|
||||||
|
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65,
|
||||||
|
0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
|
||||||
|
0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
|
||||||
|
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61,
|
||||||
|
0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04,
|
||||||
|
0x62, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20,
|
||||||
|
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61,
|
||||||
|
0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73, 0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73,
|
||||||
|
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -404,26 +477,28 @@ func file_caninerabbit_caninerabbit_db_proto_rawDescGZIP() []byte {
|
|||||||
return file_caninerabbit_caninerabbit_db_proto_rawDescData
|
return file_caninerabbit_caninerabbit_db_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_caninerabbit_caninerabbit_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_caninerabbit_caninerabbit_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_caninerabbit_caninerabbit_db_proto_goTypes = []interface{}{
|
var file_caninerabbit_caninerabbit_db_proto_goTypes = []interface{}{
|
||||||
(*DBCanineRabbit)(nil), // 0: DBCanineRabbit
|
(*DBCanineRabbit)(nil), // 0: DBCanineRabbit
|
||||||
(*DBCanineRabbitChess)(nil), // 1: DBCanineRabbitChess
|
(*DBCanineRabbitRules)(nil), // 1: DBCanineRabbitRules
|
||||||
(*DBCanineRabbitRoomPlayer)(nil), // 2: DBCanineRabbitRoomPlayer
|
(*DBCanineRabbitChess)(nil), // 2: DBCanineRabbitChess
|
||||||
(*DBCanineRabbitRoom)(nil), // 3: DBCanineRabbitRoom
|
(*DBCanineRabbitRoomPlayer)(nil), // 3: DBCanineRabbitRoomPlayer
|
||||||
nil, // 4: DBCanineRabbit.AwardEntry
|
(*DBCanineRabbitRoom)(nil), // 4: DBCanineRabbitRoom
|
||||||
(*BaseUserInfo)(nil), // 5: BaseUserInfo
|
nil, // 5: DBCanineRabbit.AwardEntry
|
||||||
|
(*BaseUserInfo)(nil), // 6: BaseUserInfo
|
||||||
}
|
}
|
||||||
var file_caninerabbit_caninerabbit_db_proto_depIdxs = []int32{
|
var file_caninerabbit_caninerabbit_db_proto_depIdxs = []int32{
|
||||||
4, // 0: DBCanineRabbit.award:type_name -> DBCanineRabbit.AwardEntry
|
5, // 0: DBCanineRabbit.award:type_name -> DBCanineRabbit.AwardEntry
|
||||||
5, // 1: DBCanineRabbitRoomPlayer.info:type_name -> BaseUserInfo
|
6, // 1: DBCanineRabbitRoomPlayer.info:type_name -> BaseUserInfo
|
||||||
2, // 2: DBCanineRabbitRoom.red:type_name -> DBCanineRabbitRoomPlayer
|
1, // 2: DBCanineRabbitRoom.rules:type_name -> DBCanineRabbitRules
|
||||||
2, // 3: DBCanineRabbitRoom.blue:type_name -> DBCanineRabbitRoomPlayer
|
3, // 3: DBCanineRabbitRoom.red:type_name -> DBCanineRabbitRoomPlayer
|
||||||
1, // 4: DBCanineRabbitRoom.chess:type_name -> DBCanineRabbitChess
|
3, // 4: DBCanineRabbitRoom.blue:type_name -> DBCanineRabbitRoomPlayer
|
||||||
5, // [5:5] is the sub-list for method output_type
|
2, // 5: DBCanineRabbitRoom.chess:type_name -> DBCanineRabbitChess
|
||||||
5, // [5:5] is the sub-list for method input_type
|
6, // [6:6] is the sub-list for method output_type
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
6, // [6:6] is the sub-list for method input_type
|
||||||
5, // [5:5] is the sub-list for extension extendee
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
0, // [0:5] is the sub-list for field type_name
|
6, // [6:6] is the sub-list for extension extendee
|
||||||
|
0, // [0:6] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_caninerabbit_caninerabbit_db_proto_init() }
|
func init() { file_caninerabbit_caninerabbit_db_proto_init() }
|
||||||
@ -446,7 +521,7 @@ func file_caninerabbit_caninerabbit_db_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DBCanineRabbitChess); i {
|
switch v := v.(*DBCanineRabbitRules); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -458,7 +533,7 @@ func file_caninerabbit_caninerabbit_db_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DBCanineRabbitRoomPlayer); i {
|
switch v := v.(*DBCanineRabbitChess); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -470,6 +545,18 @@ func file_caninerabbit_caninerabbit_db_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DBCanineRabbitRoomPlayer); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_caninerabbit_caninerabbit_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DBCanineRabbitRoom); i {
|
switch v := v.(*DBCanineRabbitRoom); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -488,7 +575,7 @@ func file_caninerabbit_caninerabbit_db_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_caninerabbit_caninerabbit_db_proto_rawDesc,
|
RawDescriptor: file_caninerabbit_caninerabbit_db_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 5,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -584,6 +584,100 @@ func (x *CanineRabbitGameHandlePush) GetChess() *DBCanineRabbitChess {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//输赢请求
|
||||||
|
type CanineRabbitWinReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //战斗id
|
||||||
|
Iswin bool `protobuf:"varint,2,opt,name=iswin,proto3" json:"iswin"` //是否胜利
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinReq) Reset() {
|
||||||
|
*x = CanineRabbitWinReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CanineRabbitWinReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[11]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use CanineRabbitWinReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CanineRabbitWinReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{11}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinReq) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinReq) GetIswin() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Iswin
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type CanineRabbitWinResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinResp) Reset() {
|
||||||
|
*x = CanineRabbitWinResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[12]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CanineRabbitWinResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CanineRabbitWinResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[12]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use CanineRabbitWinResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CanineRabbitWinResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{12}
|
||||||
|
}
|
||||||
|
|
||||||
//游戏结束推送
|
//游戏结束推送
|
||||||
type CanineRabbitGameOverPush struct {
|
type CanineRabbitGameOverPush struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -598,7 +692,7 @@ type CanineRabbitGameOverPush struct {
|
|||||||
func (x *CanineRabbitGameOverPush) Reset() {
|
func (x *CanineRabbitGameOverPush) Reset() {
|
||||||
*x = CanineRabbitGameOverPush{}
|
*x = CanineRabbitGameOverPush{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[11]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[13]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -611,7 +705,7 @@ func (x *CanineRabbitGameOverPush) String() string {
|
|||||||
func (*CanineRabbitGameOverPush) ProtoMessage() {}
|
func (*CanineRabbitGameOverPush) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CanineRabbitGameOverPush) ProtoReflect() protoreflect.Message {
|
func (x *CanineRabbitGameOverPush) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[11]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[13]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -624,7 +718,7 @@ func (x *CanineRabbitGameOverPush) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CanineRabbitGameOverPush.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CanineRabbitGameOverPush.ProtoReflect.Descriptor instead.
|
||||||
func (*CanineRabbitGameOverPush) Descriptor() ([]byte, []int) {
|
func (*CanineRabbitGameOverPush) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{11}
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{13}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitGameOverPush) GetWinside() int32 {
|
func (x *CanineRabbitGameOverPush) GetWinside() int32 {
|
||||||
@ -654,13 +748,12 @@ type CanineRabbitAwardReq struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||||
Atype int32 `protobuf:"varint,2,opt,name=atype,proto3" json:"atype"` //0 周奖励 1 累计奖励
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardReq) Reset() {
|
func (x *CanineRabbitAwardReq) Reset() {
|
||||||
*x = CanineRabbitAwardReq{}
|
*x = CanineRabbitAwardReq{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[12]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[14]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -673,7 +766,7 @@ func (x *CanineRabbitAwardReq) String() string {
|
|||||||
func (*CanineRabbitAwardReq) ProtoMessage() {}
|
func (*CanineRabbitAwardReq) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardReq) ProtoReflect() protoreflect.Message {
|
func (x *CanineRabbitAwardReq) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[12]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[14]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -686,7 +779,7 @@ func (x *CanineRabbitAwardReq) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CanineRabbitAwardReq.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CanineRabbitAwardReq.ProtoReflect.Descriptor instead.
|
||||||
func (*CanineRabbitAwardReq) Descriptor() ([]byte, []int) {
|
func (*CanineRabbitAwardReq) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{12}
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{14}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardReq) GetId() int32 {
|
func (x *CanineRabbitAwardReq) GetId() int32 {
|
||||||
@ -696,27 +789,19 @@ func (x *CanineRabbitAwardReq) GetId() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardReq) GetAtype() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Atype
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type CanineRabbitAwardResp struct {
|
type CanineRabbitAwardResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
|
||||||
Atype int32 `protobuf:"varint,2,opt,name=atype,proto3" json:"atype"` //0 周奖励 1 累计奖励
|
|
||||||
Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //获取资源
|
Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //获取资源
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardResp) Reset() {
|
func (x *CanineRabbitAwardResp) Reset() {
|
||||||
*x = CanineRabbitAwardResp{}
|
*x = CanineRabbitAwardResp{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[13]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[15]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -729,7 +814,7 @@ func (x *CanineRabbitAwardResp) String() string {
|
|||||||
func (*CanineRabbitAwardResp) ProtoMessage() {}
|
func (*CanineRabbitAwardResp) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardResp) ProtoReflect() protoreflect.Message {
|
func (x *CanineRabbitAwardResp) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[13]
|
mi := &file_caninerabbit_caninerabbit_msg_proto_msgTypes[15]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -742,7 +827,7 @@ func (x *CanineRabbitAwardResp) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CanineRabbitAwardResp.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CanineRabbitAwardResp.ProtoReflect.Descriptor instead.
|
||||||
func (*CanineRabbitAwardResp) Descriptor() ([]byte, []int) {
|
func (*CanineRabbitAwardResp) Descriptor() ([]byte, []int) {
|
||||||
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{13}
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{15}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardResp) GetId() int32 {
|
func (x *CanineRabbitAwardResp) GetId() int32 {
|
||||||
@ -752,13 +837,6 @@ func (x *CanineRabbitAwardResp) GetId() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CanineRabbitAwardResp) GetAtype() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Atype
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CanineRabbitAwardResp) GetAward() []*UserAtno {
|
func (x *CanineRabbitAwardResp) GetAward() []*UserAtno {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Award
|
return x.Award
|
||||||
@ -822,26 +900,29 @@ var file_caninerabbit_caninerabbit_msg_proto_rawDesc = []byte{
|
|||||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05,
|
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05,
|
||||||
0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42,
|
0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42,
|
||||||
0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73,
|
0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73,
|
||||||
0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x22, 0x7a, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x69,
|
0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x22, 0x42, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x69,
|
||||||
0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72,
|
0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x57, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16,
|
||||||
0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18,
|
0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x20,
|
0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18,
|
||||||
0x0a, 0x0b, 0x72, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20,
|
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x22, 0x15, 0x0a, 0x13,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c,
|
0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x57, 0x69, 0x6e, 0x52,
|
||||||
0x12, 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c,
|
0x65, 0x73, 0x70, 0x22, 0x7a, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65,
|
0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12,
|
||||||
0x67, 0x72, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61,
|
0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x62, 0x62, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02,
|
0x52, 0x07, 0x77, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x64,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
|
||||||
0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x61, 0x74, 0x79,
|
0x72, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x62,
|
||||||
0x70, 0x65, 0x22, 0x5e, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62,
|
0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
0x05, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61,
|
0x26, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x41,
|
||||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x61, 0x74, 0x79, 0x70,
|
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e,
|
||||||
0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61,
|
0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
|
||||||
0x6f, 0x33,
|
0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
|
0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72,
|
||||||
|
0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -856,7 +937,7 @@ func file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_caninerabbit_caninerabbit_msg_proto_rawDescData
|
return file_caninerabbit_caninerabbit_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_caninerabbit_caninerabbit_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
var file_caninerabbit_caninerabbit_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||||
var file_caninerabbit_caninerabbit_msg_proto_goTypes = []interface{}{
|
var file_caninerabbit_caninerabbit_msg_proto_goTypes = []interface{}{
|
||||||
(*CanineRabbitInfoReq)(nil), // 0: CanineRabbitInfoReq
|
(*CanineRabbitInfoReq)(nil), // 0: CanineRabbitInfoReq
|
||||||
(*CanineRabbitInfoResp)(nil), // 1: CanineRabbitInfoResp
|
(*CanineRabbitInfoResp)(nil), // 1: CanineRabbitInfoResp
|
||||||
@ -869,20 +950,22 @@ var file_caninerabbit_caninerabbit_msg_proto_goTypes = []interface{}{
|
|||||||
(*CanineRabbitHandleReq)(nil), // 8: CanineRabbitHandleReq
|
(*CanineRabbitHandleReq)(nil), // 8: CanineRabbitHandleReq
|
||||||
(*CanineRabbitHandleResp)(nil), // 9: CanineRabbitHandleResp
|
(*CanineRabbitHandleResp)(nil), // 9: CanineRabbitHandleResp
|
||||||
(*CanineRabbitGameHandlePush)(nil), // 10: CanineRabbitGameHandlePush
|
(*CanineRabbitGameHandlePush)(nil), // 10: CanineRabbitGameHandlePush
|
||||||
(*CanineRabbitGameOverPush)(nil), // 11: CanineRabbitGameOverPush
|
(*CanineRabbitWinReq)(nil), // 11: CanineRabbitWinReq
|
||||||
(*CanineRabbitAwardReq)(nil), // 12: CanineRabbitAwardReq
|
(*CanineRabbitWinResp)(nil), // 12: CanineRabbitWinResp
|
||||||
(*CanineRabbitAwardResp)(nil), // 13: CanineRabbitAwardResp
|
(*CanineRabbitGameOverPush)(nil), // 13: CanineRabbitGameOverPush
|
||||||
(*DBCanineRabbit)(nil), // 14: DBCanineRabbit
|
(*CanineRabbitAwardReq)(nil), // 14: CanineRabbitAwardReq
|
||||||
(*DBCanineRabbitRoom)(nil), // 15: DBCanineRabbitRoom
|
(*CanineRabbitAwardResp)(nil), // 15: CanineRabbitAwardResp
|
||||||
(*DBCanineRabbitChess)(nil), // 16: DBCanineRabbitChess
|
(*DBCanineRabbit)(nil), // 16: DBCanineRabbit
|
||||||
(*UserAtno)(nil), // 17: UserAtno
|
(*DBCanineRabbitRoom)(nil), // 17: DBCanineRabbitRoom
|
||||||
|
(*DBCanineRabbitChess)(nil), // 18: DBCanineRabbitChess
|
||||||
|
(*UserAtno)(nil), // 19: UserAtno
|
||||||
}
|
}
|
||||||
var file_caninerabbit_caninerabbit_msg_proto_depIdxs = []int32{
|
var file_caninerabbit_caninerabbit_msg_proto_depIdxs = []int32{
|
||||||
14, // 0: CanineRabbitInfoResp.info:type_name -> DBCanineRabbit
|
16, // 0: CanineRabbitInfoResp.info:type_name -> DBCanineRabbit
|
||||||
15, // 1: CanineRabbitGameReadyPush.room:type_name -> DBCanineRabbitRoom
|
17, // 1: CanineRabbitGameReadyPush.room:type_name -> DBCanineRabbitRoom
|
||||||
16, // 2: CanineRabbitHandleReq.chess:type_name -> DBCanineRabbitChess
|
18, // 2: CanineRabbitHandleReq.chess:type_name -> DBCanineRabbitChess
|
||||||
16, // 3: CanineRabbitGameHandlePush.chess:type_name -> DBCanineRabbitChess
|
18, // 3: CanineRabbitGameHandlePush.chess:type_name -> DBCanineRabbitChess
|
||||||
17, // 4: CanineRabbitAwardResp.award:type_name -> UserAtno
|
19, // 4: CanineRabbitAwardResp.award:type_name -> UserAtno
|
||||||
5, // [5:5] is the sub-list for method output_type
|
5, // [5:5] is the sub-list for method output_type
|
||||||
5, // [5:5] is the sub-list for method input_type
|
5, // [5:5] is the sub-list for method input_type
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
5, // [5:5] is the sub-list for extension type_name
|
||||||
@ -1031,7 +1114,7 @@ func file_caninerabbit_caninerabbit_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CanineRabbitGameOverPush); i {
|
switch v := v.(*CanineRabbitWinReq); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -1043,7 +1126,7 @@ func file_caninerabbit_caninerabbit_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CanineRabbitAwardReq); i {
|
switch v := v.(*CanineRabbitWinResp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -1055,6 +1138,30 @@ func file_caninerabbit_caninerabbit_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_caninerabbit_caninerabbit_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
file_caninerabbit_caninerabbit_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CanineRabbitGameOverPush); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_caninerabbit_caninerabbit_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CanineRabbitAwardReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_caninerabbit_caninerabbit_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CanineRabbitAwardResp); i {
|
switch v := v.(*CanineRabbitAwardResp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1073,7 +1180,7 @@ func file_caninerabbit_caninerabbit_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_caninerabbit_caninerabbit_msg_proto_rawDesc,
|
RawDescriptor: file_caninerabbit_caninerabbit_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 14,
|
NumMessages: 16,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
42
sys/configure/structs/Game.Catchrabbitreward.go
Normal file
42
sys/configure/structs/Game.Catchrabbitreward.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
type GameCatchrabbitreward struct {
|
||||||
|
_dataMap map[int32]*GameCatchrabbitrewardData
|
||||||
|
_dataList []*GameCatchrabbitrewardData
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGameCatchrabbitreward(_buf []map[string]interface{}) (*GameCatchrabbitreward, error) {
|
||||||
|
_dataList := make([]*GameCatchrabbitrewardData, 0, len(_buf))
|
||||||
|
dataMap := make(map[int32]*GameCatchrabbitrewardData)
|
||||||
|
for _, _ele_ := range _buf {
|
||||||
|
if _v, err2 := DeserializeGameCatchrabbitrewardData(_ele_); err2 != nil {
|
||||||
|
return nil, err2
|
||||||
|
} else {
|
||||||
|
_dataList = append(_dataList, _v)
|
||||||
|
dataMap[_v.Key] = _v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return &GameCatchrabbitreward{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameCatchrabbitreward) GetDataMap() map[int32]*GameCatchrabbitrewardData {
|
||||||
|
return table._dataMap
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameCatchrabbitreward) GetDataList() []*GameCatchrabbitrewardData {
|
||||||
|
return table._dataList
|
||||||
|
}
|
||||||
|
|
||||||
|
func (table *GameCatchrabbitreward) Get(key int32) *GameCatchrabbitrewardData {
|
||||||
|
return table._dataMap[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
54
sys/configure/structs/Game.CatchrabbitrewardData.go
Normal file
54
sys/configure/structs/Game.CatchrabbitrewardData.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type GameCatchrabbitrewardData struct {
|
||||||
|
Key int32
|
||||||
|
Type int32
|
||||||
|
Condition int32
|
||||||
|
Reward []*Gameatn
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_GameCatchrabbitrewardData = -1422030126
|
||||||
|
|
||||||
|
func (*GameCatchrabbitrewardData) GetTypeId() int32 {
|
||||||
|
return -1422030126
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *GameCatchrabbitrewardData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) }
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
|
||||||
|
|
||||||
|
_v.Reward = make([]*Gameatn, 0, len(_arr_))
|
||||||
|
|
||||||
|
for _, _e_ := range _arr_ {
|
||||||
|
var _list_v_ *Gameatn
|
||||||
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||||
|
_v.Reward = append(_v.Reward, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGameCatchrabbitrewardData(_buf map[string]interface{}) (*GameCatchrabbitrewardData, error) {
|
||||||
|
v := &GameCatchrabbitrewardData{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
@ -280,6 +280,7 @@ type Tables struct {
|
|||||||
TreasureMap *GameTreasureMap
|
TreasureMap *GameTreasureMap
|
||||||
ConsumeIntegral *GameConsumeIntegral
|
ConsumeIntegral *GameConsumeIntegral
|
||||||
TDReward *GameTDReward
|
TDReward *GameTDReward
|
||||||
|
Catchrabbitreward *GameCatchrabbitreward
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||||
@ -1901,5 +1902,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.TDReward, err = NewGameTDReward(buf) ; err != nil {
|
if tables.TDReward, err = NewGameTDReward(buf) ; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if buf, err = loader("game_catchrabbitreward") ; err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.Catchrabbitreward, err = NewGameCatchrabbitreward(buf) ; err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return tables, nil
|
return tables, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user