上传主线组奖励领取
This commit is contained in:
parent
f65cf5dcd6
commit
5ddbc8f880
@ -1,332 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: maincity/maincity_msg.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//同步 无回应
|
||||
type MainCitySynchPosPeek struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Pos *DBMainCityPos `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos"`
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPeek) Reset() {
|
||||
*x = MainCitySynchPosPeek{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPeek) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainCitySynchPosPeek) ProtoMessage() {}
|
||||
|
||||
func (x *MainCitySynchPosPeek) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MainCitySynchPosPeek.ProtoReflect.Descriptor instead.
|
||||
func (*MainCitySynchPosPeek) Descriptor() ([]byte, []int) {
|
||||
return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPeek) GetPos() *DBMainCityPos {
|
||||
if x != nil {
|
||||
return x.Pos
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//坐标同步
|
||||
type MainCitySynchPosPush struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Pos *DBMainCityPos `protobuf:"bytes,1,opt,name=pos,proto3" json:"pos"`
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPush) Reset() {
|
||||
*x = MainCitySynchPosPush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPush) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainCitySynchPosPush) ProtoMessage() {}
|
||||
|
||||
func (x *MainCitySynchPosPush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MainCitySynchPosPush.ProtoReflect.Descriptor instead.
|
||||
func (*MainCitySynchPosPush) Descriptor() ([]byte, []int) {
|
||||
return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *MainCitySynchPosPush) GetPos() *DBMainCityPos {
|
||||
if x != nil {
|
||||
return x.Pos
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//在线用户列表请求
|
||||
type MainCityOnlinePlayerReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *MainCityOnlinePlayerReq) Reset() {
|
||||
*x = MainCityOnlinePlayerReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainCityOnlinePlayerReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainCityOnlinePlayerReq) ProtoMessage() {}
|
||||
|
||||
func (x *MainCityOnlinePlayerReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MainCityOnlinePlayerReq.ProtoReflect.Descriptor instead.
|
||||
func (*MainCityOnlinePlayerReq) Descriptor() ([]byte, []int) {
|
||||
return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
//在线用户列表请求
|
||||
type MainCityOnlinePlayerResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uids []string `protobuf:"bytes,1,rep,name=uids,proto3" json:"uids"`
|
||||
}
|
||||
|
||||
func (x *MainCityOnlinePlayerResp) Reset() {
|
||||
*x = MainCityOnlinePlayerResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainCityOnlinePlayerResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainCityOnlinePlayerResp) ProtoMessage() {}
|
||||
|
||||
func (x *MainCityOnlinePlayerResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_maincity_maincity_msg_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MainCityOnlinePlayerResp.ProtoReflect.Descriptor instead.
|
||||
func (*MainCityOnlinePlayerResp) Descriptor() ([]byte, []int) {
|
||||
return file_maincity_maincity_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MainCityOnlinePlayerResp) GetUids() []string {
|
||||
if x != nil {
|
||||
return x.Uids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_maincity_maincity_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_maincity_maincity_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x63,
|
||||
0x69, 0x74, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x63, 0x69, 0x74, 0x79,
|
||||
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x14, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x43, 0x69, 0x74, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x50, 0x6f, 0x73, 0x50, 0x65, 0x65,
|
||||
0x6b, 0x12, 0x20, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
|
||||
0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x52, 0x03,
|
||||
0x70, 0x6f, 0x73, 0x22, 0x38, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x53,
|
||||
0x79, 0x6e, 0x63, 0x68, 0x50, 0x6f, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x03, 0x70,
|
||||
0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x43, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x73, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x19, 0x0a,
|
||||
0x17, 0x4d, 0x61, 0x69, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x2e, 0x0a, 0x18, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x43, 0x69, 0x74, 0x79, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x04, 0x75, 0x69, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_maincity_maincity_msg_proto_rawDescOnce sync.Once
|
||||
file_maincity_maincity_msg_proto_rawDescData = file_maincity_maincity_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_maincity_maincity_msg_proto_rawDescGZIP() []byte {
|
||||
file_maincity_maincity_msg_proto_rawDescOnce.Do(func() {
|
||||
file_maincity_maincity_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_maincity_maincity_msg_proto_rawDescData)
|
||||
})
|
||||
return file_maincity_maincity_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_maincity_maincity_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_maincity_maincity_msg_proto_goTypes = []interface{}{
|
||||
(*MainCitySynchPosPeek)(nil), // 0: MainCitySynchPosPeek
|
||||
(*MainCitySynchPosPush)(nil), // 1: MainCitySynchPosPush
|
||||
(*MainCityOnlinePlayerReq)(nil), // 2: MainCityOnlinePlayerReq
|
||||
(*MainCityOnlinePlayerResp)(nil), // 3: MainCityOnlinePlayerResp
|
||||
(*DBMainCityPos)(nil), // 4: DBMainCityPos
|
||||
}
|
||||
var file_maincity_maincity_msg_proto_depIdxs = []int32{
|
||||
4, // 0: MainCitySynchPosPeek.pos:type_name -> DBMainCityPos
|
||||
4, // 1: MainCitySynchPosPush.pos:type_name -> DBMainCityPos
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_maincity_maincity_msg_proto_init() }
|
||||
func file_maincity_maincity_msg_proto_init() {
|
||||
if File_maincity_maincity_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_maincity_maincity_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_maincity_maincity_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainCitySynchPosPeek); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_maincity_maincity_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainCitySynchPosPush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_maincity_maincity_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainCityOnlinePlayerReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_maincity_maincity_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainCityOnlinePlayerResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_maincity_maincity_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_maincity_maincity_msg_proto_goTypes,
|
||||
DependencyIndexes: file_maincity_maincity_msg_proto_depIdxs,
|
||||
MessageInfos: file_maincity_maincity_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_maincity_maincity_msg_proto = out.File
|
||||
file_maincity_maincity_msg_proto_rawDesc = nil
|
||||
file_maincity_maincity_msg_proto_goTypes = nil
|
||||
file_maincity_maincity_msg_proto_depIdxs = nil
|
||||
}
|
@ -19,6 +19,7 @@ func (this *apiComp) ReceiveAward(session comm.IUserSession, req *pb.MainlineRec
|
||||
award *pb.DBMainlineAward
|
||||
chapterconf *cfg.GameMainChapterData
|
||||
awardConfs []*cfg.GameMainStarrewardData
|
||||
confs []*cfg.GameMainStageData
|
||||
awardid int32
|
||||
awardConf *cfg.GameMainStarrewardData
|
||||
reward []*pb.UserAtno
|
||||
@ -88,7 +89,15 @@ func (this *apiComp) ReceiveAward(session comm.IUserSession, req *pb.MainlineRec
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if confs, err = this.module.configure.getGroupGameMainStageData(req.Chapter, req.Group); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: fmt.Sprintf("group:%d no found", req.Group),
|
||||
}
|
||||
return
|
||||
}
|
||||
awardid = confs[0].Challengeward
|
||||
}
|
||||
if award.Award == nil {
|
||||
award.Award = make(map[int32]int32)
|
||||
@ -115,6 +124,7 @@ func (this *apiComp) ReceiveAward(session comm.IUserSession, req *pb.MainlineRec
|
||||
if v.Starnum == req.Stage {
|
||||
ok = true
|
||||
awardConf = v
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,3 +302,22 @@ func (this *configureComp) getGameMainBossData(id int32) (conf *cfg.GameMainBoss
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) getGroupGameMainStageData(chapter, groupid int32) (confs []*cfg.GameMainStageData, err error) {
|
||||
this.lock.Lock()
|
||||
chapterMap := this.chapterMap
|
||||
this.lock.Unlock()
|
||||
if chapter, ok := chapterMap[chapter]; ok {
|
||||
for _, v := range chapter {
|
||||
if v.GroupId == groupid {
|
||||
confs = append(confs, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
if confs == nil {
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_mainstage, groupid)
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user