diff --git a/modules/pagoda/api_challenge.go b/modules/pagoda/api_challenge.go index b28fb6be5..df5f34bc8 100644 --- a/modules/pagoda/api_challenge.go +++ b/modules/pagoda/api_challenge.go @@ -57,12 +57,9 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng } } code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ - Ptype: pb.PlayType_pagoda, - Title: "", - Format: &pb.BattleFormation{ - Leadpos: req.Leadpos, - Format: req.Teamids, - }, + Ptype: pb.PlayType_pagoda, + Title: "", + Format: req.Battle, Mformat: conf.MonsterId, }) if code != pb.ErrorCode_Success { diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 29ed751dc..6ab7c20bc 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -72,7 +72,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal // 加经验 if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { for _, v := range req.Report.Info.Redflist[0].Team { - if conf.Exp > 0 { + if conf.Exp > 0 && !v.Ishelp { // 助战英雄不加经验 this.module.ModuleHero.AddHeroExp(session, v.Oid, conf.Exp) } } diff --git a/pb/pagoda_msg.pb.go b/pb/pagoda_msg.pb.go index 5c245a1b2..4d494c541 100644 --- a/pb/pagoda_msg.pb.go +++ b/pb/pagoda_msg.pb.go @@ -207,10 +207,9 @@ type PagodaChallengeReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LevelID int32 `protobuf:"varint,1,opt,name=levelID,proto3" json:"levelID"` // 挑战层数 - PagodaType int32 `protobuf:"varint,2,opt,name=PagodaType,proto3" json:"PagodaType"` // 塔类型 - Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置 - Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息 + LevelID int32 `protobuf:"varint,1,opt,name=levelID,proto3" json:"levelID"` // 挑战层数 + PagodaType int32 `protobuf:"varint,2,opt,name=PagodaType,proto3" json:"PagodaType"` // 塔类型 + Battle *BattleFormation `protobuf:"bytes,3,opt,name=battle,proto3" json:"battle"` } func (x *PagodaChallengeReq) Reset() { @@ -259,16 +258,9 @@ func (x *PagodaChallengeReq) GetPagodaType() int32 { return 0 } -func (x *PagodaChallengeReq) GetLeadpos() int32 { +func (x *PagodaChallengeReq) GetBattle() *BattleFormation { if x != nil { - return x.Leadpos - } - return 0 -} - -func (x *PagodaChallengeReq) GetTeamids() []string { - if x != nil { - return x.Teamids + return x.Battle } return nil } @@ -653,49 +645,48 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x34, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, - 0x01, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, - 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 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, 0x22, 0x70, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 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, 0x12, 0x18, 0x0a, 0x07, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, 0x16, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, - 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, - 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, - 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 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, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x22, 0x38, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, - 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, - 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x45, 0x0a, 0x11, 0x50, 0x61, - 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, - 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x22, 0x3b, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, - 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x16, - 0x0a, 0x14, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x15, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x78, + 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, + 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, + 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x70, 0x0a, 0x13, 0x50, 0x61, 0x67, 0x6f, + 0x64, 0x61, 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, + 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, + 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, 0x16, 0x50, 0x61, + 0x67, 0x6f, 0x64, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x44, 0x12, 0x1e, + 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 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, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x38, 0x0a, 0x17, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, + 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x45, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, + 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, + 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, + 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72, 0x61, + 0x6e, 0x6b, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x15, 0x50, + 0x61, 0x67, 0x6f, 0x64, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -725,23 +716,25 @@ var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{ (*PagodaQueryRecordReq)(nil), // 10: PagodaQueryRecordReq (*PagodaQueryRecordResp)(nil), // 11: PagodaQueryRecordResp (*DBPagoda)(nil), // 12: DBPagoda - (*BattleInfo)(nil), // 13: BattleInfo - (*BattleReport)(nil), // 14: BattleReport - (*DBPagodaRecord)(nil), // 15: DBPagodaRecord + (*BattleFormation)(nil), // 13: BattleFormation + (*BattleInfo)(nil), // 14: BattleInfo + (*BattleReport)(nil), // 15: BattleReport + (*DBPagodaRecord)(nil), // 16: DBPagodaRecord } var file_pagoda_pagoda_msg_proto_depIdxs = []int32{ 12, // 0: PagodaGetListResp.data:type_name -> DBPagoda 12, // 1: PagodaGetRewardResp.data:type_name -> DBPagoda - 13, // 2: PagodaChallengeResp.info:type_name -> BattleInfo - 14, // 3: PagodaChallengeOverReq.report:type_name -> BattleReport - 12, // 4: PagodaChallengeOverResp.data:type_name -> DBPagoda - 15, // 5: PagodaRankListResp.ranks:type_name -> DBPagodaRecord - 15, // 6: PagodaQueryRecordResp.data:type_name -> DBPagodaRecord - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 13, // 2: PagodaChallengeReq.battle:type_name -> BattleFormation + 14, // 3: PagodaChallengeResp.info:type_name -> BattleInfo + 15, // 4: PagodaChallengeOverReq.report:type_name -> BattleReport + 12, // 5: PagodaChallengeOverResp.data:type_name -> DBPagoda + 16, // 6: PagodaRankListResp.ranks:type_name -> DBPagodaRecord + 16, // 7: PagodaQueryRecordResp.data:type_name -> DBPagodaRecord + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_pagoda_pagoda_msg_proto_init() }