上传npc接口代码
This commit is contained in:
parent
27af2b87bd
commit
1f1ef635cc
@ -63,6 +63,9 @@ func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewa
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.module.DispenseRes(session, npc.NpcReward, true)
|
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
|
return
|
||||||
}
|
}
|
||||||
|
@ -1234,7 +1234,8 @@ type ArenaPlotRewardResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
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() {
|
func (x *ArenaPlotRewardResp) Reset() {
|
||||||
@ -1276,6 +1277,13 @@ func (x *ArenaPlotRewardResp) GetIssucc() bool {
|
|||||||
return false
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_arena_arena_msg_proto_rawDesc = []byte{
|
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,
|
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,
|
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,
|
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,
|
0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x9e,
|
||||||
0x0a, 0x13, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
|
0x01, 0x0a, 0x13, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61,
|
||||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18,
|
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12, 0x2f,
|
||||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
@ -1396,7 +1411,7 @@ func file_arena_arena_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_arena_arena_msg_proto_rawDescData
|
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{}{
|
var file_arena_arena_msg_proto_goTypes = []interface{}{
|
||||||
(*ArenaInfoReq)(nil), // 0: ArenaInfoReq
|
(*ArenaInfoReq)(nil), // 0: ArenaInfoReq
|
||||||
(*ArenaInfoResp)(nil), // 1: ArenaInfoResp
|
(*ArenaInfoResp)(nil), // 1: ArenaInfoResp
|
||||||
@ -1422,31 +1437,35 @@ var file_arena_arena_msg_proto_goTypes = []interface{}{
|
|||||||
(*ArenaPlotResp)(nil), // 21: ArenaPlotResp
|
(*ArenaPlotResp)(nil), // 21: ArenaPlotResp
|
||||||
(*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq
|
(*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq
|
||||||
(*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp
|
(*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp
|
||||||
(*DBArenaUser)(nil), // 24: DBArenaUser
|
nil, // 24: ArenaPlotRewardResp.NpcEntry
|
||||||
(*ArenaPlayer)(nil), // 25: ArenaPlayer
|
(*DBArenaUser)(nil), // 25: DBArenaUser
|
||||||
(*BattleFormation)(nil), // 26: BattleFormation
|
(*ArenaPlayer)(nil), // 26: ArenaPlayer
|
||||||
(ErrorCode)(0), // 27: ErrorCode
|
(*BattleFormation)(nil), // 27: BattleFormation
|
||||||
(*BattleInfo)(nil), // 28: BattleInfo
|
(ErrorCode)(0), // 28: ErrorCode
|
||||||
(*BattleReport)(nil), // 29: BattleReport
|
(*BattleInfo)(nil), // 29: BattleInfo
|
||||||
|
(*BattleReport)(nil), // 30: BattleReport
|
||||||
|
(*DBNpc)(nil), // 31: DBNpc
|
||||||
}
|
}
|
||||||
var file_arena_arena_msg_proto_depIdxs = []int32{
|
var file_arena_arena_msg_proto_depIdxs = []int32{
|
||||||
24, // 0: ArenaInfoResp.info:type_name -> DBArenaUser
|
25, // 0: ArenaInfoResp.info:type_name -> DBArenaUser
|
||||||
24, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser
|
25, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser
|
||||||
25, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer
|
26, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer
|
||||||
26, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation
|
27, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation
|
||||||
27, // 4: ArenaChallengeResp.code:type_name -> ErrorCode
|
28, // 4: ArenaChallengeResp.code:type_name -> ErrorCode
|
||||||
28, // 5: ArenaChallengeResp.info:type_name -> BattleInfo
|
29, // 5: ArenaChallengeResp.info:type_name -> BattleInfo
|
||||||
29, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport
|
30, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport
|
||||||
25, // 7: ArenaRankResp.players:type_name -> ArenaPlayer
|
26, // 7: ArenaRankResp.players:type_name -> ArenaPlayer
|
||||||
26, // 8: ArenaPlotReq.battle:type_name -> BattleFormation
|
27, // 8: ArenaPlotReq.battle:type_name -> BattleFormation
|
||||||
27, // 9: ArenaPlotResp.code:type_name -> ErrorCode
|
28, // 9: ArenaPlotResp.code:type_name -> ErrorCode
|
||||||
28, // 10: ArenaPlotResp.info:type_name -> BattleInfo
|
29, // 10: ArenaPlotResp.info:type_name -> BattleInfo
|
||||||
29, // 11: ArenaPlotRewardReq.report:type_name -> BattleReport
|
30, // 11: ArenaPlotRewardReq.report:type_name -> BattleReport
|
||||||
12, // [12:12] is the sub-list for method output_type
|
24, // 12: ArenaPlotRewardResp.npc:type_name -> ArenaPlotRewardResp.NpcEntry
|
||||||
12, // [12:12] is the sub-list for method input_type
|
31, // 13: ArenaPlotRewardResp.NpcEntry.value:type_name -> DBNpc
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
14, // [14:14] is the sub-list for method output_type
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
14, // [14:14] is the sub-list for method input_type
|
||||||
0, // [0:12] is the sub-list for field type_name
|
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() }
|
func init() { file_arena_arena_msg_proto_init() }
|
||||||
@ -1753,7 +1772,7 @@ func file_arena_arena_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_arena_arena_msg_proto_rawDesc,
|
RawDescriptor: file_arena_arena_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 24,
|
NumMessages: 25,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user