英雄经验类型调整
This commit is contained in:
parent
98877c7ffe
commit
b773c55d60
@ -27,14 +27,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
bWin bool // 战斗是否胜利
|
||||
atno []*pb.UserAtno // atno 类型
|
||||
del []string // 自动出售的装备
|
||||
changExp map[string]int32
|
||||
res []*cfg.Gameatn // 最后获得的资源
|
||||
bHelp bool
|
||||
oldDifficulty int32 // 记录通关之前的难度
|
||||
consumPs int32
|
||||
userExp int32
|
||||
)
|
||||
changExp = make(map[string]int32, 0)
|
||||
mapData = make(map[string]interface{}, 0)
|
||||
reward = make([]*cfg.Gameatn, 0)
|
||||
if errdata = this.ChallengeOverCheck(session, req); errdata != nil {
|
||||
@ -163,7 +161,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
||||
Data: viking,
|
||||
Asset: atno,
|
||||
Sell: del,
|
||||
Heroexp: changExp,
|
||||
Heroexp: vikingCfg.Heroexp,
|
||||
UserExp: userExp,
|
||||
})
|
||||
if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil {
|
||||
|
@ -325,11 +325,11 @@ type VikingChallengeOverResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno
|
||||
Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备
|
||||
Heroexp map[string]int32 `protobuf:"bytes,4,rep,name=heroexp,proto3" json:"heroexp" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 英雄获得经验
|
||||
UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"`
|
||||
Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
Asset []*UserAtno `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // 推送atno
|
||||
Sell []string `protobuf:"bytes,3,rep,name=sell,proto3" json:"sell"` // 自动出售的装备
|
||||
Heroexp int32 `protobuf:"varint,4,opt,name=heroexp,proto3" json:"heroexp"` // 英雄获得经验
|
||||
UserExp int32 `protobuf:"varint,5,opt,name=userExp,proto3" json:"userExp"`
|
||||
}
|
||||
|
||||
func (x *VikingChallengeOverResp) Reset() {
|
||||
@ -385,11 +385,11 @@ func (x *VikingChallengeOverResp) GetSell() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *VikingChallengeOverResp) GetHeroexp() map[string]int32 {
|
||||
func (x *VikingChallengeOverResp) GetHeroexp() int32 {
|
||||
if x != nil {
|
||||
return x.Heroexp
|
||||
}
|
||||
return nil
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *VikingChallengeOverResp) GetUserExp() int32 {
|
||||
@ -636,38 +636,32 @@ var file_viking_viking_msg_proto_rawDesc = []byte{
|
||||
0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73,
|
||||
0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x61,
|
||||
0x75, 0x74, 0x6f, 0x22, 0x84, 0x02, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68,
|
||||
0x75, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 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, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f,
|
||||
0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e,
|
||||
0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x73, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x73,
|
||||
0x65, 0x6c, 0x6c, 0x12, 0x3f, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61,
|
||||
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48,
|
||||
0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x72,
|
||||
0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x1a, 0x3a,
|
||||
0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69,
|
||||
0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0x47, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70,
|
||||
0x65, 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, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72,
|
||||
0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a,
|
||||
0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44,
|
||||
0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a,
|
||||
0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 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, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05,
|
||||
0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42,
|
||||
0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b,
|
||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -682,7 +676,7 @@ func file_viking_viking_msg_proto_rawDescGZIP() []byte {
|
||||
return file_viking_viking_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_viking_viking_msg_proto_goTypes = []interface{}{
|
||||
(*VikingGetListReq)(nil), // 0: VikingGetListReq
|
||||
(*VikingGetListResp)(nil), // 1: VikingGetListResp
|
||||
@ -694,29 +688,27 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{
|
||||
(*VikingBuyResp)(nil), // 7: VikingBuyResp
|
||||
(*VikingRankListReq)(nil), // 8: VikingRankListReq
|
||||
(*VikingRankListResp)(nil), // 9: VikingRankListResp
|
||||
nil, // 10: VikingChallengeOverResp.HeroexpEntry
|
||||
(*DBViking)(nil), // 11: DBViking
|
||||
(*BattleFormation)(nil), // 12: BattleFormation
|
||||
(*BattleInfo)(nil), // 13: BattleInfo
|
||||
(*BattleReport)(nil), // 14: BattleReport
|
||||
(*UserAtno)(nil), // 15: UserAtno
|
||||
(*DBVikingRank)(nil), // 16: DBVikingRank
|
||||
(*DBViking)(nil), // 10: DBViking
|
||||
(*BattleFormation)(nil), // 11: BattleFormation
|
||||
(*BattleInfo)(nil), // 12: BattleInfo
|
||||
(*BattleReport)(nil), // 13: BattleReport
|
||||
(*UserAtno)(nil), // 14: UserAtno
|
||||
(*DBVikingRank)(nil), // 15: DBVikingRank
|
||||
}
|
||||
var file_viking_viking_msg_proto_depIdxs = []int32{
|
||||
11, // 0: VikingGetListResp.data:type_name -> DBViking
|
||||
12, // 1: VikingChallengeReq.battle:type_name -> BattleFormation
|
||||
13, // 2: VikingChallengeResp.info:type_name -> BattleInfo
|
||||
14, // 3: VikingChallengeOverReq.report:type_name -> BattleReport
|
||||
11, // 4: VikingChallengeOverResp.data:type_name -> DBViking
|
||||
15, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno
|
||||
10, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry
|
||||
11, // 7: VikingBuyResp.data:type_name -> DBViking
|
||||
16, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank
|
||||
9, // [9:9] is the sub-list for method output_type
|
||||
9, // [9:9] is the sub-list for method input_type
|
||||
9, // [9:9] is the sub-list for extension type_name
|
||||
9, // [9:9] is the sub-list for extension extendee
|
||||
0, // [0:9] is the sub-list for field type_name
|
||||
10, // 0: VikingGetListResp.data:type_name -> DBViking
|
||||
11, // 1: VikingChallengeReq.battle:type_name -> BattleFormation
|
||||
12, // 2: VikingChallengeResp.info:type_name -> BattleInfo
|
||||
13, // 3: VikingChallengeOverReq.report:type_name -> BattleReport
|
||||
10, // 4: VikingChallengeOverResp.data:type_name -> DBViking
|
||||
14, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno
|
||||
10, // 6: VikingBuyResp.data:type_name -> DBViking
|
||||
15, // 7: VikingRankListResp.ranks:type_name -> DBVikingRank
|
||||
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_viking_viking_msg_proto_init() }
|
||||
@ -855,7 +847,7 @@ func file_viking_viking_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_viking_viking_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user