Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
2454d2ea14
@ -158,8 +158,8 @@ const (
|
|||||||
TableLinestory = "linestory"
|
TableLinestory = "linestory"
|
||||||
|
|
||||||
TableFetterstory = "fetterstory"
|
TableFetterstory = "fetterstory"
|
||||||
TableLibrary = "library"
|
TableLibrary = "library"
|
||||||
TableFetter = "herofetter"
|
TableFetter = "herofetter"
|
||||||
|
|
||||||
TableCrossSession = "crosssession"
|
TableCrossSession = "crosssession"
|
||||||
|
|
||||||
@ -208,6 +208,9 @@ const (
|
|||||||
|
|
||||||
TableEnchantRank = "enchantRank"
|
TableEnchantRank = "enchantRank"
|
||||||
TableEnchant = "enchant"
|
TableEnchant = "enchant"
|
||||||
|
|
||||||
|
// 自动战斗
|
||||||
|
TableAuto = "autoBattle"
|
||||||
)
|
)
|
||||||
|
|
||||||
//RPC服务接口定义处
|
//RPC服务接口定义处
|
||||||
|
49
modules/auto/api.go
Normal file
49
modules/auto/api.go
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
HuntingGetListResp = "getlist"
|
||||||
|
HuntingChallengeResp = "challenge"
|
||||||
|
HuntingChallengeOverResp = "challengeover"
|
||||||
|
HuntingSkillLvResp = "skilllv"
|
||||||
|
HuntingGetRewardResp = "getreward"
|
||||||
|
HuntingBuyResp = "buy"
|
||||||
|
HuntingRankListResp = "ranklist"
|
||||||
|
)
|
||||||
|
|
||||||
|
type apiComp struct {
|
||||||
|
modules.MCompGate
|
||||||
|
service core.IService
|
||||||
|
configure *configureComp
|
||||||
|
module *AutoBattle
|
||||||
|
friend comm.IFriend
|
||||||
|
chat comm.IChat
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.MCompGate.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*AutoBattle)
|
||||||
|
|
||||||
|
this.service = service
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) Start() (err error) {
|
||||||
|
err = this.MCompGate.Start()
|
||||||
|
var module core.IModule
|
||||||
|
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.friend = module.(comm.IFriend)
|
||||||
|
if module, err = this.service.GetModule(comm.ModuleChat); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.chat = module.(comm.IChat)
|
||||||
|
return
|
||||||
|
}
|
22
modules/auto/api_buy.go
Normal file
22
modules/auto/api_buy.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode) {
|
||||||
|
if req.Count <= 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
23
modules/auto/api_challenge.go
Normal file
23
modules/auto/api_challenge.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.HuntingChallengeReq) (code pb.ErrorCode) {
|
||||||
|
if req.BossType <= 0 && req.Difficulty > 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///挑战主线关卡
|
||||||
|
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
23
modules/auto/api_challengeover.go
Normal file
23
modules/auto/api_challengeover.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (code pb.ErrorCode) {
|
||||||
|
if req.BossType <= 0 && req.Difficulty > 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
///挑战主线关卡
|
||||||
|
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
19
modules/auto/api_getlist.go
Normal file
19
modules/auto/api_getlist.go
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.HuntingGetListReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
39
modules/auto/comp_configure.go
Normal file
39
modules/auto/comp_configure.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/sys/configure"
|
||||||
|
)
|
||||||
|
|
||||||
|
const ()
|
||||||
|
|
||||||
|
///配置管理基础组件
|
||||||
|
type configureComp struct {
|
||||||
|
modules.MCompConfigure
|
||||||
|
}
|
||||||
|
|
||||||
|
//组件初始化接口
|
||||||
|
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)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载多个配置文件
|
||||||
|
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) {
|
||||||
|
for k, v := range confs {
|
||||||
|
err = configure.RegisterConfigure(k, v, nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("配置文件:%s解析失败!", k)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//读取配置数据
|
||||||
|
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||||
|
return configure.GetConfigure(name)
|
||||||
|
}
|
43
modules/auto/model_auto.go
Normal file
43
modules/auto/model_auto.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type modelAutoBattle struct {
|
||||||
|
modules.MCompModel
|
||||||
|
module *AutoBattle
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *modelAutoBattle) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
this.TableName = string(comm.TableAuto)
|
||||||
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
|
this.module = module.(*AutoBattle)
|
||||||
|
// uid 创建索引
|
||||||
|
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||||
|
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *modelAutoBattle) modifyAutoBattleDataByObjId(uid string, id string, data map[string]interface{}) error {
|
||||||
|
err := this.ChangeList(uid, id, data)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表信息
|
||||||
|
func (this *modelAutoBattle) getAutoBattleList(uid string) (result *pb.DBAutoBattle, err error) {
|
||||||
|
result = &pb.DBAutoBattle{}
|
||||||
|
if err = this.Get(uid, result); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = nil
|
||||||
|
return result, err
|
||||||
|
}
|
63
modules/auto/module.go
Normal file
63
modules/auto/module.go
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
package autoBattle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/modules"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AutoBattle struct {
|
||||||
|
modules.ModuleBase
|
||||||
|
modelAutoBattle *modelAutoBattle
|
||||||
|
api *apiComp
|
||||||
|
configure *configureComp
|
||||||
|
battle comm.IBattle
|
||||||
|
service core.IService
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewModule() core.IModule {
|
||||||
|
return &AutoBattle{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *AutoBattle) GetType() core.M_Modules {
|
||||||
|
return comm.ModuleHunting
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *AutoBattle) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||||
|
err = this.ModuleBase.Init(service, module, options)
|
||||||
|
this.service = service
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *AutoBattle) 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)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *AutoBattle) OnInstallComp() {
|
||||||
|
this.ModuleBase.OnInstallComp()
|
||||||
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||||
|
|
||||||
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 接口信息
|
||||||
|
func (this *AutoBattle) ModifyAutoData(uid string, id string, data map[string]interface{}) (code pb.ErrorCode) {
|
||||||
|
err := this.modelAutoBattle.modifyAutoBattleDataByObjId(uid, id, data)
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *AutoBattle) CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingRank) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
@ -48,15 +48,15 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListRe
|
|||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
iContt := conf.EnchantbossInitial
|
iCont := conf.EnchantbossInitial
|
||||||
atn := conf.EnchantbossCos
|
atn := conf.EnchantbossCos
|
||||||
if iContt > 0 {
|
if iCont > 0 {
|
||||||
|
res := &cfg.Gameatn{
|
||||||
this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{
|
|
||||||
A: atn.A,
|
A: atn.A,
|
||||||
T: atn.T,
|
T: atn.T,
|
||||||
N: iContt,
|
N: iCont,
|
||||||
}}, true)
|
}
|
||||||
|
this.module.DispenseRes(session, []*cfg.Gameatn{res}, true)
|
||||||
}
|
}
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
|
@ -54,12 +54,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
|
|||||||
iCont := conf.HuntingNum
|
iCont := conf.HuntingNum
|
||||||
atn := conf.HuntingCos
|
atn := conf.HuntingCos
|
||||||
if iCont > 0 {
|
if iCont > 0 {
|
||||||
|
res := &cfg.Gameatn{
|
||||||
this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{
|
|
||||||
A: atn.A,
|
A: atn.A,
|
||||||
T: atn.T,
|
T: atn.T,
|
||||||
N: iCont,
|
N: iCont,
|
||||||
}}, true)
|
}
|
||||||
|
this.module.DispenseRes(session, []*cfg.Gameatn{res}, true)
|
||||||
}
|
}
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
|
|
||||||
|
@ -189,7 +189,11 @@ func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ml, y := m.(comm.IHero); y {
|
if ml, y := m.(comm.IHero); y {
|
||||||
var hero *pb.DBHero
|
var (
|
||||||
|
hero *pb.DBHero
|
||||||
|
heroId string
|
||||||
|
)
|
||||||
|
|
||||||
for _, v := range ml.GetHeroList(uid) {
|
for _, v := range ml.GetHeroList(uid) {
|
||||||
if cast.ToString(cfg.Data1) == v.HeroID {
|
if cast.ToString(cfg.Data1) == v.HeroID {
|
||||||
hero = v
|
hero = v
|
||||||
@ -199,13 +203,14 @@ func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
|
|
||||||
var count int32
|
var count int32
|
||||||
if hero != nil {
|
if hero != nil {
|
||||||
|
heroId = hero.HeroID
|
||||||
for _, v := range hero.EquipID {
|
for _, v := range hero.EquipID {
|
||||||
if v != "" {
|
if v != "" {
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(hero.HeroID, cast.ToString(cfg.Data1)); !ok {
|
if ok, err = soEqual(heroId, cast.ToString(cfg.Data1)); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return soGreatEqual(count, cfg.Data2)
|
return soGreatEqual(count, cfg.Data2)
|
||||||
|
@ -99,7 +99,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
|
|||||||
}
|
}
|
||||||
|
|
||||||
//初始化用户设置
|
//初始化用户设置
|
||||||
this.module.modelSetting.InitSetting(session.GetUserId())
|
// this.module.modelSetting.InitSetting(session.GetUserId())
|
||||||
|
|
||||||
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil {
|
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
@ -21,11 +22,10 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Vikin
|
|||||||
///挑战完成
|
///挑战完成
|
||||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
var (
|
var (
|
||||||
mapData map[string]interface{}
|
mapData map[string]interface{}
|
||||||
newChallenge bool // 新的关卡
|
reward []*cfg.Gameatn
|
||||||
reward []*cfg.Gameatn
|
asset []*pb.UserAssets
|
||||||
asset []*pb.UserAssets
|
bWin bool // 战斗是否胜利
|
||||||
bWin bool // 战斗是否胜利
|
|
||||||
)
|
)
|
||||||
mapData = make(map[string]interface{}, 0)
|
mapData = make(map[string]interface{}, 0)
|
||||||
reward = make([]*cfg.Gameatn, 0)
|
reward = make([]*cfg.Gameatn, 0)
|
||||||
@ -63,9 +63,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
if !ok { // 类型校验
|
if !ok { // 类型校验
|
||||||
viking.Boss[req.BossId] = 1
|
viking.Boss[req.BossId] = 1
|
||||||
}
|
}
|
||||||
if value == req.Difficulty {
|
if value < req.Difficulty {
|
||||||
newChallenge = true
|
|
||||||
} else if value < req.Difficulty {
|
|
||||||
code = pb.ErrorCode_HuntingLvErr
|
code = pb.ErrorCode_HuntingLvErr
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -90,11 +88,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
mapData["recoveryTime"] = viking.RecoveryTime
|
mapData["recoveryTime"] = viking.RecoveryTime
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if bWin {
|
key := strconv.Itoa(int(req.BossId)) + "_" + strconv.Itoa(int(req.Difficulty))
|
||||||
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, viking, req.Report)
|
if viking.BossTime[key] == 0 { // 新关卡挑战通过 发放首通奖励
|
||||||
}
|
|
||||||
mapData["bossTime"] = viking.BossTime // 更新时间
|
|
||||||
if newChallenge && bWin { // 新关卡挑战通过 发放首通奖励
|
|
||||||
viking.Boss[req.BossId]++
|
viking.Boss[req.BossId]++
|
||||||
mapData["boss"] = viking.Boss
|
mapData["boss"] = viking.Boss
|
||||||
if code = this.module.DispenseRes(session, vikingCfg.Firstprize, true); code != pb.ErrorCode_Success {
|
if code = this.module.DispenseRes(session, vikingCfg.Firstprize, true); code != pb.ErrorCode_Success {
|
||||||
@ -107,7 +102,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
N: v.N,
|
N: v.N,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if bWin {
|
||||||
|
this.module.CheckRank(session.GetUserId(), req.BossId, req.Difficulty, viking, req.Report)
|
||||||
reward = this.module.configure.GetDropReward(vikingCfg.Drop) // 获取掉落奖励
|
reward = this.module.configure.GetDropReward(vikingCfg.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
|
||||||
@ -120,6 +117,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mapData["bossTime"] = viking.BossTime // 更新时间
|
||||||
|
|
||||||
code = this.module.ModifyVikingData(session.GetUserId(), mapData)
|
code = this.module.ModifyVikingData(session.GetUserId(), mapData)
|
||||||
// 发放通关随机奖励
|
// 发放通关随机奖励
|
||||||
session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingChallengeOverResp{
|
session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingChallengeOverResp{
|
||||||
|
@ -54,12 +54,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq
|
|||||||
iCont := conf.VikingNum
|
iCont := conf.VikingNum
|
||||||
atn := conf.VikingExpeditionCos
|
atn := conf.VikingExpeditionCos
|
||||||
if iCont > 0 {
|
if iCont > 0 {
|
||||||
|
res := &cfg.Gameatn{
|
||||||
this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{
|
|
||||||
A: atn.A,
|
A: atn.A,
|
||||||
T: atn.T,
|
T: atn.T,
|
||||||
N: iCont,
|
N: iCont,
|
||||||
}}, true)
|
}
|
||||||
|
this.module.DispenseRes(session, []*cfg.Gameatn{res}, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,9 +178,7 @@ func (this *Viking) CompleteAllLevel(session comm.IUserSession) (code pb.ErrorCo
|
|||||||
}
|
}
|
||||||
mapData["boss"] = list.Boss
|
mapData["boss"] = list.Boss
|
||||||
code = this.ModifyVikingData(session.GetUserId(), mapData)
|
code = this.ModifyVikingData(session.GetUserId(), mapData)
|
||||||
for k := range list.Boss {
|
|
||||||
list.Boss[k] += 1
|
|
||||||
}
|
|
||||||
session.SendMsg(string(this.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list})
|
session.SendMsg(string(this.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
204
pb/auto_db.pb.go
Normal file
204
pb/auto_db.pb.go
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.28.0
|
||||||
|
// protoc v3.20.0
|
||||||
|
// source: auto/auto_db.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 自动战斗
|
||||||
|
type DBAutoBattle struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||||
|
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||||
|
AutoWin bool `protobuf:"varint,3,opt,name=autoWin,proto3" json:"autoWin"` // 失败自动停止
|
||||||
|
MaxExp bool `protobuf:"varint,4,opt,name=maxExp,proto3" json:"maxExp"` //雄达到满级则停止连续战斗
|
||||||
|
AutoBuy bool `protobuf:"varint,5,opt,name=autoBuy,proto3" json:"autoBuy"` // 自动购买
|
||||||
|
AutoSell int32 `protobuf:"varint,6,opt,name=autoSell,proto3" json:"autoSell"` // 自动出售星级装备
|
||||||
|
Ptype PlayType `protobuf:"varint,7,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` // 类型
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) Reset() {
|
||||||
|
*x = DBAutoBattle{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_db_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DBAutoBattle) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_db_proto_msgTypes[0]
|
||||||
|
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 DBAutoBattle.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DBAutoBattle) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_db_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetUid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetAutoWin() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoWin
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetMaxExp() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.MaxExp
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetAutoBuy() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoBuy
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetAutoSell() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoSell
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DBAutoBattle) GetPtype() PlayType {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ptype
|
||||||
|
}
|
||||||
|
return PlayType_null
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_auto_auto_db_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_auto_auto_db_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74,
|
||||||
|
0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a,
|
||||||
|
0x0c, 0x44, 0x42, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 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, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||||
|
0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x57, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
|
||||||
|
0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x57, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78,
|
||||||
|
0x45, 0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x45, 0x78,
|
||||||
|
0x70, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x75, 0x79, 0x18, 0x05, 0x20, 0x01,
|
||||||
|
0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x75, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61,
|
||||||
|
0x75, 0x74, 0x6f, 0x53, 0x65, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61,
|
||||||
|
0x75, 0x74, 0x6f, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65,
|
||||||
|
0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70,
|
||||||
|
0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_auto_auto_db_proto_rawDescOnce sync.Once
|
||||||
|
file_auto_auto_db_proto_rawDescData = file_auto_auto_db_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_auto_auto_db_proto_rawDescGZIP() []byte {
|
||||||
|
file_auto_auto_db_proto_rawDescOnce.Do(func() {
|
||||||
|
file_auto_auto_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_auto_auto_db_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_auto_auto_db_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_auto_auto_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_auto_auto_db_proto_goTypes = []interface{}{
|
||||||
|
(*DBAutoBattle)(nil), // 0: DBAutoBattle
|
||||||
|
(PlayType)(0), // 1: PlayType
|
||||||
|
}
|
||||||
|
var file_auto_auto_db_proto_depIdxs = []int32{
|
||||||
|
1, // 0: DBAutoBattle.ptype:type_name -> PlayType
|
||||||
|
1, // [1:1] is the sub-list for method output_type
|
||||||
|
1, // [1:1] is the sub-list for method input_type
|
||||||
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
|
0, // [0:1] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_auto_auto_db_proto_init() }
|
||||||
|
func file_auto_auto_db_proto_init() {
|
||||||
|
if File_auto_auto_db_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_battle_battle_db_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_auto_auto_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DBAutoBattle); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_auto_auto_db_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_auto_auto_db_proto_goTypes,
|
||||||
|
DependencyIndexes: file_auto_auto_db_proto_depIdxs,
|
||||||
|
MessageInfos: file_auto_auto_db_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_auto_auto_db_proto = out.File
|
||||||
|
file_auto_auto_db_proto_rawDesc = nil
|
||||||
|
file_auto_auto_db_proto_goTypes = nil
|
||||||
|
file_auto_auto_db_proto_depIdxs = nil
|
||||||
|
}
|
502
pb/auto_msg.pb.go
Normal file
502
pb/auto_msg.pb.go
Normal file
@ -0,0 +1,502 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.28.0
|
||||||
|
// protoc v3.20.0
|
||||||
|
// source: auto/auto_msg.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type BattleAutoChallengeReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
BossId int32 `protobuf:"varint,1,opt,name=bossId,proto3" json:"bossId"` // boos 类型
|
||||||
|
Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度
|
||||||
|
Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
|
||||||
|
Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息
|
||||||
|
AutoWin bool `protobuf:"varint,5,opt,name=autoWin,proto3" json:"autoWin"` // 失败自动停止
|
||||||
|
MaxExp bool `protobuf:"varint,6,opt,name=maxExp,proto3" json:"maxExp"` //雄达到满级则停止连续战斗
|
||||||
|
AutoBuy bool `protobuf:"varint,7,opt,name=autoBuy,proto3" json:"autoBuy"` // 自动购买
|
||||||
|
AutoSell int32 `protobuf:"varint,8,opt,name=autoSell,proto3" json:"autoSell"` // 自动出售星级装备
|
||||||
|
Ptype PlayType `protobuf:"varint,9,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` // 类型
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) Reset() {
|
||||||
|
*x = BattleAutoChallengeReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BattleAutoChallengeReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[0]
|
||||||
|
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 BattleAutoChallengeReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BattleAutoChallengeReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_msg_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetBossId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.BossId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetDifficulty() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Difficulty
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetLeadpos() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Leadpos
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetTeamids() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Teamids
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetAutoWin() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoWin
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetMaxExp() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.MaxExp
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetAutoBuy() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoBuy
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetAutoSell() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AutoSell
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeReq) GetPtype() PlayType {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ptype
|
||||||
|
}
|
||||||
|
return PlayType_null
|
||||||
|
}
|
||||||
|
|
||||||
|
type BattleAutoChallengeResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeResp) Reset() {
|
||||||
|
*x = BattleAutoChallengeResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BattleAutoChallengeResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_msg_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 BattleAutoChallengeResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BattleAutoChallengeResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_msg_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoChallengeResp) GetInfo() *BattleInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.Info
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type BattleAutoOverReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` // 类型
|
||||||
|
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverReq) Reset() {
|
||||||
|
*x = BattleAutoOverReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BattleAutoOverReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[2]
|
||||||
|
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 BattleAutoOverReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BattleAutoOverReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_msg_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverReq) GetPtype() PlayType {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ptype
|
||||||
|
}
|
||||||
|
return PlayType_null
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverReq) GetReport() *BattleReport {
|
||||||
|
if x != nil {
|
||||||
|
return x.Report
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客户端通知服务器打赢了
|
||||||
|
type BattleAutoOverResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Asset []*UserAtno `protobuf:"bytes,1,rep,name=asset,proto3" json:"asset"` // GameRe // 推送atn
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverResp) Reset() {
|
||||||
|
*x = BattleAutoOverResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BattleAutoOverResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[3]
|
||||||
|
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 BattleAutoOverResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BattleAutoOverResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_msg_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverResp) GetAsset() []*UserAtno {
|
||||||
|
if x != nil {
|
||||||
|
return x.Asset
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自动战斗结束
|
||||||
|
type BattleAutoOverPush struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverPush) Reset() {
|
||||||
|
*x = BattleAutoOverPush{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverPush) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*BattleAutoOverPush) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverPush) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_auto_auto_msg_proto_msgTypes[4]
|
||||||
|
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 BattleAutoOverPush.ProtoReflect.Descriptor instead.
|
||||||
|
func (*BattleAutoOverPush) Descriptor() ([]byte, []int) {
|
||||||
|
return file_auto_auto_msg_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *BattleAutoOverPush) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_auto_auto_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_auto_auto_msg_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x73, 0x67, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61,
|
||||||
|
0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62,
|
||||||
|
0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74,
|
||||||
|
0x6f, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
|
||||||
|
0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62,
|
||||||
|
0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75,
|
||||||
|
0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69,
|
||||||
|
0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73,
|
||||||
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12,
|
||||||
|
0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
|
||||||
|
0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74,
|
||||||
|
0x6f, 0x57, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75, 0x74, 0x6f,
|
||||||
|
0x57, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x18, 0x06, 0x20,
|
||||||
|
0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x61,
|
||||||
|
0x75, 0x74, 0x6f, 0x42, 0x75, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x75,
|
||||||
|
0x74, 0x6f, 0x42, 0x75, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x65, 0x6c,
|
||||||
|
0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x65, 0x6c,
|
||||||
|
0x6c, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e,
|
||||||
|
0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79,
|
||||||
|
0x70, 0x65, 0x22, 0x3a, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f,
|
||||||
|
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a,
|
||||||
|
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61,
|
||||||
|
0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5b,
|
||||||
|
0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x4f, 0x76, 0x65, 0x72,
|
||||||
|
0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70,
|
||||||
|
0x74, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70,
|
||||||
|
0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x35, 0x0a, 0x12, 0x42,
|
||||||
|
0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||||
|
0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73,
|
||||||
|
0x65, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f,
|
||||||
|
0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
|
||||||
|
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
|
||||||
|
0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_auto_auto_msg_proto_rawDescOnce sync.Once
|
||||||
|
file_auto_auto_msg_proto_rawDescData = file_auto_auto_msg_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_auto_auto_msg_proto_rawDescGZIP() []byte {
|
||||||
|
file_auto_auto_msg_proto_rawDescOnce.Do(func() {
|
||||||
|
file_auto_auto_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_auto_auto_msg_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_auto_auto_msg_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_auto_auto_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
|
var file_auto_auto_msg_proto_goTypes = []interface{}{
|
||||||
|
(*BattleAutoChallengeReq)(nil), // 0: BattleAutoChallengeReq
|
||||||
|
(*BattleAutoChallengeResp)(nil), // 1: BattleAutoChallengeResp
|
||||||
|
(*BattleAutoOverReq)(nil), // 2: BattleAutoOverReq
|
||||||
|
(*BattleAutoOverResp)(nil), // 3: BattleAutoOverResp
|
||||||
|
(*BattleAutoOverPush)(nil), // 4: BattleAutoOverPush
|
||||||
|
(PlayType)(0), // 5: PlayType
|
||||||
|
(*BattleInfo)(nil), // 6: BattleInfo
|
||||||
|
(*BattleReport)(nil), // 7: BattleReport
|
||||||
|
(*UserAtno)(nil), // 8: UserAtno
|
||||||
|
}
|
||||||
|
var file_auto_auto_msg_proto_depIdxs = []int32{
|
||||||
|
5, // 0: BattleAutoChallengeReq.ptype:type_name -> PlayType
|
||||||
|
6, // 1: BattleAutoChallengeResp.info:type_name -> BattleInfo
|
||||||
|
5, // 2: BattleAutoOverReq.ptype:type_name -> PlayType
|
||||||
|
7, // 3: BattleAutoOverReq.report:type_name -> BattleReport
|
||||||
|
8, // 4: BattleAutoOverResp.asset:type_name -> UserAtno
|
||||||
|
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 extension type_name
|
||||||
|
5, // [5:5] is the sub-list for extension extendee
|
||||||
|
0, // [0:5] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_auto_auto_msg_proto_init() }
|
||||||
|
func file_auto_auto_msg_proto_init() {
|
||||||
|
if File_auto_auto_msg_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_battle_battle_db_proto_init()
|
||||||
|
file_battle_battle_msg_proto_init()
|
||||||
|
file_comm_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_auto_auto_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BattleAutoChallengeReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_auto_auto_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BattleAutoChallengeResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_auto_auto_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BattleAutoOverReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_auto_auto_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BattleAutoOverResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_auto_auto_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*BattleAutoOverPush); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_auto_auto_msg_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 5,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_auto_auto_msg_proto_goTypes,
|
||||||
|
DependencyIndexes: file_auto_auto_msg_proto_depIdxs,
|
||||||
|
MessageInfos: file_auto_auto_msg_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_auto_auto_msg_proto = out.File
|
||||||
|
file_auto_auto_msg_proto_rawDesc = nil
|
||||||
|
file_auto_auto_msg_proto_goTypes = nil
|
||||||
|
file_auto_auto_msg_proto_depIdxs = nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user