同步配置
This commit is contained in:
parent
6f5e36524b
commit
f4184e1bcd
@ -159,7 +159,7 @@
|
|||||||
"levellink": [
|
"levellink": [
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"leveltype": 1,
|
"leveltype": 4,
|
||||||
"startstory": 301054,
|
"startstory": 301054,
|
||||||
"battle": 0,
|
"battle": 0,
|
||||||
"reward": [
|
"reward": [
|
||||||
@ -342,7 +342,7 @@
|
|||||||
"levellink": [
|
"levellink": [
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"leveltype": 1,
|
"leveltype": 4,
|
||||||
"startstory": 301063,
|
"startstory": 301063,
|
||||||
"battle": 0,
|
"battle": 0,
|
||||||
"reward": [
|
"reward": [
|
||||||
@ -525,7 +525,7 @@
|
|||||||
"levellink": [
|
"levellink": [
|
||||||
4
|
4
|
||||||
],
|
],
|
||||||
"leveltype": 1,
|
"leveltype": 4,
|
||||||
"startstory": 301083,
|
"startstory": 301083,
|
||||||
"battle": 0,
|
"battle": 0,
|
||||||
"reward": [
|
"reward": [
|
||||||
|
@ -716,7 +716,7 @@
|
|||||||
"show_type": 1,
|
"show_type": 1,
|
||||||
"count_type": 1,
|
"count_type": 1,
|
||||||
"opencond_id": "PS",
|
"opencond_id": "PS",
|
||||||
"path": "",
|
"path": "Root|Ps",
|
||||||
"header": ""
|
"header": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -4,12 +4,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/core/cbase"
|
"go_dreamfactory/lego/core/cbase"
|
||||||
"go_dreamfactory/lego/sys/timewheel"
|
"go_dreamfactory/modules/parkour/ai"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"math/rand"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -17,14 +15,11 @@ AI 逻辑组件
|
|||||||
*/
|
*/
|
||||||
type aiComp struct {
|
type aiComp struct {
|
||||||
cbase.ModuleCompBase
|
cbase.ModuleCompBase
|
||||||
service core.IService
|
service core.IService
|
||||||
module *Parkour
|
module *Parkour
|
||||||
conf []*cfg.GameBuzkashiGradeData
|
conf []*cfg.GameBuzkashiGradeData
|
||||||
lock sync.RWMutex
|
lock sync.RWMutex
|
||||||
ais map[string][]*AI
|
ais map[string][]*ai.AI
|
||||||
handleS []AIHandleType
|
|
||||||
handleSS []AIHandleType
|
|
||||||
handleSSS []AIHandleType
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
@ -32,11 +27,7 @@ func (this *aiComp) Init(service core.IService, module core.IModule, comp core.I
|
|||||||
this.ModuleCompBase.Init(service, module, comp, options)
|
this.ModuleCompBase.Init(service, module, comp, options)
|
||||||
this.module = module.(*Parkour)
|
this.module = module.(*Parkour)
|
||||||
this.service = service
|
this.service = service
|
||||||
this.ais = make(map[string][]*AI)
|
this.ais = make(map[string][]*ai.AI)
|
||||||
this.handleS = make([]AIHandleType, 100)
|
|
||||||
this.handleSS = make([]AIHandleType, 100)
|
|
||||||
this.handleSSS = make([]AIHandleType, 100)
|
|
||||||
this.inithandle()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,86 +36,16 @@ func (this *aiComp) Start() (err error) {
|
|||||||
if this.conf, err = this.module.configure.getGameBuzkashiGrades(); err != nil {
|
if this.conf, err = this.module.configure.getGameBuzkashiGrades(); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
timewheel.AddCron(time.Second*3, this.aihandle)
|
// timewheel.AddCron(time.Second*3, this.aihandle)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *aiComp) inithandle() {
|
|
||||||
var index int32
|
|
||||||
//AILevelS
|
|
||||||
for i := 0; i < 40; i++ { //失败躲避次数 40
|
|
||||||
this.handleS[index] = AIHandle_Avoid0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 10; i++ { //成功躲避次数 10
|
|
||||||
this.handleS[index] = AIHandle_Avoid1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 5; i++ { //完美躲避次数 5
|
|
||||||
this.handleS[index] = AIHandle_Avoid2
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 7; i++ { //射门失败次数 5
|
|
||||||
this.handleS[index] = AIHandle_Shots0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 3; i++ { //射门成功次数 3
|
|
||||||
this.handleS[index] = AIHandle_Shots1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
index = 0
|
|
||||||
//AILevelSS
|
|
||||||
for i := 0; i < 30; i++ { //失败躲避次数 30
|
|
||||||
this.handleSS[index] = AIHandle_Avoid0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 20; i++ { //成功躲避次数 20
|
|
||||||
this.handleSS[index] = AIHandle_Avoid1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 10; i++ { //完美躲避次数 10
|
|
||||||
this.handleSS[index] = AIHandle_Avoid2
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 5; i++ { //射门失败次数 5
|
|
||||||
this.handleSS[index] = AIHandle_Shots0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 5; i++ { //射门成功次数 5
|
|
||||||
this.handleSS[index] = AIHandle_Shots1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
|
|
||||||
index = 0
|
|
||||||
//AILevelSSS
|
|
||||||
for i := 0; i < 10; i++ { //失败躲避次数 10
|
|
||||||
this.handleSSS[index] = AIHandle_Avoid0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 30; i++ { //成功躲避次数 30
|
|
||||||
this.handleSSS[index] = AIHandle_Avoid1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 15; i++ { //完美躲避次数 15
|
|
||||||
this.handleSSS[index] = AIHandle_Avoid2
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 2; i++ { //射门失败次数 2
|
|
||||||
this.handleSSS[index] = AIHandle_Shots0
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
for i := 0; i < 8; i++ { //射门成功次数 8
|
|
||||||
this.handleSSS[index] = AIHandle_Shots1
|
|
||||||
index++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//创建战斗ai
|
//创建战斗ai
|
||||||
func (this *aiComp) createAi(battleid string, users []*pb.DBRaceMember) (err error) {
|
func (this *aiComp) createAi(battleid string, btype pb.RaceType, users []*pb.DBRaceMember) (err error) {
|
||||||
var (
|
var (
|
||||||
ok bool
|
ok bool
|
||||||
ais []*AI
|
ais []*ai.AI
|
||||||
r *rand.Rand = rand.New(rand.NewSource(time.Now().Unix()))
|
conf *cfg.GameBukashiAiData
|
||||||
)
|
)
|
||||||
if battleid == "" || users == nil || len(users) == 0 {
|
if battleid == "" || users == nil || len(users) == 0 {
|
||||||
err = fmt.Errorf("battleid:%s users:%v parameter exceptions", battleid, users)
|
err = fmt.Errorf("battleid:%s users:%v parameter exceptions", battleid, users)
|
||||||
@ -138,35 +59,13 @@ func (this *aiComp) createAi(battleid string, users []*pb.DBRaceMember) (err err
|
|||||||
err = fmt.Errorf("battle:%s already exists", battleid)
|
err = fmt.Errorf("battle:%s already exists", battleid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ais = make([]*AI, len(users))
|
ais = make([]*ai.AI, len(users))
|
||||||
for i, v := range users {
|
for i, v := range users {
|
||||||
ais[i] = &AI{
|
if conf, err = this.module.configure.getgameBukashiAiDataByDan(int32(btype), v.Dan); err != nil {
|
||||||
BattleId: battleid,
|
return
|
||||||
UId: v.Uid,
|
|
||||||
AILevel: AILevelS,
|
|
||||||
Handle: make([]AIHandleType, 100),
|
|
||||||
LastTime: time.Now(),
|
|
||||||
}
|
|
||||||
switch ais[i].AILevel {
|
|
||||||
case AILevelS:
|
|
||||||
ais[i].Interval = time.Second*10 + time.Second*time.Duration(rand.Int31n(5))
|
|
||||||
for ii, vv := range r.Perm(len(this.handleS)) {
|
|
||||||
ais[i].Handle[ii] = this.handleS[vv]
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case AILevelSS:
|
|
||||||
ais[i].Interval = time.Second*7 + time.Second*time.Duration(rand.Int31n(5))
|
|
||||||
for ii, vv := range r.Perm(len(this.handleSS)) {
|
|
||||||
ais[i].Handle[ii] = this.handleSS[vv]
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case AILevelSSS:
|
|
||||||
ais[i].Interval = time.Second*5 + time.Second*time.Duration(rand.Int31n(3))
|
|
||||||
for ii, vv := range r.Perm(len(this.handleSSS)) {
|
|
||||||
ais[i].Handle[ii] = this.handleSSS[vv]
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
ais[i] = ai.NewAI(battleid, v.Uid, conf)
|
||||||
|
|
||||||
}
|
}
|
||||||
this.lock.Lock()
|
this.lock.Lock()
|
||||||
this.ais[battleid] = ais
|
this.ais[battleid] = ais
|
||||||
@ -182,44 +81,44 @@ func (this *aiComp) removeAi(battleid string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ai自动化
|
//ai自动化
|
||||||
func (this *aiComp) aihandle(task *timewheel.Task, args ...interface{}) {
|
// func (this *aiComp) aihandle(task *timewheel.Task, args ...interface{}) {
|
||||||
var (
|
// var (
|
||||||
ok bool
|
// ok bool
|
||||||
ais map[string][]*AI = make(map[string][]*AI)
|
// ais map[string][]*AI = make(map[string][]*AI)
|
||||||
)
|
// )
|
||||||
this.lock.RLock()
|
// this.lock.RLock()
|
||||||
if len(this.ais) > 0 {
|
// if len(this.ais) > 0 {
|
||||||
ok = true
|
// ok = true
|
||||||
for k, v := range this.ais {
|
// for k, v := range this.ais {
|
||||||
ais[k] = v
|
// ais[k] = v
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
this.lock.RUnlock()
|
// this.lock.RUnlock()
|
||||||
if ok {
|
// if ok {
|
||||||
for id, member := range ais {
|
// for id, member := range ais {
|
||||||
for _, ai := range member {
|
// for _, ai := range member {
|
||||||
if time.Now().Sub(ai.LastTime) > ai.Interval {
|
// if time.Now().Sub(ai.LastTime) > ai.Interval {
|
||||||
switch ai.Handle[ai.CurrIndex] {
|
// switch ai.Handle[ai.CurrIndex] {
|
||||||
case AIHandle_Avoid0: //躲避障碍 失败
|
// case AIHandle_Avoid0: //躲避障碍 失败
|
||||||
go this.module.avoid(id, ai.UId, nil)
|
// go this.module.avoid(id, ai.UId, nil)
|
||||||
break
|
// break
|
||||||
case AIHandle_Avoid1: //躲避障碍 成功
|
// case AIHandle_Avoid1: //躲避障碍 成功
|
||||||
go this.module.avoid(id, ai.UId, this.conf[1])
|
// go this.module.avoid(id, ai.UId, this.conf[1])
|
||||||
break
|
// break
|
||||||
case AIHandle_Avoid2: //躲避障碍 完美
|
// case AIHandle_Avoid2: //躲避障碍 完美
|
||||||
go this.module.avoid(id, ai.UId, this.conf[0])
|
// go this.module.avoid(id, ai.UId, this.conf[0])
|
||||||
break
|
// break
|
||||||
case AIHandle_Shots0: //射门 失败
|
// case AIHandle_Shots0: //射门 失败
|
||||||
break
|
// break
|
||||||
case AIHandle_Shots1: //射门 成功
|
// case AIHandle_Shots1: //射门 成功
|
||||||
go this.module.shot(id, ai.UId)
|
// go this.module.shot(id, ai.UId)
|
||||||
break
|
// break
|
||||||
}
|
// }
|
||||||
ai.LastTime = time.Now()
|
// ai.LastTime = time.Now()
|
||||||
ai.CurrIndex++
|
// ai.CurrIndex++
|
||||||
ai.CurrIndex = ai.CurrIndex % int32(len(ai.Handle))
|
// ai.CurrIndex = ai.CurrIndex % int32(len(ai.Handle))
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
46
modules/parkour/ai/core.go
Normal file
46
modules/parkour/ai/core.go
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
package ai
|
||||||
|
|
||||||
|
import (
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AILevel int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
AILevelS AILevel = iota
|
||||||
|
AILevelSS
|
||||||
|
AILevelSSS
|
||||||
|
)
|
||||||
|
|
||||||
|
type AIHandleType int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
AIHandle_Null AIHandleType = iota //空操作
|
||||||
|
AIHandle_Avoid //躲避障碍
|
||||||
|
AIHandle_Shot //射门
|
||||||
|
AIHandle_AddBlood //加血
|
||||||
|
)
|
||||||
|
|
||||||
|
type AIHandle struct {
|
||||||
|
htype AIHandleType
|
||||||
|
cd int32
|
||||||
|
weight int32
|
||||||
|
}
|
||||||
|
|
||||||
|
//捕羊大赛AI对象
|
||||||
|
type AI struct {
|
||||||
|
Bid string //战场id
|
||||||
|
Uid string //用户id
|
||||||
|
Conf *cfg.GameBukashiAiData //配置
|
||||||
|
Handles []*AIHandle //操作列表
|
||||||
|
Lastopttime int64 //最后一次操作时间
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAI(battleid string, uid string, conf *cfg.GameBukashiAiData) (_ai *AI) {
|
||||||
|
_ai = &AI{
|
||||||
|
Bid: battleid,
|
||||||
|
Uid: uid,
|
||||||
|
Conf: conf,
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
@ -119,6 +119,42 @@ func (this *configureComp) getGameBuzkashiQteLv(time float32) (configure *cfg.Ga
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (this *configureComp) getgameBukashiAiData(id int32) (conf *cfg.GameBukashiAiData, err error) {
|
||||||
|
var (
|
||||||
|
v interface{}
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
if v, err = this.GetConfigure(game_bukashiai); err != nil {
|
||||||
|
this.module.Errorf("err:%v", err)
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if conf, ok = v.(*cfg.GameBukashiAi).GetDataMap()[id]; !ok {
|
||||||
|
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_buzkashiqtelv, id)
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func (this *configureComp) getgameBukashiAiDataByDan(btype, dan int32) (conf *cfg.GameBukashiAiData, err error) {
|
||||||
|
var (
|
||||||
|
v interface{}
|
||||||
|
)
|
||||||
|
if v, err = this.GetConfigure(game_bukashiai); err != nil {
|
||||||
|
this.module.Errorf("err:%v", err)
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
for _, v := range v.(*cfg.GameBukashiAi).GetDataList() {
|
||||||
|
if v.MatchType == btype && v.QualifyingType == dan {
|
||||||
|
conf = v
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_buzkashiqtelv, fmt.Sprintf("%d:%d", btype, dan))
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// func (this *configureComp) getGameBuzkashiReward(id int32) (configure *cfg.GameBuzkashiRewardData) {
|
// func (this *configureComp) getGameBuzkashiReward(id int32) (configure *cfg.GameBuzkashiRewardData) {
|
||||||
// if v, err := this.GetConfigure(game_buzkashireward); err == nil {
|
// if v, err := this.GetConfigure(game_buzkashireward); err == nil {
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"go_dreamfactory/lego/sys/timewheel"
|
"go_dreamfactory/lego/sys/timewheel"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Recommend struct {
|
type Recommend struct {
|
||||||
@ -16,44 +15,13 @@ type Recommend struct {
|
|||||||
|
|
||||||
///捕羊大赛对象
|
///捕羊大赛对象
|
||||||
type RaceItem struct {
|
type RaceItem struct {
|
||||||
Id string //战斗id
|
Id string //战斗id
|
||||||
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
|
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
|
||||||
RedMember []*pb.DBRaceMember //红方成员
|
Rtype pb.RaceType //比赛类型
|
||||||
RedScore int32 //红方分值
|
RedMember []*pb.DBRaceMember //红方成员
|
||||||
// RedEnergy int32 //红方能量
|
RedScore int32 //红方分值
|
||||||
BuleMember []*pb.DBRaceMember //蓝方成员
|
BuleMember []*pb.DBRaceMember //蓝方成员
|
||||||
Session map[string]comm.IUserSession
|
Session map[string]comm.IUserSession
|
||||||
BuleScore int32 //蓝方分值
|
BuleScore int32 //蓝方分值
|
||||||
// BuleEnergy int32 //蓝方能量
|
overtimer *timewheel.Task //准备倒计时定时器
|
||||||
overtimer *timewheel.Task //准备倒计时定时器
|
|
||||||
}
|
|
||||||
|
|
||||||
type AILevel int32
|
|
||||||
|
|
||||||
const (
|
|
||||||
AILevelS AILevel = iota
|
|
||||||
AILevelSS
|
|
||||||
AILevelSSS
|
|
||||||
)
|
|
||||||
|
|
||||||
type AIHandleType int32
|
|
||||||
|
|
||||||
const (
|
|
||||||
AIHandle_Null AIHandleType = iota //空操作
|
|
||||||
AIHandle_Avoid0 //躲避障碍 失败
|
|
||||||
AIHandle_Avoid1 //躲避障碍 成功
|
|
||||||
AIHandle_Avoid2 //躲避障碍 完美
|
|
||||||
AIHandle_Shots0 //射门 失败
|
|
||||||
AIHandle_Shots1 //射门 成功
|
|
||||||
)
|
|
||||||
|
|
||||||
//捕羊大赛AI对象
|
|
||||||
type AI struct {
|
|
||||||
BattleId string //战场id
|
|
||||||
UId string //用户id
|
|
||||||
AILevel AILevel //AI级别
|
|
||||||
Handle []AIHandleType //操作列表
|
|
||||||
CurrIndex int32 //当前执行下标
|
|
||||||
LastTime time.Time //上一次操作时间
|
|
||||||
Interval time.Duration //最小操作时间
|
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ func (this *Parkour) startbattle(id string) {
|
|||||||
member = append(member, v)
|
member = append(member, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err = this.ai.createAi(battle.Id, member); err != nil {
|
if err = this.ai.createAi(battle.Id, battle.Rtype, member); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -483,8 +483,9 @@ type MailGetAllMailAttachmentResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Res []*UserAtno `protobuf:"bytes,1,rep,name=res,proto3" json:"res"` //资源类型
|
Res []*UserAtno `protobuf:"bytes,1,rep,name=res,proto3" json:"res"` //资源类型
|
||||||
Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids"` // 已经领取的邮件唯一id
|
Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids"` // 已经领取的邮件唯一id
|
||||||
|
Reward []*UserAtno `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward"` //获取资源
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MailGetAllMailAttachmentResp) Reset() {
|
func (x *MailGetAllMailAttachmentResp) Reset() {
|
||||||
@ -533,6 +534,13 @@ func (x *MailGetAllMailAttachmentResp) GetIds() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MailGetAllMailAttachmentResp) GetReward() []*UserAtno {
|
||||||
|
if x != nil {
|
||||||
|
return x.Reward
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type MailDelAllMailReq struct {
|
type MailDelAllMailReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -652,18 +660,20 @@ var file_mail_mail_msg_proto_rawDesc = []byte{
|
|||||||
0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
||||||
0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x4d, 0x61, 0x69, 0x6c, 0x22, 0x1d, 0x0a, 0x1b, 0x4d,
|
0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x4d, 0x61, 0x69, 0x6c, 0x22, 0x1d, 0x0a, 0x1b, 0x4d,
|
||||||
0x61, 0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74,
|
0x61, 0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74,
|
||||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x22, 0x4d, 0x0a, 0x1c, 0x4d, 0x61,
|
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x22, 0x70, 0x0a, 0x1c, 0x4d, 0x61,
|
||||||
0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74, 0x61,
|
0x69, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x41, 0x74, 0x74, 0x61,
|
||||||
0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x03, 0x72, 0x65,
|
0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x03, 0x72, 0x65,
|
||||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74,
|
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74,
|
||||||
0x6e, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02,
|
0x6e, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02,
|
||||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x61, 0x69,
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77,
|
||||||
0x6c, 0x44, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x22, 0x37,
|
0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||||
0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c,
|
0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x13, 0x0a, 0x11,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x4d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20,
|
0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61,
|
0x71, 0x22, 0x37, 0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x65, 0x6c, 0x41, 0x6c, 0x6c, 0x4d,
|
||||||
0x52, 0x05, 0x4d, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x4d, 0x61, 0x69, 0x6c, 0x73,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44,
|
||||||
|
0x61, 0x74, 0x61, 0x52, 0x05, 0x4d, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||||
|
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -702,12 +712,13 @@ var file_mail_mail_msg_proto_depIdxs = []int32{
|
|||||||
13, // 2: MailGetUserMailAttachmentResp.Mail:type_name -> DBMailData
|
13, // 2: MailGetUserMailAttachmentResp.Mail:type_name -> DBMailData
|
||||||
13, // 3: MailGetNewMailPush.Mail:type_name -> DBMailData
|
13, // 3: MailGetNewMailPush.Mail:type_name -> DBMailData
|
||||||
14, // 4: MailGetAllMailAttachmentResp.res:type_name -> UserAtno
|
14, // 4: MailGetAllMailAttachmentResp.res:type_name -> UserAtno
|
||||||
13, // 5: MailDelAllMailResp.Mails:type_name -> DBMailData
|
14, // 5: MailGetAllMailAttachmentResp.reward:type_name -> UserAtno
|
||||||
6, // [6:6] is the sub-list for method output_type
|
13, // 6: MailDelAllMailResp.Mails:type_name -> DBMailData
|
||||||
6, // [6:6] is the sub-list for method input_type
|
7, // [7:7] is the sub-list for method output_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
7, // [7:7] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension extendee
|
7, // [7:7] is the sub-list for extension type_name
|
||||||
0, // [0:6] is the sub-list for field type_name
|
7, // [7:7] is the sub-list for extension extendee
|
||||||
|
0, // [0:7] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_mail_mail_msg_proto_init() }
|
func init() { file_mail_mail_msg_proto_init() }
|
||||||
|
@ -23,8 +23,8 @@ const (
|
|||||||
type RaceType int32
|
type RaceType int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RaceType_ordinary RaceType = 0
|
RaceType_ordinary RaceType = 0 //训练模式
|
||||||
RaceType_prop RaceType = 1
|
RaceType_prop RaceType = 1 //排位模式
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for RaceType.
|
// Enum value maps for RaceType.
|
||||||
|
@ -273,6 +273,7 @@ type Tables struct {
|
|||||||
ConsumeHero *GameConsumeHero
|
ConsumeHero *GameConsumeHero
|
||||||
PlayerSkill *GamePlayerSkill
|
PlayerSkill *GamePlayerSkill
|
||||||
ConsumeBox *GameConsumeBox
|
ConsumeBox *GameConsumeBox
|
||||||
|
BukashiAi *GameBukashiAi
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||||
@ -1852,5 +1853,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.ConsumeBox, err = NewGameConsumeBox(buf) ; err != nil {
|
if tables.ConsumeBox, err = NewGameConsumeBox(buf) ; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if buf, err = loader("game_bukashiai") ; err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if tables.BukashiAi, err = NewGameBukashiAi(buf) ; err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return tables, nil
|
return tables, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user