diff --git a/modules/arena/api_plotreward.go b/modules/arena/api_plotreward.go index 5e98f2a65..d44d752f9 100644 --- a/modules/arena/api_plotreward.go +++ b/modules/arena/api_plotreward.go @@ -63,6 +63,9 @@ func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewa } this.module.DispenseRes(session, npc.NpcReward, true) - session.SendMsg(string(this.module.GetType()), "plotreward", &pb.ArenaPlotRewardResp{Issucc: true}) + session.SendMsg(string(this.module.GetType()), "plotreward", &pb.ArenaPlotRewardResp{ + Issucc: true, + Npc: info.Npc, + }) return } diff --git a/pb/arena_msg.pb.go b/pb/arena_msg.pb.go index fba52df55..b19f806ce 100644 --- a/pb/arena_msg.pb.go +++ b/pb/arena_msg.pb.go @@ -1234,7 +1234,8 @@ type ArenaPlotRewardResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` + Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` + Npc map[int32]*DBNpc `protobuf:"bytes,2,rep,name=npc,proto3" json:"npc" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // npc Cd } func (x *ArenaPlotRewardResp) Reset() { @@ -1276,6 +1277,13 @@ func (x *ArenaPlotRewardResp) GetIssucc() bool { return false } +func (x *ArenaPlotRewardResp) GetNpc() map[int32]*DBNpc { + if x != nil { + return x.Npc + } + return nil +} + var File_arena_arena_msg_proto protoreflect.FileDescriptor var file_arena_arena_msg_proto_rawDesc = []byte{ @@ -1377,11 +1385,18 @@ var file_arena_arena_msg_proto_rawDesc = []byte{ 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 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, 0x2d, - 0x0a, 0x13, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9e, + 0x01, 0x0a, 0x13, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12, 0x2f, + 0x0a, 0x03, 0x6e, 0x70, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x41, 0x72, + 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x2e, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x70, 0x63, 0x1a, + 0x3e, 0x0a, 0x08, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x44, + 0x42, 0x4e, 0x70, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1396,7 +1411,7 @@ func file_arena_arena_msg_proto_rawDescGZIP() []byte { return file_arena_arena_msg_proto_rawDescData } -var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaInfoReq)(nil), // 0: ArenaInfoReq (*ArenaInfoResp)(nil), // 1: ArenaInfoResp @@ -1422,31 +1437,35 @@ var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaPlotResp)(nil), // 21: ArenaPlotResp (*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq (*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp - (*DBArenaUser)(nil), // 24: DBArenaUser - (*ArenaPlayer)(nil), // 25: ArenaPlayer - (*BattleFormation)(nil), // 26: BattleFormation - (ErrorCode)(0), // 27: ErrorCode - (*BattleInfo)(nil), // 28: BattleInfo - (*BattleReport)(nil), // 29: BattleReport + nil, // 24: ArenaPlotRewardResp.NpcEntry + (*DBArenaUser)(nil), // 25: DBArenaUser + (*ArenaPlayer)(nil), // 26: ArenaPlayer + (*BattleFormation)(nil), // 27: BattleFormation + (ErrorCode)(0), // 28: ErrorCode + (*BattleInfo)(nil), // 29: BattleInfo + (*BattleReport)(nil), // 30: BattleReport + (*DBNpc)(nil), // 31: DBNpc } var file_arena_arena_msg_proto_depIdxs = []int32{ - 24, // 0: ArenaInfoResp.info:type_name -> DBArenaUser - 24, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser - 25, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer - 26, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation - 27, // 4: ArenaChallengeResp.code:type_name -> ErrorCode - 28, // 5: ArenaChallengeResp.info:type_name -> BattleInfo - 29, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport - 25, // 7: ArenaRankResp.players:type_name -> ArenaPlayer - 26, // 8: ArenaPlotReq.battle:type_name -> BattleFormation - 27, // 9: ArenaPlotResp.code:type_name -> ErrorCode - 28, // 10: ArenaPlotResp.info:type_name -> BattleInfo - 29, // 11: ArenaPlotRewardReq.report:type_name -> BattleReport - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 25, // 0: ArenaInfoResp.info:type_name -> DBArenaUser + 25, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser + 26, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer + 27, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation + 28, // 4: ArenaChallengeResp.code:type_name -> ErrorCode + 29, // 5: ArenaChallengeResp.info:type_name -> BattleInfo + 30, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport + 26, // 7: ArenaRankResp.players:type_name -> ArenaPlayer + 27, // 8: ArenaPlotReq.battle:type_name -> BattleFormation + 28, // 9: ArenaPlotResp.code:type_name -> ErrorCode + 29, // 10: ArenaPlotResp.info:type_name -> BattleInfo + 30, // 11: ArenaPlotRewardReq.report:type_name -> BattleReport + 24, // 12: ArenaPlotRewardResp.npc:type_name -> ArenaPlotRewardResp.NpcEntry + 31, // 13: ArenaPlotRewardResp.NpcEntry.value:type_name -> DBNpc + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_arena_arena_msg_proto_init() } @@ -1753,7 +1772,7 @@ func file_arena_arena_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_arena_arena_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 0, },