This commit is contained in:
meixiongfeng 2023-02-22 11:31:52 +08:00
commit 2b4abbac81
5 changed files with 210 additions and 25 deletions

View File

@ -159,7 +159,7 @@ type (
pos: 位置(-1 表示随机位置 大于0 表示获得指定位置 ) pos: 位置(-1 表示随机位置 大于0 表示获得指定位置 )
lv: 装备等级 lv: 装备等级
*/ */
GetForgeEquip(session IUserSession, suiteId int32, pos int32, lv int32) (eruip *pb.DB_Equipment, code pb.ErrorCode) GetForgeEquip(session IUserSession, suiteId int32, pos int32, lv int32, dyweight []int32) (eruip *pb.DB_Equipment, code pb.ErrorCode)
} }
IMainline interface { IMainline interface {
ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode) ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode)

View File

@ -106,7 +106,7 @@ func (this *modelEquipmentComp) AddEquipments(session comm.IUserSession, cIds ma
for k, v := range cIds { for k, v := range cIds {
if c, ok := configure.GetDataMap()[k]; ok { if c, ok := configure.GetDataMap()[k]; ok {
for i := uint32(0); i < v; i++ { for i := uint32(0); i < v; i++ {
if equipment, err := this.newEquipment(uId, c); err != nil { if equipment, err := this.newEquipment(uId, c, nil); err != nil {
return nil, err return nil, err
} else { } else {
//随机任务 //随机任务
@ -242,11 +242,12 @@ func (this *modelEquipmentComp) UpdateByHeroId(uid string, equipments ...*pb.DB_
} }
//创建新的武器对象 //创建新的武器对象
func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData) (equipment *pb.DB_Equipment, err error) { func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData, dyweight []int32) (equipment *pb.DB_Equipment, err error) {
var ( var (
mattr []*cfg.GameEquipAttrlibraryData mattr []*cfg.GameEquipAttrlibraryData
sattr []*cfg.GameEquipAttrlibraryData sattr []*cfg.GameEquipAttrlibraryData
equipatt *cfg.GameEquipAttributeData equipatt *cfg.GameEquipAttributeData
weight []int32
total int total int
satterNum int32 satterNum int32
) )
@ -281,12 +282,22 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
break break
} }
} }
weight = make([]int32, len(conf.Addattrnump))
for i, v := range conf.Addattrnump {
weight[i] = v
}
if dyweight != nil && len(dyweight) >= len(weight) {
for i, _ := range weight {
weight[i] += dyweight[i]
}
}
for _, v := range conf.Addattrnump { for _, v := range weight {
total += int(v) total += int(v)
} }
n := rand.Intn(total) n := rand.Intn(total)
for i, v := range conf.Addattrnump { for i, v := range weight {
if int32(n) <= v { if int32(n) <= v {
satterNum = conf.Addattrnum[i] satterNum = conf.Addattrnum[i]
break break

View File

@ -158,7 +158,7 @@ func (this *Equipment) NewEquipment(uid, cid string) (code pb.ErrorCode, equip *
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
if equip, err = this.modelEquipment.newEquipment(uid, conf); err != nil { if equip, err = this.modelEquipment.newEquipment(uid, conf, nil); err != nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
@ -332,11 +332,10 @@ func (this *Equipment) GetActionableSuit(uid string) (code pb.ErrorCode, Suit []
pos: 位置(-1 表示随机位置 大于0 表示获得指定位置 ) pos: 位置(-1 表示随机位置 大于0 表示获得指定位置 )
lv: 装备等级 lv: 装备等级
*/ */
func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, pos int32, lv int32) (eruip *pb.DB_Equipment, code pb.ErrorCode) { func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, pos int32, lv int32, dyweight []int32) (eruip *pb.DB_Equipment, code pb.ErrorCode) {
var ( var (
configures []*cfg.GameEquipData configures []*cfg.GameEquipData
lvs []*cfg.GameEquipData lvs []*cfg.GameEquipData
change []*pb.DB_Equipment
err error err error
) )
if configures, err = this.configure.GetSuitEquipmentConfigure(suiteId); err != nil { if configures, err = this.configure.GetSuitEquipmentConfigure(suiteId); err != nil {
@ -346,10 +345,14 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p
if pos != -1 { if pos != -1 {
for _, v := range configures { for _, v := range configures {
if v.Pos == pos && v.Star == lv { if v.Pos == pos && v.Star == lv {
if change, code = this.AddNewEquipments(session, map[string]uint32{v.Id: 1}, true); code == pb.ErrorCode_Success { if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), v, dyweight); err == nil {
eruip = change[0] code = pb.ErrorCode_Success
this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip})
return return
} }
this.Errorf("err%v", err)
code = pb.ErrorCode_SystemError
return
} }
} }
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
@ -363,14 +366,15 @@ func (this *Equipment) GetForgeEquip(session comm.IUserSession, suiteId int32, p
} }
r := rand.New(rand.NewSource(time.Now().Unix())) r := rand.New(rand.NewSource(time.Now().Unix()))
index := r.Perm(len(lvs))[0] index := r.Perm(len(lvs))[0]
if eruip, err = this.modelEquipment.newEquipment(session.GetUserId(), lvs[index], dyweight); err == nil {
if change, code = this.AddNewEquipments(session, map[string]uint32{lvs[index].Id: 1}, true); code == pb.ErrorCode_Success { code = pb.ErrorCode_Success
eruip = change[0] this.equipmentsChangePush(session, []*pb.DB_Equipment{eruip})
return return
} }
this.Errorf("err%v", err)
code = pb.ErrorCode_SystemError
return
} }
return
} }
//Evens-------------------------------------------------------------------------------------------------------------------------------- //Evens--------------------------------------------------------------------------------------------------------------------------------

View File

@ -599,13 +599,6 @@ func (x *ForgeData) GetScore() int32 {
return 0 return 0
} }
func (x *ForgeData) GetTime() int64 {
if x != nil {
return x.Time
}
return 0
}
//玩家图鉴任务 //玩家图鉴任务
type DBTujianTask struct { type DBTujianTask struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -620,7 +613,11 @@ type DBTujianTask struct {
func (x *DBTujianTask) Reset() { func (x *DBTujianTask) Reset() {
*x = DBTujianTask{} *x = DBTujianTask{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[8] mi := &file_smithy_smithy_db_proto_msgTypes[8]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[6]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -633,7 +630,11 @@ func (x *DBTujianTask) String() string {
func (*DBTujianTask) ProtoMessage() {} func (*DBTujianTask) ProtoMessage() {}
func (x *DBTujianTask) ProtoReflect() protoreflect.Message { func (x *DBTujianTask) ProtoReflect() protoreflect.Message {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[8] mi := &file_smithy_smithy_db_proto_msgTypes[8]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[6]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -646,7 +647,11 @@ func (x *DBTujianTask) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBTujianTask.ProtoReflect.Descriptor instead. // Deprecated: Use DBTujianTask.ProtoReflect.Descriptor instead.
func (*DBTujianTask) Descriptor() ([]byte, []int) { func (*DBTujianTask) Descriptor() ([]byte, []int) {
<<<<<<< HEAD
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{8} return file_smithy_smithy_db_proto_rawDescGZIP(), []int{8}
=======
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{6}
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
func (x *DBTujianTask) GetUid() string { func (x *DBTujianTask) GetUid() string {
@ -684,7 +689,11 @@ type Clang struct {
func (x *Clang) Reset() { func (x *Clang) Reset() {
*x = Clang{} *x = Clang{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[9] mi := &file_smithy_smithy_db_proto_msgTypes[9]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[7]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -697,7 +706,11 @@ func (x *Clang) String() string {
func (*Clang) ProtoMessage() {} func (*Clang) ProtoMessage() {}
func (x *Clang) ProtoReflect() protoreflect.Message { func (x *Clang) ProtoReflect() protoreflect.Message {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[9] mi := &file_smithy_smithy_db_proto_msgTypes[9]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[7]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -710,7 +723,11 @@ func (x *Clang) ProtoReflect() protoreflect.Message {
// Deprecated: Use Clang.ProtoReflect.Descriptor instead. // Deprecated: Use Clang.ProtoReflect.Descriptor instead.
func (*Clang) Descriptor() ([]byte, []int) { func (*Clang) Descriptor() ([]byte, []int) {
<<<<<<< HEAD
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{9} return file_smithy_smithy_db_proto_rawDescGZIP(), []int{9}
=======
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{7}
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
func (x *Clang) GetDeskType() int32 { func (x *Clang) GetDeskType() int32 {
@ -747,7 +764,11 @@ type OrderClang struct {
func (x *OrderClang) Reset() { func (x *OrderClang) Reset() {
*x = OrderClang{} *x = OrderClang{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[10] mi := &file_smithy_smithy_db_proto_msgTypes[10]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[8]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -760,7 +781,11 @@ func (x *OrderClang) String() string {
func (*OrderClang) ProtoMessage() {} func (*OrderClang) ProtoMessage() {}
func (x *OrderClang) ProtoReflect() protoreflect.Message { func (x *OrderClang) ProtoReflect() protoreflect.Message {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[10] mi := &file_smithy_smithy_db_proto_msgTypes[10]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[8]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -773,7 +798,11 @@ func (x *OrderClang) ProtoReflect() protoreflect.Message {
// Deprecated: Use OrderClang.ProtoReflect.Descriptor instead. // Deprecated: Use OrderClang.ProtoReflect.Descriptor instead.
func (*OrderClang) Descriptor() ([]byte, []int) { func (*OrderClang) Descriptor() ([]byte, []int) {
<<<<<<< HEAD
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{10} return file_smithy_smithy_db_proto_rawDescGZIP(), []int{10}
=======
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{8}
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
func (x *OrderClang) GetDeskType() int32 { func (x *OrderClang) GetDeskType() int32 {
@ -819,7 +848,11 @@ type DBSmithy struct {
func (x *DBSmithy) Reset() { func (x *DBSmithy) Reset() {
*x = DBSmithy{} *x = DBSmithy{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[11] mi := &file_smithy_smithy_db_proto_msgTypes[11]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[9]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -832,7 +865,11 @@ func (x *DBSmithy) String() string {
func (*DBSmithy) ProtoMessage() {} func (*DBSmithy) ProtoMessage() {}
func (x *DBSmithy) ProtoReflect() protoreflect.Message { func (x *DBSmithy) ProtoReflect() protoreflect.Message {
<<<<<<< HEAD
mi := &file_smithy_smithy_db_proto_msgTypes[11] mi := &file_smithy_smithy_db_proto_msgTypes[11]
=======
mi := &file_smithy_smithy_db_proto_msgTypes[9]
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -845,7 +882,11 @@ func (x *DBSmithy) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBSmithy.ProtoReflect.Descriptor instead. // Deprecated: Use DBSmithy.ProtoReflect.Descriptor instead.
func (*DBSmithy) Descriptor() ([]byte, []int) { func (*DBSmithy) Descriptor() ([]byte, []int) {
<<<<<<< HEAD
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{11} return file_smithy_smithy_db_proto_rawDescGZIP(), []int{11}
=======
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{9}
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
func (x *DBSmithy) GetId() string { func (x *DBSmithy) GetId() string {
@ -989,6 +1030,7 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x29, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x29,
0x0a, 0x05, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x0a, 0x05, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x44, 0x42, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x45, 0x6e, 0x74, 0x44, 0x42, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x45, 0x6e, 0x74,
<<<<<<< HEAD
0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x41, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x41,
0x74, 0x6c, 0x61, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72,
@ -1072,6 +1114,72 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 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, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33, 0x33,
=======
0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f,
0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x44, 0x0a, 0x0a, 0x41, 0x74, 0x6c, 0x61, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6b, 0x0a, 0x09, 0x46,
0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67,
0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f,
0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c,
0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69,
0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x54, 0x0a, 0x0c, 0x44, 0x42, 0x54, 0x75,
0x6a, 0x69, 0x61, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0x4f,
0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22,
0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a,
0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08,
0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x05, 0x63, 0x6c,
0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e,
0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73,
0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43,
0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69,
0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18,
0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74,
0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c,
0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 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, 0x1a, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 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,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
var ( var (
@ -1086,13 +1194,18 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte {
return file_smithy_smithy_db_proto_rawDescData return file_smithy_smithy_db_proto_rawDescData
} }
<<<<<<< HEAD
var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
=======
var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
var file_smithy_smithy_db_proto_goTypes = []interface{}{ var file_smithy_smithy_db_proto_goTypes = []interface{}{
(*Mastery)(nil), // 0: Mastery (*Mastery)(nil), // 0: Mastery
(*DBStove)(nil), // 1: DBStove (*DBStove)(nil), // 1: DBStove
(*CustomerInfo)(nil), // 2: CustomerInfo (*CustomerInfo)(nil), // 2: CustomerInfo
(*DBCustomer)(nil), // 3: DBCustomer (*DBCustomer)(nil), // 3: DBCustomer
(*DBAtlas)(nil), // 4: DBAtlas (*DBAtlas)(nil), // 4: DBAtlas
<<<<<<< HEAD
(*CollectData)(nil), // 5: CollectData (*CollectData)(nil), // 5: CollectData
(*ForgeList)(nil), // 6: ForgeList (*ForgeList)(nil), // 6: ForgeList
(*ForgeData)(nil), // 7: ForgeData (*ForgeData)(nil), // 7: ForgeData
@ -1130,6 +1243,39 @@ var file_smithy_smithy_db_proto_depIdxs = []int32{
15, // [15:15] is the sub-list for extension type_name 15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee 15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name 0, // [0:15] is the sub-list for field type_name
=======
(*ForgeData)(nil), // 5: ForgeData
(*DBTujianTask)(nil), // 6: DBTujianTask
(*Clang)(nil), // 7: Clang
(*OrderClang)(nil), // 8: OrderClang
(*DBSmithy)(nil), // 9: DBSmithy
nil, // 10: DBStove.DataEntry
nil, // 11: DBStove.SkillEntry
nil, // 12: DBStove.ForgeEntry
nil, // 13: DBAtlas.AtlasEntry
nil, // 14: DBSmithy.SkillEntry
nil, // 15: DBSmithy.DeskFloorEntry
(*UserAssets)(nil), // 16: UserAssets
}
var file_smithy_smithy_db_proto_depIdxs = []int32{
10, // 0: DBStove.data:type_name -> DBStove.DataEntry
11, // 1: DBStove.skill:type_name -> DBStove.SkillEntry
12, // 2: DBStove.forge:type_name -> DBStove.ForgeEntry
2, // 3: DBCustomer.customers:type_name -> CustomerInfo
13, // 4: DBAtlas.atlas:type_name -> DBAtlas.AtlasEntry
7, // 5: DBSmithy.clang:type_name -> Clang
8, // 6: DBSmithy.orders:type_name -> OrderClang
16, // 7: DBSmithy.items:type_name -> UserAssets
14, // 8: DBSmithy.skill:type_name -> DBSmithy.SkillEntry
15, // 9: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry
0, // 10: DBStove.DataEntry.value:type_name -> Mastery
5, // 11: DBAtlas.AtlasEntry.value:type_name -> ForgeData
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
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
} }
func init() { file_smithy_smithy_db_proto_init() } func init() { file_smithy_smithy_db_proto_init() }
@ -1212,7 +1358,11 @@ func file_smithy_smithy_db_proto_init() {
} }
} }
file_smithy_smithy_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { file_smithy_smithy_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
<<<<<<< HEAD
switch v := v.(*ForgeList); i { switch v := v.(*ForgeList); i {
=======
switch v := v.(*DBTujianTask); i {
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1224,7 +1374,11 @@ func file_smithy_smithy_db_proto_init() {
} }
} }
file_smithy_smithy_db_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { file_smithy_smithy_db_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
<<<<<<< HEAD
switch v := v.(*ForgeData); i { switch v := v.(*ForgeData); i {
=======
switch v := v.(*Clang); i {
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1236,6 +1390,7 @@ func file_smithy_smithy_db_proto_init() {
} }
} }
file_smithy_smithy_db_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { file_smithy_smithy_db_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
<<<<<<< HEAD
switch v := v.(*DBTujianTask); i { switch v := v.(*DBTujianTask); i {
case 0: case 0:
return &v.state return &v.state
@ -1260,6 +1415,8 @@ func file_smithy_smithy_db_proto_init() {
} }
} }
file_smithy_smithy_db_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { file_smithy_smithy_db_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
=======
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
switch v := v.(*OrderClang); i { switch v := v.(*OrderClang); i {
case 0: case 0:
return &v.state return &v.state
@ -1271,7 +1428,11 @@ func file_smithy_smithy_db_proto_init() {
return nil return nil
} }
} }
<<<<<<< HEAD
file_smithy_smithy_db_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_smithy_smithy_db_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
=======
file_smithy_smithy_db_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
switch v := v.(*DBSmithy); i { switch v := v.(*DBSmithy); i {
case 0: case 0:
return &v.state return &v.state
@ -1290,7 +1451,11 @@ func file_smithy_smithy_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_smithy_smithy_db_proto_rawDesc, RawDescriptor: file_smithy_smithy_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
<<<<<<< HEAD
NumMessages: 19, NumMessages: 19,
=======
NumMessages: 16,
>>>>>>> d2a3af4dacaf0402aded4f648f7d2e2a9ddee5d3
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -307,10 +307,15 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str
sseting.Type = comm.Service_Worker sseting.Type = comm.Service_Worker
sseting.Sys["rpcx"]["RpcxStartType"] = 2 sseting.Sys["rpcx"]["RpcxStartType"] = 2
if config.BattleAddr != "" { if config.BattleAddr != "" {
sseting.Modules["battle"]["OpenCheck"] = true sseting.Modules["battle"] = map[string]interface{}{
sseting.Modules["battle"]["BattleServerAddr"] = config.BattleAddr "OpenCheck": true,
"BattleServerAddr": config.BattleAddr,
}
} else { } else {
sseting.Modules["battle"]["OpenCheck"] = false sseting.Modules["battle"] = map[string]interface{}{
"OpenCheck": false,
}
} }
break break
case comm.Service_Mainte: //维护服务 case comm.Service_Mainte: //维护服务