上传旧时光代码
This commit is contained in:
parent
8bc2b5ed00
commit
c361042acf
@ -494,7 +494,7 @@ type (
|
|||||||
// 关卡编辑器
|
// 关卡编辑器
|
||||||
ICombat interface {
|
ICombat interface {
|
||||||
// 获取关卡状态
|
// 获取关卡状态
|
||||||
GetLevelStatus(uid string, levelId int32) bool
|
GetLevels(uid string) (levels map[int32]*pb.DBCombatLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
ICaravan interface {
|
ICaravan interface {
|
||||||
|
@ -25,6 +25,14 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
|
|||||||
ok bool
|
ok bool
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
defer func() {
|
||||||
|
if code == pb.ErrorCode_Success {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Code: code, Level: req.Level, Manster: req.Manster, Atns: atns, Progress: lv.Progress})
|
||||||
|
} else {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Code: code, Level: req.Level, Manster: req.Manster})
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
if code = this.ChallengeReceiveCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.ChallengeReceiveCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -76,9 +84,7 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true, Level: req.Level, Manster: req.Manster, Atns: atns, Progress: lv.Progress})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,13 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod
|
|||||||
ok bool
|
ok bool
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
defer func() {
|
||||||
|
if code == pb.ErrorCode_Success {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns, Progress: lv.Progress})
|
||||||
|
} else {
|
||||||
|
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code})
|
||||||
|
}
|
||||||
|
}()
|
||||||
if code = this.DropCheck(session, req); code != pb.ErrorCode_Success {
|
if code = this.DropCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -74,6 +81,6 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns, Progress: lv.Progress})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -64,16 +64,12 @@ func (this *Combat) EventUserOffline(uid, sessionid string) {
|
|||||||
this.modelCombat.delInfo(uid)
|
this.modelCombat.delInfo(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Combat) GetLevelStatus(uid string, levelId int32) bool {
|
func (this *Combat) GetLevelStatus(uid string) (levels map[int32]*pb.DBCombatLevel) {
|
||||||
combat := &pb.DBCombatUser{}
|
combat := &pb.DBCombatUser{}
|
||||||
|
levels = make(map[int32]*pb.DBCombatLevel)
|
||||||
if err := this.modelCombat.Get(uid, combat); err != nil {
|
if err := this.modelCombat.Get(uid, combat); err != nil {
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
|
levels = combat.Level
|
||||||
if combat != nil {
|
return
|
||||||
if v, ok := combat.Level[levelId]; ok {
|
|
||||||
return v.Pass == 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,6 @@ func (this *Mline) Start() (err error) {
|
|||||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.battle = module.(comm.IBattle)
|
this.battle = module.(comm.IBattle)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,9 @@ func (this *apiComp) Getall(session comm.IUserSession, req *pb.OldtimesGetallReq
|
|||||||
// 解锁的关卡
|
// 解锁的关卡
|
||||||
var unlockLevelIds []int32
|
var unlockLevelIds []int32
|
||||||
// 更新关卡状态
|
// 更新关卡状态
|
||||||
if imodule, err := this.service.GetModule(comm.ModuleCombat); err == nil {
|
levels := this.module.combat.GetLevels(uid)
|
||||||
if combat, ok := imodule.(comm.ICombat); ok {
|
|
||||||
for _, chapter := range d.Chapters {
|
for _, chapter := range d.Chapters {
|
||||||
if chapter.Status == int32(finish) {
|
if chapter.Status == int32(lock) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, level := range chapter.Levels {
|
for _, level := range chapter.Levels {
|
||||||
@ -32,15 +31,24 @@ func (this *apiComp) Getall(session comm.IUserSession, req *pb.OldtimesGetallReq
|
|||||||
}
|
}
|
||||||
conf := this.module.configure.getMaintaskCfgBy(level.Lid)
|
conf := this.module.configure.getMaintaskCfgBy(level.Lid)
|
||||||
if conf != nil {
|
if conf != nil {
|
||||||
if combat.GetLevelStatus(uid, conf.Stageid) {
|
if v, ok := levels[conf.Stageid]; ok {
|
||||||
|
if v.Pass == 1 || v.Pass == 2 {
|
||||||
level.Status = int32(finish)
|
level.Status = int32(finish)
|
||||||
|
level.Progress = v.Progress
|
||||||
if err := this.module.modelOldtimes.updateOldtimes(uid, d); err != nil {
|
if err := this.module.modelOldtimes.updateOldtimes(uid, d); err != nil {
|
||||||
this.module.Error("oldtime更新失败",
|
this.module.Error("oldtime更新失败",
|
||||||
log.Field{Key: "uid", Value: uid})
|
log.Field{Key: "uid", Value: uid})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
unlockLevelIds = append(unlockLevelIds, level.Lid)
|
unlockLevelIds = append(unlockLevelIds, level.Lid)
|
||||||
|
} else if v.Pass == 0 {
|
||||||
|
level.Progress = v.Progress
|
||||||
|
if err := this.module.modelOldtimes.updateOldtimes(uid, d); err != nil {
|
||||||
|
this.module.Error("oldtime更新失败",
|
||||||
|
log.Field{Key: "uid", Value: uid})
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
unlockLevelIds = append(unlockLevelIds, level.Lid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Oldtimes struct {
|
type Oldtimes struct {
|
||||||
modules.ModuleBase
|
modules.ModuleBase
|
||||||
|
combat comm.ICombat
|
||||||
api *apiComp
|
api *apiComp
|
||||||
service base.IRPCXService
|
service base.IRPCXService
|
||||||
configure *configureComp
|
configure *configureComp
|
||||||
@ -39,5 +39,10 @@ func (this *Oldtimes) GetType() core.M_Modules {
|
|||||||
|
|
||||||
func (this *Oldtimes) Start() (err error) {
|
func (this *Oldtimes) Start() (err error) {
|
||||||
err = this.ModuleBase.Start()
|
err = this.ModuleBase.Start()
|
||||||
|
var module core.IModule
|
||||||
|
if module, err = this.service.GetModule(comm.ModuleCombat); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.combat = module.(comm.ICombat)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ type CombatChallengeReceiveResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"`
|
Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrorCode" json:"code"` //是否成功
|
||||||
Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level"` //管卡id
|
Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level"` //管卡id
|
||||||
Manster int32 `protobuf:"varint,3,opt,name=manster,proto3" json:"manster"`
|
Manster int32 `protobuf:"varint,3,opt,name=manster,proto3" json:"manster"`
|
||||||
Atns []*UserAssets `protobuf:"bytes,4,rep,name=atns,proto3" json:"atns"` //获取物品
|
Atns []*UserAssets `protobuf:"bytes,4,rep,name=atns,proto3" json:"atns"` //获取物品
|
||||||
@ -471,11 +471,11 @@ func (*CombatChallengeReceiveResp) Descriptor() ([]byte, []int) {
|
|||||||
return file_combat_combat_msg_proto_rawDescGZIP(), []int{7}
|
return file_combat_combat_msg_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CombatChallengeReceiveResp) GetIssucc() bool {
|
func (x *CombatChallengeReceiveResp) GetCode() ErrorCode {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Issucc
|
return x.Code
|
||||||
}
|
}
|
||||||
return false
|
return ErrorCode_Success
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CombatChallengeReceiveResp) GetLevel() int32 {
|
func (x *CombatChallengeReceiveResp) GetLevel() int32 {
|
||||||
@ -821,47 +821,47 @@ var file_combat_combat_msg_proto_rawDesc = []byte{
|
|||||||
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74,
|
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74,
|
||||||
0x65, 0x72, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
|
0x65, 0x72, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72,
|
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, 0xa1, 0x01, 0x0a, 0x1a, 0x43, 0x6f,
|
0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x1a, 0x43, 0x6f,
|
||||||
0x6d, 0x62, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63,
|
0x6d, 0x62, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63,
|
||||||
0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75,
|
0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||||
0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65,
|
||||||
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65,
|
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18,
|
||||||
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72,
|
0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x12, 0x1f, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
|
0x07, 0x6d, 0x61, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x73,
|
||||||
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x04, 0x61, 0x74, 0x6e,
|
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73,
|
||||||
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20,
|
0x65, 0x74, 0x73, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x39, 0x0a,
|
0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f,
|
||||||
0x0d, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x14,
|
0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x39, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44,
|
||||||
0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c,
|
0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
|
||||||
0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x72, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x28, 0x05, 0x52, 0x04, 0x64, 0x72, 0x6f, 0x70, 0x22, 0x83, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
|
0x64, 0x72, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x72, 0x6f, 0x70,
|
||||||
0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63,
|
0x22, 0x83, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x44, 0x72, 0x6f, 0x70, 0x52,
|
||||||
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f,
|
0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x61,
|
0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63,
|
||||||
0x74, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||||
0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05,
|
0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x04,
|
||||||
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76,
|
0x61, 0x74, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20,
|
||||||
0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04,
|
0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72,
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x28,
|
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72,
|
||||||
0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x41, 0x73, 0x6b, 0x50, 0x61, 0x73, 0x73, 0x52,
|
0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x28, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74,
|
||||||
0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x41, 0x73, 0x6b, 0x50, 0x61, 0x73, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65,
|
||||||
0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xd7, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6d,
|
0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,
|
||||||
0x62, 0x61, 0x74, 0x41, 0x73, 0x6b, 0x50, 0x61, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14,
|
0x22, 0xd7, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x41, 0x73, 0x6b, 0x50, 0x61,
|
||||||
0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c,
|
0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
|
||||||
0x65, 0x76, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x6d, 0x61, 0x69, 0x6e,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c,
|
||||||
0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x61, 0x73, 0x73,
|
0x70, 0x61, 0x73, 0x73, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x03,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73,
|
0x28, 0x05, 0x52, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x73, 0x6b,
|
||||||
0x70, 0x65, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70,
|
0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x18,
|
||||||
0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
|
0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x74, 0x61,
|
||||||
0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x29,
|
0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28,
|
0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x61, 0x77,
|
||||||
0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x09,
|
0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, 0x27, 0x0a, 0x08, 0x70, 0x65, 0x72,
|
0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x09, 0x6d, 0x61, 0x69, 0x6e, 0x61, 0x77, 0x61, 0x72,
|
||||||
0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
|
0x64, 0x12, 0x27, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20,
|
||||||
0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x08, 0x70, 0x65, 0x72, 0x61, 0x77, 0x61,
|
0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73,
|
||||||
0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x52, 0x08, 0x70, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||||
0x6f, 0x33,
|
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -905,16 +905,17 @@ var file_combat_combat_msg_proto_depIdxs = []int32{
|
|||||||
15, // 3: CombatChallengeResp.code:type_name -> ErrorCode
|
15, // 3: CombatChallengeResp.code:type_name -> ErrorCode
|
||||||
16, // 4: CombatChallengeResp.info:type_name -> BattleInfo
|
16, // 4: CombatChallengeResp.info:type_name -> BattleInfo
|
||||||
17, // 5: CombatChallengeReceiveReq.report:type_name -> BattleReport
|
17, // 5: CombatChallengeReceiveReq.report:type_name -> BattleReport
|
||||||
18, // 6: CombatChallengeReceiveResp.atns:type_name -> UserAssets
|
15, // 6: CombatChallengeReceiveResp.code:type_name -> ErrorCode
|
||||||
15, // 7: CombatDropResp.code:type_name -> ErrorCode
|
18, // 7: CombatChallengeReceiveResp.atns:type_name -> UserAssets
|
||||||
18, // 8: CombatDropResp.atns:type_name -> UserAssets
|
15, // 8: CombatDropResp.code:type_name -> ErrorCode
|
||||||
18, // 9: CombatAskPassResp.mainaward:type_name -> UserAssets
|
18, // 9: CombatDropResp.atns:type_name -> UserAssets
|
||||||
18, // 10: CombatAskPassResp.peraward:type_name -> UserAssets
|
18, // 10: CombatAskPassResp.mainaward:type_name -> UserAssets
|
||||||
11, // [11:11] is the sub-list for method output_type
|
18, // 11: CombatAskPassResp.peraward:type_name -> UserAssets
|
||||||
11, // [11:11] is the sub-list for method input_type
|
12, // [12:12] is the sub-list for method output_type
|
||||||
11, // [11:11] is the sub-list for extension type_name
|
12, // [12:12] is the sub-list for method input_type
|
||||||
11, // [11:11] is the sub-list for extension extendee
|
12, // [12:12] is the sub-list for extension type_name
|
||||||
0, // [0:11] is the sub-list for field type_name
|
12, // [12:12] is the sub-list for extension extendee
|
||||||
|
0, // [0:12] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_combat_combat_msg_proto_init() }
|
func init() { file_combat_combat_msg_proto_init() }
|
||||||
|
@ -153,6 +153,7 @@ type Level struct {
|
|||||||
|
|
||||||
Lid int32 `protobuf:"varint,1,opt,name=lid,proto3" json:"lid" bson:"lid"` //关卡ID
|
Lid int32 `protobuf:"varint,1,opt,name=lid,proto3" json:"lid" bson:"lid"` //关卡ID
|
||||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status" bson:"status"` //状态 0锁定 1已解锁 2进行中 3已完成
|
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status" bson:"status"` //状态 0锁定 1已解锁 2进行中 3已完成
|
||||||
|
Progress int32 `protobuf:"varint,3,opt,name=progress,proto3" json:"progress" bson:"progress"` //进度值 物品数量
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Level) Reset() {
|
func (x *Level) Reset() {
|
||||||
@ -201,6 +202,13 @@ func (x *Level) GetStatus() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Level) GetProgress() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Progress
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_oldtimes_oldtimes_db_proto protoreflect.FileDescriptor
|
var File_oldtimes_oldtimes_db_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_oldtimes_oldtimes_db_proto_rawDesc = []byte{
|
var file_oldtimes_oldtimes_db_proto_rawDesc = []byte{
|
||||||
@ -217,11 +225,13 @@ var file_oldtimes_oldtimes_db_proto_rawDesc = []byte{
|
|||||||
0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69,
|
0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69,
|
||||||
0x76, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20,
|
0x76, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x65, 0x76,
|
0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x65, 0x76,
|
||||||
0x65, 0x6c, 0x73, 0x22, 0x31, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03,
|
0x65, 0x6c, 0x73, 0x22, 0x4d, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x69, 0x64, 0x12, 0x16,
|
0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x69, 0x64, 0x12, 0x16,
|
||||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
|
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||||
|
0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user