上传关卡编辑系统代码
This commit is contained in:
parent
1de8195fb3
commit
8bacce8c34
317
bin/json/game_combatlevel.json
Normal file
317
bin/json/game_combatlevel.json
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 10001,
|
||||||
|
"formatList": [
|
||||||
|
110211,
|
||||||
|
110212
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1001,
|
||||||
|
1002
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110211,
|
||||||
|
110212
|
||||||
|
],
|
||||||
|
"passdroplist": [
|
||||||
|
1001,
|
||||||
|
1002
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10002,
|
||||||
|
"formatList": [
|
||||||
|
110212,
|
||||||
|
110213
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1002
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110212
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10003,
|
||||||
|
"formatList": [
|
||||||
|
110213,
|
||||||
|
110214
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1003
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110213
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 20001,
|
||||||
|
"formatList": [
|
||||||
|
110214,
|
||||||
|
110215
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1004
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110214
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 20002,
|
||||||
|
"formatList": [
|
||||||
|
110215,
|
||||||
|
110216
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1005
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110215
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 20003,
|
||||||
|
"formatList": [
|
||||||
|
110216,
|
||||||
|
120031
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1006
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
110216
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 30001,
|
||||||
|
"formatList": [
|
||||||
|
120031,
|
||||||
|
120032
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1007
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120031
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 30002,
|
||||||
|
"formatList": [
|
||||||
|
120032,
|
||||||
|
120033
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1008
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120032
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 30003,
|
||||||
|
"formatList": [
|
||||||
|
120033,
|
||||||
|
120034
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1009
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120033
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 40001,
|
||||||
|
"formatList": [
|
||||||
|
120034,
|
||||||
|
120035
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1010
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120034
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 40002,
|
||||||
|
"formatList": [
|
||||||
|
120035
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1011
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120035
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 40003,
|
||||||
|
"formatList": [
|
||||||
|
120036
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1012
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
120036
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 50001,
|
||||||
|
"formatList": [
|
||||||
|
130011
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1013
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
130011
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 50002,
|
||||||
|
"formatList": [
|
||||||
|
130012
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1014
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
130012
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 50003,
|
||||||
|
"formatList": [
|
||||||
|
130013
|
||||||
|
],
|
||||||
|
"droplist": [
|
||||||
|
1015
|
||||||
|
],
|
||||||
|
"passformatList": [
|
||||||
|
130013
|
||||||
|
],
|
||||||
|
"passdroplist": [],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
198
bin/json/game_combatmanster.json
Normal file
198
bin/json/game_combatmanster.json
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 110211,
|
||||||
|
"formatList": [
|
||||||
|
101072,
|
||||||
|
101073
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 110212,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 110213,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 110214,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 110215,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 110216,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120031,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120032,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120033,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120034,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120035,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 120036,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 130011,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 130012,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 130013,
|
||||||
|
"formatList": [
|
||||||
|
101072
|
||||||
|
],
|
||||||
|
"award": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1650
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -74,6 +74,7 @@ const (
|
|||||||
ModuleGrowtask core.M_Modules = "growtask" //成长任务
|
ModuleGrowtask core.M_Modules = "growtask" //成长任务
|
||||||
ModuleWorldtask core.M_Modules = "worldtask" //世界任务
|
ModuleWorldtask core.M_Modules = "worldtask" //世界任务
|
||||||
ModuleReddot core.M_Modules = "reddot" //红点
|
ModuleReddot core.M_Modules = "reddot" //红点
|
||||||
|
ModuleCombat core.M_Modules = "combat" //关卡编辑
|
||||||
)
|
)
|
||||||
|
|
||||||
//数据表名定义处
|
//数据表名定义处
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"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"
|
"sync"
|
||||||
)
|
)
|
||||||
@ -33,45 +32,45 @@ type configureComp struct {
|
|||||||
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) {
|
||||||
this.MCompConfigure.Init(service, module, comp, options)
|
this.MCompConfigure.Init(service, module, comp, options)
|
||||||
this.module = module.(*Battle)
|
this.module = module.(*Battle)
|
||||||
this.LoadConfigure(game_equipsuit, cfg.NewGameEquipSuit)
|
// this.LoadConfigure(game_equipsuit, cfg.NewGameEquipSuit)
|
||||||
this.LoadConfigure(game_monster, cfg.NewGameMonster)
|
// this.LoadConfigure(game_monster, cfg.NewGameMonster)
|
||||||
configure.RegisterConfigure(game_monsterformat, cfg.NewGameMonsterFormat, func() {
|
// configure.RegisterConfigure(game_monsterformat, cfg.NewGameMonsterFormat, func() {
|
||||||
this.mformatlock.Lock()
|
// this.mformatlock.Lock()
|
||||||
if v, err := this.GetConfigure(game_monsterformat); err != nil {
|
// if v, err := this.GetConfigure(game_monsterformat); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
// this.module.Errorf("err:%v", err)
|
||||||
return
|
// return
|
||||||
} else {
|
// } else {
|
||||||
this.mformat = make(map[int32][]*cfg.GameMonsterFormatData)
|
// this.mformat = make(map[int32][]*cfg.GameMonsterFormatData)
|
||||||
for _, v := range v.(*cfg.GameMonsterFormat).GetDataList() {
|
// for _, v := range v.(*cfg.GameMonsterFormat).GetDataList() {
|
||||||
if this.mformat[v.Id] == nil {
|
// if this.mformat[v.Id] == nil {
|
||||||
this.mformat[v.Id] = make([]*cfg.GameMonsterFormatData, 5)
|
// this.mformat[v.Id] = make([]*cfg.GameMonsterFormatData, 5)
|
||||||
}
|
// }
|
||||||
if v.Monster != -1 {
|
// if v.Monster != -1 {
|
||||||
this.mformat[v.Id][v.Pos-1] = v
|
// this.mformat[v.Id][v.Pos-1] = v
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
this.mformatlock.Unlock()
|
// this.mformatlock.Unlock()
|
||||||
})
|
// })
|
||||||
configure.RegisterConfigure(game_skillatk, cfg.NewGameSkillAtk, func() {
|
// configure.RegisterConfigure(game_skillatk, cfg.NewGameSkillAtk, func() {
|
||||||
this.skillatklock.Lock()
|
// this.skillatklock.Lock()
|
||||||
if v, err := this.GetConfigure(game_skillatk); err != nil {
|
// if v, err := this.GetConfigure(game_skillatk); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
// this.module.Errorf("err:%v", err)
|
||||||
return
|
// return
|
||||||
} else {
|
// } else {
|
||||||
this.skillatk = make(map[int32]map[int32]*cfg.GameSkillAtkData)
|
// this.skillatk = make(map[int32]map[int32]*cfg.GameSkillAtkData)
|
||||||
for _, v := range v.(*cfg.GameSkillAtk).GetDataList() {
|
// for _, v := range v.(*cfg.GameSkillAtk).GetDataList() {
|
||||||
if this.skillatk[v.Id] == nil {
|
// if this.skillatk[v.Id] == nil {
|
||||||
this.skillatk[v.Id] = make(map[int32]*cfg.GameSkillAtkData)
|
// this.skillatk[v.Id] = make(map[int32]*cfg.GameSkillAtkData)
|
||||||
}
|
// }
|
||||||
this.skillatk[v.Id][v.Level] = v
|
// this.skillatk[v.Id][v.Level] = v
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
this.skillatklock.Unlock()
|
// this.skillatklock.Unlock()
|
||||||
})
|
// })
|
||||||
this.LoadConfigure(game_skillafteratk, cfg.NewGameSkillAfteratk)
|
// this.LoadConfigure(game_skillafteratk, cfg.NewGameSkillAfteratk)
|
||||||
this.LoadConfigure(game_skillbuff, cfg.NewGameSkillBuff)
|
// this.LoadConfigure(game_skillbuff, cfg.NewGameSkillBuff)
|
||||||
this.LoadConfigure(game_skillpassive, cfg.NewGameSkillPassive)
|
// this.LoadConfigure(game_skillpassive, cfg.NewGameSkillPassive)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
29
modules/combat/api.go
Normal file
29
modules/combat/api.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
装备模块 API
|
||||||
|
*/
|
||||||
|
type apiComp struct {
|
||||||
|
modules.MCompGate
|
||||||
|
service core.IService
|
||||||
|
module *Combat
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
this.MCompGate.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*Combat)
|
||||||
|
this.service = service
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) Start() (err error) {
|
||||||
|
err = this.MCompGate.Start()
|
||||||
|
return
|
||||||
|
}
|
56
modules/combat/api_challenge.go
Normal file
56
modules/combat/api_challenge.go
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.CombatChallengeReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///挑战
|
||||||
|
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.CombatChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
manster *cfg.GameCombatMansterData
|
||||||
|
record *pb.DBBattleRecord
|
||||||
|
err error
|
||||||
|
cd pb.ErrorCode
|
||||||
|
)
|
||||||
|
defer func() {
|
||||||
|
if cd == pb.ErrorCode_Success {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "challenge", &pb.CombatChallengeResp{Code: cd, Manster: req.Manster, Info: &pb.BattleInfo{
|
||||||
|
Id: record.Id,
|
||||||
|
Title: record.Title,
|
||||||
|
Btype: record.Btype,
|
||||||
|
Ptype: record.Ptype,
|
||||||
|
RedCompId: record.RedCompId,
|
||||||
|
Redflist: record.Redflist,
|
||||||
|
BlueCompId: record.BlueCompId,
|
||||||
|
Buleflist: record.Buleflist,
|
||||||
|
Tasks: nil,
|
||||||
|
}})
|
||||||
|
} else {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "challenge", &pb.AcademyChallengeResp{Code: cd, Info: nil})
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
if cd = this.ChallengeCheck(session, req); cd != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if manster, err = this.module.configure.getGameCombatManster(req.Manster); err != nil {
|
||||||
|
cd = pb.ErrorCode_ConfigNoFound
|
||||||
|
return
|
||||||
|
}
|
||||||
|
cd, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||||
|
Ptype: pb.PlayType_academy,
|
||||||
|
Format: req.Battle,
|
||||||
|
Mformat: manster.FormatList,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
59
modules/combat/api_challengereceive.go
Normal file
59
modules/combat/api_challengereceive.go
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) ChallengeReceiveCheck(session comm.IUserSession, req *pb.CombatChallengeReceiveReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///奖励领取
|
||||||
|
func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatChallengeReceiveReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
iswin bool
|
||||||
|
info *pb.DBCombatUser
|
||||||
|
manster *cfg.GameCombatMansterData
|
||||||
|
|
||||||
|
// group []*cfg.GameTeachingData
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if code = this.ChallengeReceiveCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if code, iswin = this.module.battle.CheckBattleReport(session, req.Report); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if iswin {
|
||||||
|
if info, err = this.module.modelCombat.queryInfo(session.GetUserId()); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if manster, err = this.module.configure.getGameCombatManster(req.Manster); err != nil {
|
||||||
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for _, v := range info.Passmanster {
|
||||||
|
if v == req.Manster {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
info.Passmanster = append(info.Passmanster, req.Manster)
|
||||||
|
if err = this.module.modelCombat.updateInfo(info); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.module.DispenseRes(session, manster.Award, true)
|
||||||
|
}
|
||||||
|
session.SendMsg(string(this.module.GetType()), "receive", &pb.CombatChallengeReceiveResp{Issucc: true})
|
||||||
|
return
|
||||||
|
}
|
48
modules/combat/api_drop.go
Normal file
48
modules/combat/api_drop.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) DropCheck(session comm.IUserSession, req *pb.CombatDropReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///奖励领取
|
||||||
|
func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
info *pb.DBCombatUser
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if code = this.DropCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if info, err = this.module.modelCombat.queryInfo(session.GetUserId()); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, v := range info.Passdrop {
|
||||||
|
if v == req.Drop {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
info.Passdrop = append(info.Passmanster, req.Drop)
|
||||||
|
if err = this.module.modelCombat.updateInfo(info); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reward := this.module.configure.GetDropReward(req.Drop)
|
||||||
|
this.module.DispenseRes(session, reward, true)
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code})
|
||||||
|
return
|
||||||
|
}
|
41
modules/combat/api_in.go
Normal file
41
modules/combat/api_in.go
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) InCheck(session comm.IUserSession, req *pb.CombatInReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取自己的排行榜信息
|
||||||
|
func (this *apiComp) In(session comm.IUserSession, req *pb.CombatInReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
info *pb.DBCombatUser
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if code = this.InCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if info, err = this.module.modelCombat.queryInfo(session.GetUserId()); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if info.Currlevel != 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
info.Currlevel = req.Id
|
||||||
|
if err = this.module.modelCombat.updateInfo(info); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "info", &pb.CombatInReq{Id: req.Id})
|
||||||
|
return
|
||||||
|
}
|
30
modules/combat/api_out.go
Normal file
30
modules/combat/api_out.go
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) OutCheck(session comm.IUserSession, req *pb.CombatOutReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///获取自己的排行榜信息
|
||||||
|
func (this *apiComp) Out(session comm.IUserSession, req *pb.CombatOutReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if code = this.OutCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err = this.module.modelCombat.delInfo(session.GetUserId()); err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
session.SendMsg(string(this.module.GetType()), "out", &pb.CombatOutResp{Id: req.Id})
|
||||||
|
return
|
||||||
|
}
|
62
modules/combat/configure.go
Normal file
62
modules/combat/configure.go
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
game_combatlevel = "game_combatlevel.json"
|
||||||
|
game_combatmanster = "game_combatmanster.json"
|
||||||
|
)
|
||||||
|
|
||||||
|
///背包配置管理组件
|
||||||
|
type configureComp struct {
|
||||||
|
modules.MCompConfigure
|
||||||
|
module *Combat
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
this.MCompConfigure.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*Combat)
|
||||||
|
this.LoadConfigure(game_combatlevel, cfg.NewGameCombatLevel)
|
||||||
|
this.LoadConfigure(game_combatmanster, cfg.NewGameCombatManster)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询管卡表
|
||||||
|
func (this *configureComp) getCombatLevel(id int32) (result *cfg.GameCombatLevelData, err error) {
|
||||||
|
var (
|
||||||
|
v interface{}
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
if v, err = this.GetConfigure(game_combatlevel); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
} else {
|
||||||
|
if result, ok = v.(*cfg.GameCombatLevel).GetDataMap()[id]; !ok {
|
||||||
|
err = fmt.Errorf("on found GameMonster:%d", id)
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询管卡表
|
||||||
|
func (this *configureComp) getGameCombatManster(mid int32) (result *cfg.GameCombatMansterData, err error) {
|
||||||
|
var (
|
||||||
|
v interface{}
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
if v, err = this.GetConfigure(game_combatmanster); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
} else {
|
||||||
|
if result, ok = v.(*cfg.GameCombatManster).GetDataMap()[mid]; !ok {
|
||||||
|
err = fmt.Errorf("on found GameMonster:%d", mid)
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
69
modules/combat/modelCombat.go
Normal file
69
modules/combat/modelCombat.go
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/mgo"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
"go_dreamfactory/sys/db"
|
||||||
|
)
|
||||||
|
|
||||||
|
///论坛 数据组件
|
||||||
|
type modelCombatComp struct {
|
||||||
|
modules.MCompModel
|
||||||
|
module *Combat
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *modelCombatComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
|
||||||
|
this.TableName = comm.TableAcademy
|
||||||
|
this.MCompModel.Init(service, module, comp, opt)
|
||||||
|
this.module = module.(*Combat)
|
||||||
|
|
||||||
|
//创建uid索引
|
||||||
|
// this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||||
|
// Keys: bsonx.Doc{{Key: "heroid", Value: bsonx.Int32(1)}},
|
||||||
|
// })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询用户装备数据
|
||||||
|
func (this *modelCombatComp) queryInfo(uId string) (result *pb.DBCombatUser, err error) {
|
||||||
|
result = &pb.DBCombatUser{
|
||||||
|
Uid: uId,
|
||||||
|
Currlevel: 0,
|
||||||
|
Passmanster: make([]int32, 0),
|
||||||
|
Passdrop: make([]int32, 0),
|
||||||
|
}
|
||||||
|
if err = this.Get(uId, result); err != nil && err != mgo.MongodbNil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err == mgo.MongodbNil {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///保存用户竞技场信息
|
||||||
|
func (this *modelCombatComp) updateInfo(info *pb.DBCombatUser) (err error) {
|
||||||
|
if err = this.Change(info.Uid, map[string]interface{}{
|
||||||
|
"currlevel": info.Currlevel,
|
||||||
|
"passmanster": info.Passmanster,
|
||||||
|
"passdrop": info.Passdrop,
|
||||||
|
}); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///保存用户竞技场信息
|
||||||
|
func (this *modelCombatComp) delInfo(uid string) (err error) {
|
||||||
|
if err = this.Del(uid, db.SetDBMgoLog(false)); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
64
modules/combat/module.go
Normal file
64
modules/combat/module.go
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package combat
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/base"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/event"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
模块名:关卡编辑器
|
||||||
|
描述:新手训练营
|
||||||
|
开发:李伟
|
||||||
|
*/
|
||||||
|
func NewModule() core.IModule {
|
||||||
|
m := new(Combat)
|
||||||
|
return m
|
||||||
|
}
|
||||||
|
|
||||||
|
type Combat struct {
|
||||||
|
modules.ModuleBase
|
||||||
|
service base.IRPCXService
|
||||||
|
battle comm.IBattle
|
||||||
|
api_comp *apiComp
|
||||||
|
configure *configureComp
|
||||||
|
modelCombat *modelCombatComp
|
||||||
|
}
|
||||||
|
|
||||||
|
//模块名
|
||||||
|
func (this *Combat) GetType() core.M_Modules {
|
||||||
|
return comm.ModuleCombat
|
||||||
|
}
|
||||||
|
|
||||||
|
//模块初始化接口 注册用户创建角色事件
|
||||||
|
func (this *Combat) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.ModuleBase.Init(service, module, options)
|
||||||
|
this.service = service.(base.IRPCXService)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Combat) Start() (err error) {
|
||||||
|
err = this.ModuleBase.Start()
|
||||||
|
var module core.IModule
|
||||||
|
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.battle = module.(comm.IBattle)
|
||||||
|
event.RegisterGO(comm.EventUserOffline, this.EventUserOffline)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//装备组件
|
||||||
|
func (this *Combat) OnInstallComp() {
|
||||||
|
this.ModuleBase.OnInstallComp()
|
||||||
|
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||||
|
this.modelCombat = this.RegisterComp(new(modelCombatComp)).(*modelCombatComp)
|
||||||
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Event------------------------------------------------------------------------------------------------------------
|
||||||
|
func (this *Combat) EventUserOffline(session comm.IUserSession) {
|
||||||
|
this.modelCombat.delInfo(session.GetUserId())
|
||||||
|
}
|
@ -212,8 +212,8 @@ func (this *MCompConfigure) GetMultipleDropReward(count, dropId int32, items []*
|
|||||||
resData = append(resData, items...)
|
resData = append(resData, items...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
func (this *MCompConfigure) GetDropReward(dropId int32, Items []*cfg.Gameatn) {
|
func (this *MCompConfigure) GetDropReward(dropId int32) (result []*cfg.Gameatn) {
|
||||||
Items = make([]*cfg.Gameatn, 0)
|
result = make([]*cfg.Gameatn, 0)
|
||||||
|
|
||||||
data := this.GetDropData(dropId)
|
data := this.GetDropData(dropId)
|
||||||
szW := make([]int32, 0)
|
szW := make([]int32, 0)
|
||||||
@ -221,7 +221,7 @@ func (this *MCompConfigure) GetDropReward(dropId int32, Items []*cfg.Gameatn) {
|
|||||||
szW = append(szW, value.P)
|
szW = append(szW, value.P)
|
||||||
}
|
}
|
||||||
index := comm.GetRandW(szW)
|
index := comm.GetRandW(szW)
|
||||||
Items = append(Items, data[index].Prize...)
|
result = append(result, data[index].Prize...)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
|
|||||||
mapData["challengeCount"] = hunting.ChallengeCount
|
mapData["challengeCount"] = hunting.ChallengeCount
|
||||||
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
|
code = this.module.ModifyHuntingData(session.GetUserId(), mapData)
|
||||||
// 发放通关随机奖励
|
// 发放通关随机奖励
|
||||||
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励
|
reward = this.module.configure.GetDropReward(cfg.Drop) // 获取掉落奖励
|
||||||
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
|
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励
|
reward = this.module.configure.GetDropReward(cfg.Drop) // 获取掉落奖励
|
||||||
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
|
if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -332,6 +332,110 @@ func (x *CombatChallengeResp) GetInfo() *BattleInfo {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//战斗奖励领取
|
||||||
|
type CombatChallengeReceiveReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Manster int32 `protobuf:"varint,1,opt,name=manster,proto3" json:"manster"`
|
||||||
|
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveReq) Reset() {
|
||||||
|
*x = CombatChallengeReceiveReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_combat_combat_msg_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CombatChallengeReceiveReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_combat_combat_msg_proto_msgTypes[6]
|
||||||
|
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 CombatChallengeReceiveReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CombatChallengeReceiveReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_combat_combat_msg_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveReq) GetManster() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Manster
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveReq) GetReport() *BattleReport {
|
||||||
|
if x != nil {
|
||||||
|
return x.Report
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
//战斗奖励领取
|
||||||
|
type CombatChallengeReceiveResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveResp) Reset() {
|
||||||
|
*x = CombatChallengeReceiveResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_combat_combat_msg_proto_msgTypes[7]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CombatChallengeReceiveResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_combat_combat_msg_proto_msgTypes[7]
|
||||||
|
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 CombatChallengeReceiveResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CombatChallengeReceiveResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_combat_combat_msg_proto_rawDescGZIP(), []int{7}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CombatChallengeReceiveResp) GetIssucc() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Issucc
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
//宝箱获取请求
|
//宝箱获取请求
|
||||||
type CombatDropReq struct {
|
type CombatDropReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -344,7 +448,7 @@ type CombatDropReq struct {
|
|||||||
func (x *CombatDropReq) Reset() {
|
func (x *CombatDropReq) Reset() {
|
||||||
*x = CombatDropReq{}
|
*x = CombatDropReq{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_combat_combat_msg_proto_msgTypes[6]
|
mi := &file_combat_combat_msg_proto_msgTypes[8]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -357,7 +461,7 @@ func (x *CombatDropReq) String() string {
|
|||||||
func (*CombatDropReq) ProtoMessage() {}
|
func (*CombatDropReq) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CombatDropReq) ProtoReflect() protoreflect.Message {
|
func (x *CombatDropReq) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_combat_combat_msg_proto_msgTypes[6]
|
mi := &file_combat_combat_msg_proto_msgTypes[8]
|
||||||
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 {
|
||||||
@ -370,7 +474,7 @@ func (x *CombatDropReq) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CombatDropReq.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CombatDropReq.ProtoReflect.Descriptor instead.
|
||||||
func (*CombatDropReq) Descriptor() ([]byte, []int) {
|
func (*CombatDropReq) Descriptor() ([]byte, []int) {
|
||||||
return file_combat_combat_msg_proto_rawDescGZIP(), []int{6}
|
return file_combat_combat_msg_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CombatDropReq) GetDrop() int32 {
|
func (x *CombatDropReq) GetDrop() int32 {
|
||||||
@ -393,7 +497,7 @@ type CombatDropResp struct {
|
|||||||
func (x *CombatDropResp) Reset() {
|
func (x *CombatDropResp) Reset() {
|
||||||
*x = CombatDropResp{}
|
*x = CombatDropResp{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_combat_combat_msg_proto_msgTypes[7]
|
mi := &file_combat_combat_msg_proto_msgTypes[9]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -406,7 +510,7 @@ func (x *CombatDropResp) String() string {
|
|||||||
func (*CombatDropResp) ProtoMessage() {}
|
func (*CombatDropResp) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *CombatDropResp) ProtoReflect() protoreflect.Message {
|
func (x *CombatDropResp) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_combat_combat_msg_proto_msgTypes[7]
|
mi := &file_combat_combat_msg_proto_msgTypes[9]
|
||||||
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 {
|
||||||
@ -419,7 +523,7 @@ func (x *CombatDropResp) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use CombatDropResp.ProtoReflect.Descriptor instead.
|
// Deprecated: Use CombatDropResp.ProtoReflect.Descriptor instead.
|
||||||
func (*CombatDropResp) Descriptor() ([]byte, []int) {
|
func (*CombatDropResp) Descriptor() ([]byte, []int) {
|
||||||
return file_combat_combat_msg_proto_rawDescGZIP(), []int{7}
|
return file_combat_combat_msg_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CombatDropResp) GetCode() ErrorCode {
|
func (x *CombatDropResp) GetCode() ErrorCode {
|
||||||
@ -464,16 +568,25 @@ var file_combat_combat_msg_proto_rawDesc = []byte{
|
|||||||
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e,
|
0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e,
|
||||||
0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
||||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x23, 0x0a, 0x0d, 0x43,
|
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5c, 0x0a, 0x19, 0x43,
|
||||||
0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04,
|
0x6f, 0x6d, 0x62, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65,
|
||||||
0x64, 0x72, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x72, 0x6f, 0x70,
|
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x73,
|
||||||
0x22, 0x51, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65,
|
0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74,
|
||||||
0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
0x65, 0x72, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f,
|
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72,
|
||||||
0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x34, 0x0a, 0x1a, 0x43, 0x6f, 0x6d,
|
||||||
0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x04, 0x61,
|
0x62, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65,
|
||||||
0x74, 0x6e, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63,
|
||||||
0x74, 0x6f, 0x33,
|
0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22,
|
||||||
|
0x23, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71,
|
||||||
|
0x12, 0x12, 0x0a, 0x04, 0x64, 0x72, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
|
||||||
|
0x64, 0x72, 0x6f, 0x70, 0x22, 0x51, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72,
|
||||||
|
0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65,
|
||||||
|
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x18, 0x02,
|
||||||
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74,
|
||||||
|
0x73, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||||
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -488,7 +601,7 @@ func file_combat_combat_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_combat_combat_msg_proto_rawDescData
|
return file_combat_combat_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_combat_combat_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
var file_combat_combat_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||||
var file_combat_combat_msg_proto_goTypes = []interface{}{
|
var file_combat_combat_msg_proto_goTypes = []interface{}{
|
||||||
(*CombatInReq)(nil), // 0: CombatInReq
|
(*CombatInReq)(nil), // 0: CombatInReq
|
||||||
(*CombatInResp)(nil), // 1: CombatInResp
|
(*CombatInResp)(nil), // 1: CombatInResp
|
||||||
@ -496,24 +609,28 @@ var file_combat_combat_msg_proto_goTypes = []interface{}{
|
|||||||
(*CombatOutResp)(nil), // 3: CombatOutResp
|
(*CombatOutResp)(nil), // 3: CombatOutResp
|
||||||
(*CombatChallengeReq)(nil), // 4: CombatChallengeReq
|
(*CombatChallengeReq)(nil), // 4: CombatChallengeReq
|
||||||
(*CombatChallengeResp)(nil), // 5: CombatChallengeResp
|
(*CombatChallengeResp)(nil), // 5: CombatChallengeResp
|
||||||
(*CombatDropReq)(nil), // 6: CombatDropReq
|
(*CombatChallengeReceiveReq)(nil), // 6: CombatChallengeReceiveReq
|
||||||
(*CombatDropResp)(nil), // 7: CombatDropResp
|
(*CombatChallengeReceiveResp)(nil), // 7: CombatChallengeReceiveResp
|
||||||
(*BattleFormation)(nil), // 8: BattleFormation
|
(*CombatDropReq)(nil), // 8: CombatDropReq
|
||||||
(ErrorCode)(0), // 9: ErrorCode
|
(*CombatDropResp)(nil), // 9: CombatDropResp
|
||||||
(*BattleInfo)(nil), // 10: BattleInfo
|
(*BattleFormation)(nil), // 10: BattleFormation
|
||||||
(*UserAssets)(nil), // 11: UserAssets
|
(ErrorCode)(0), // 11: ErrorCode
|
||||||
|
(*BattleInfo)(nil), // 12: BattleInfo
|
||||||
|
(*BattleReport)(nil), // 13: BattleReport
|
||||||
|
(*UserAssets)(nil), // 14: UserAssets
|
||||||
}
|
}
|
||||||
var file_combat_combat_msg_proto_depIdxs = []int32{
|
var file_combat_combat_msg_proto_depIdxs = []int32{
|
||||||
8, // 0: CombatChallengeReq.battle:type_name -> BattleFormation
|
10, // 0: CombatChallengeReq.battle:type_name -> BattleFormation
|
||||||
9, // 1: CombatChallengeResp.code:type_name -> ErrorCode
|
11, // 1: CombatChallengeResp.code:type_name -> ErrorCode
|
||||||
10, // 2: CombatChallengeResp.info:type_name -> BattleInfo
|
12, // 2: CombatChallengeResp.info:type_name -> BattleInfo
|
||||||
9, // 3: CombatDropResp.code:type_name -> ErrorCode
|
13, // 3: CombatChallengeReceiveReq.report:type_name -> BattleReport
|
||||||
11, // 4: CombatDropResp.atns:type_name -> UserAssets
|
11, // 4: CombatDropResp.code:type_name -> ErrorCode
|
||||||
5, // [5:5] is the sub-list for method output_type
|
14, // 5: CombatDropResp.atns:type_name -> UserAssets
|
||||||
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_combat_combat_msg_proto_init() }
|
func init() { file_combat_combat_msg_proto_init() }
|
||||||
@ -598,7 +715,7 @@ func file_combat_combat_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_combat_combat_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_combat_combat_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CombatDropReq); i {
|
switch v := v.(*CombatChallengeReceiveReq); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -610,6 +727,30 @@ func file_combat_combat_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_combat_combat_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_combat_combat_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CombatChallengeReceiveResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_combat_combat_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CombatDropReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_combat_combat_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*CombatDropResp); i {
|
switch v := v.(*CombatDropResp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -628,7 +769,7 @@ func file_combat_combat_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_combat_combat_msg_proto_rawDesc,
|
RawDescriptor: file_combat_combat_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 8,
|
NumMessages: 10,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -488,65 +488,18 @@ func (x *WorldtaskBattleFinishResp) GetTaskId() int32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 当前完成的任务列表推送
|
// 当前完成的任务列表推送
|
||||||
type WorldtaskList struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
TaskId []int32 `protobuf:"varint,1,rep,packed,name=taskId,proto3" json:"taskId"` //任务ID
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WorldtaskList) Reset() {
|
|
||||||
*x = WorldtaskList{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_worldtask_worldtask_msg_proto_msgTypes[9]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WorldtaskList) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*WorldtaskList) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *WorldtaskList) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_worldtask_worldtask_msg_proto_msgTypes[9]
|
|
||||||
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 WorldtaskList.ProtoReflect.Descriptor instead.
|
|
||||||
func (*WorldtaskList) Descriptor() ([]byte, []int) {
|
|
||||||
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WorldtaskList) GetTaskId() []int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.TaskId
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type WorldtaskFinishIdsPush struct {
|
type WorldtaskFinishIdsPush struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Tasks map[int32]*WorldtaskList `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //完成的任务 key:groupId val:任务ID
|
TaskList []*Worldtask `protobuf:"bytes,1,rep,name=taskList,proto3" json:"taskList"` //完成的任务 key:groupId val:任务ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorldtaskFinishIdsPush) Reset() {
|
func (x *WorldtaskFinishIdsPush) Reset() {
|
||||||
*x = WorldtaskFinishIdsPush{}
|
*x = WorldtaskFinishIdsPush{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_worldtask_worldtask_msg_proto_msgTypes[10]
|
mi := &file_worldtask_worldtask_msg_proto_msgTypes[9]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -559,7 +512,7 @@ func (x *WorldtaskFinishIdsPush) String() string {
|
|||||||
func (*WorldtaskFinishIdsPush) ProtoMessage() {}
|
func (*WorldtaskFinishIdsPush) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message {
|
func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_worldtask_worldtask_msg_proto_msgTypes[10]
|
mi := &file_worldtask_worldtask_msg_proto_msgTypes[9]
|
||||||
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 {
|
||||||
@ -572,12 +525,12 @@ func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use WorldtaskFinishIdsPush.ProtoReflect.Descriptor instead.
|
// Deprecated: Use WorldtaskFinishIdsPush.ProtoReflect.Descriptor instead.
|
||||||
func (*WorldtaskFinishIdsPush) Descriptor() ([]byte, []int) {
|
func (*WorldtaskFinishIdsPush) Descriptor() ([]byte, []int) {
|
||||||
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{10}
|
return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorldtaskFinishIdsPush) GetTasks() map[int32]*WorldtaskList {
|
func (x *WorldtaskFinishIdsPush) GetTaskList() []*Worldtask {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Tasks
|
return x.TaskList
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -630,20 +583,12 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{
|
|||||||
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e,
|
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e,
|
||||||
0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
|
0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22,
|
||||||
0x27, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05,
|
0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61, 0x73,
|
||||||
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72,
|
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f,
|
||||||
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50,
|
0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73,
|
||||||
0x75, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03,
|
0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69,
|
0x33,
|
||||||
0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x54, 0x61, 0x73, 0x6b,
|
|
||||||
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x48, 0x0a,
|
|
||||||
0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
|
||||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a,
|
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57,
|
|
||||||
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61,
|
|
||||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -658,7 +603,7 @@ func file_worldtask_worldtask_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_worldtask_worldtask_msg_proto_rawDescData
|
return file_worldtask_worldtask_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||||
var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{
|
var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{
|
||||||
(*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq
|
(*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq
|
||||||
(*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp
|
(*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp
|
||||||
@ -669,24 +614,22 @@ var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{
|
|||||||
(*WorldtaskBattleStartResp)(nil), // 6: WorldtaskBattleStartResp
|
(*WorldtaskBattleStartResp)(nil), // 6: WorldtaskBattleStartResp
|
||||||
(*WorldtaskBattleFinishReq)(nil), // 7: WorldtaskBattleFinishReq
|
(*WorldtaskBattleFinishReq)(nil), // 7: WorldtaskBattleFinishReq
|
||||||
(*WorldtaskBattleFinishResp)(nil), // 8: WorldtaskBattleFinishResp
|
(*WorldtaskBattleFinishResp)(nil), // 8: WorldtaskBattleFinishResp
|
||||||
(*WorldtaskList)(nil), // 9: WorldtaskList
|
(*WorldtaskFinishIdsPush)(nil), // 9: WorldtaskFinishIdsPush
|
||||||
(*WorldtaskFinishIdsPush)(nil), // 10: WorldtaskFinishIdsPush
|
(*DBWorldtask)(nil), // 10: DBWorldtask
|
||||||
nil, // 11: WorldtaskFinishIdsPush.TasksEntry
|
(*BattleInfo)(nil), // 11: BattleInfo
|
||||||
(*DBWorldtask)(nil), // 12: DBWorldtask
|
(*BattleReport)(nil), // 12: BattleReport
|
||||||
(*BattleInfo)(nil), // 13: BattleInfo
|
(*Worldtask)(nil), // 13: Worldtask
|
||||||
(*BattleReport)(nil), // 14: BattleReport
|
|
||||||
}
|
}
|
||||||
var file_worldtask_worldtask_msg_proto_depIdxs = []int32{
|
var file_worldtask_worldtask_msg_proto_depIdxs = []int32{
|
||||||
12, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask
|
10, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask
|
||||||
13, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo
|
11, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo
|
||||||
14, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport
|
12, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport
|
||||||
11, // 3: WorldtaskFinishIdsPush.tasks:type_name -> WorldtaskFinishIdsPush.TasksEntry
|
13, // 3: WorldtaskFinishIdsPush.taskList:type_name -> Worldtask
|
||||||
9, // 4: WorldtaskFinishIdsPush.TasksEntry.value:type_name -> WorldtaskList
|
4, // [4:4] is the sub-list for method output_type
|
||||||
5, // [5:5] is the sub-list for method output_type
|
4, // [4:4] is the sub-list for method input_type
|
||||||
5, // [5:5] is the sub-list for method input_type
|
4, // [4:4] is the sub-list for extension type_name
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
4, // [4:4] is the sub-list for extension extendee
|
||||||
5, // [5:5] is the sub-list for extension extendee
|
0, // [0:4] is the sub-list for field type_name
|
||||||
0, // [0:5] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_worldtask_worldtask_msg_proto_init() }
|
func init() { file_worldtask_worldtask_msg_proto_init() }
|
||||||
@ -806,18 +749,6 @@ func file_worldtask_worldtask_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_worldtask_worldtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
file_worldtask_worldtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*WorldtaskList); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_worldtask_worldtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*WorldtaskFinishIdsPush); i {
|
switch v := v.(*WorldtaskFinishIdsPush); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -836,7 +767,7 @@ func file_worldtask_worldtask_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_worldtask_worldtask_msg_proto_rawDesc,
|
RawDescriptor: file_worldtask_worldtask_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 12,
|
NumMessages: 10,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"go_dreamfactory/modules/arena"
|
"go_dreamfactory/modules/arena"
|
||||||
"go_dreamfactory/modules/battle"
|
"go_dreamfactory/modules/battle"
|
||||||
"go_dreamfactory/modules/chat"
|
"go_dreamfactory/modules/chat"
|
||||||
|
"go_dreamfactory/modules/combat"
|
||||||
"go_dreamfactory/modules/equipment"
|
"go_dreamfactory/modules/equipment"
|
||||||
"go_dreamfactory/modules/forum"
|
"go_dreamfactory/modules/forum"
|
||||||
"go_dreamfactory/modules/friend"
|
"go_dreamfactory/modules/friend"
|
||||||
@ -104,6 +105,7 @@ func main() {
|
|||||||
worldtask.NewModule(),
|
worldtask.NewModule(),
|
||||||
academy.NewModule(),
|
academy.NewModule(),
|
||||||
reddot.NewModule(),
|
reddot.NewModule(),
|
||||||
|
combat.NewModule(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user