Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
6e99c1fcba
@ -87,7 +87,6 @@ func (this *ModelDragon) CreateDragon(session comm.IUserSession, dragons map[str
|
|||||||
Property: map[string]int32{},
|
Property: map[string]int32{},
|
||||||
Play: map[int32]*pb.PlayData{},
|
Play: map[int32]*pb.PlayData{},
|
||||||
Rtime: configure.Now().Unix(),
|
Rtime: configure.Now().Unix(),
|
||||||
Lvitem: map[string]int32{},
|
|
||||||
Itemlv: 1,
|
Itemlv: 1,
|
||||||
}
|
}
|
||||||
for _, obj := range dragonList {
|
for _, obj := range dragonList {
|
||||||
|
@ -80,7 +80,6 @@ func (this *Dragon) CreateRobotDragon(dragonid string, lv int32) (dragon *pb.DBD
|
|||||||
Exp: 0,
|
Exp: 0,
|
||||||
Property: map[string]int32{},
|
Property: map[string]int32{},
|
||||||
Play: map[int32]*pb.PlayData{},
|
Play: map[int32]*pb.PlayData{},
|
||||||
Lvitem: map[string]int32{},
|
|
||||||
Rtime: configure.Now().Unix(),
|
Rtime: configure.Now().Unix(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,21 +120,10 @@ func (this *Dragon) QueryBigDragonList(uid string) (dragon []*pb.DBDragon, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 此接口可能是跨服操作
|
||||||
func (this *Dragon) QueryDragonById(uid string, dragonid string) (dragon *pb.DBDragon, err error) {
|
func (this *Dragon) QueryDragonById(uid string, dragonid string) (dragon *pb.DBDragon, err error) {
|
||||||
var (
|
dragon, err = this.modelDragon.GetDragonByOid(uid, dragonid)
|
||||||
list []*pb.DBDragon
|
|
||||||
)
|
|
||||||
|
|
||||||
if list, err = this.modelDragon.GetDragonList(uid); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
for _, v := range list {
|
|
||||||
if v.Id == dragonid {
|
|
||||||
dragon = v
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
err = fmt.Errorf("not found dragon dragonid:%s", dragonid)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ type DBDragon struct {
|
|||||||
Property map[string]int32 `protobuf:"bytes,6,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 坐骑属性
|
Property map[string]int32 `protobuf:"bytes,6,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 坐骑属性
|
||||||
Play map[int32]*PlayData `protobuf:"bytes,7,rep,name=play,proto3" json:"play" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 坐骑训练次数
|
Play map[int32]*PlayData `protobuf:"bytes,7,rep,name=play,proto3" json:"play" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 坐骑训练次数
|
||||||
Rtime int64 `protobuf:"varint,8,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 用来清除 每日训练次数
|
Rtime int64 `protobuf:"varint,8,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 用来清除 每日训练次数
|
||||||
Lvitem map[string]int32 `protobuf:"bytes,9,rep,name=lvitem,proto3" json:"lvitem" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 等前端同步删除此字段
|
// map<string,int32> lvitem = 9; // 等前端同步删除此字段
|
||||||
Itemlv int32 `protobuf:"varint,10,opt,name=itemlv,proto3" json:"itemlv"` // 道具提升等级
|
Itemlv int32 `protobuf:"varint,10,opt,name=itemlv,proto3" json:"itemlv"` // 道具提升等级
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +180,6 @@ func (x *DBDragon) GetRtime() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBDragon) GetLvitem() map[string]int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Lvitem
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBDragon) GetItemlv() int32 {
|
func (x *DBDragon) GetItemlv() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Itemlv
|
return x.Itemlv
|
||||||
@ -202,7 +195,7 @@ var file_dragon_dragon_db_proto_rawDesc = []byte{
|
|||||||
0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x64,
|
0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x64,
|
||||||
0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63,
|
0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63,
|
||||||
0x64, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xe1, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x44,
|
0x64, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xf7, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x44,
|
||||||
0x72, 0x61, 0x67, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x72, 0x61, 0x67, 0x6f, 0x6e, 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,
|
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x67, 0x6f,
|
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x67, 0x6f,
|
||||||
@ -216,24 +209,18 @@ var file_dragon_dragon_db_proto_rawDesc = []byte{
|
|||||||
0x61, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x61,
|
0x61, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x61,
|
||||||
0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x70,
|
0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x70,
|
||||||
0x6c, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
|
0x6c, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
|
||||||
0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6c, 0x76, 0x69,
|
0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65,
|
||||||
0x74, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x44, 0x72,
|
0x6d, 0x6c, 0x76, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x6c,
|
||||||
0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x4c, 0x76, 0x69, 0x74, 0x65, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x76, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74,
|
||||||
0x52, 0x06, 0x6c, 0x76, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d,
|
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x6c, 0x76, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x6c, 0x76,
|
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||||
0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72,
|
0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42,
|
||||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
0x0a, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a,
|
||||||
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a,
|
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50,
|
||||||
0x09, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
0x6c, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05,
|
0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x6c,
|
0x6f, 0x33,
|
||||||
0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
|
||||||
0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x76, 0x69, 0x74, 0x65, 0x6d, 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, 0x42, 0x06, 0x5a, 0x04,
|
|
||||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -248,24 +235,22 @@ func file_dragon_dragon_db_proto_rawDescGZIP() []byte {
|
|||||||
return file_dragon_dragon_db_proto_rawDescData
|
return file_dragon_dragon_db_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_dragon_dragon_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_dragon_dragon_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
var file_dragon_dragon_db_proto_goTypes = []interface{}{
|
var file_dragon_dragon_db_proto_goTypes = []interface{}{
|
||||||
(*PlayData)(nil), // 0: PlayData
|
(*PlayData)(nil), // 0: PlayData
|
||||||
(*DBDragon)(nil), // 1: DBDragon
|
(*DBDragon)(nil), // 1: DBDragon
|
||||||
nil, // 2: DBDragon.PropertyEntry
|
nil, // 2: DBDragon.PropertyEntry
|
||||||
nil, // 3: DBDragon.PlayEntry
|
nil, // 3: DBDragon.PlayEntry
|
||||||
nil, // 4: DBDragon.LvitemEntry
|
|
||||||
}
|
}
|
||||||
var file_dragon_dragon_db_proto_depIdxs = []int32{
|
var file_dragon_dragon_db_proto_depIdxs = []int32{
|
||||||
2, // 0: DBDragon.property:type_name -> DBDragon.PropertyEntry
|
2, // 0: DBDragon.property:type_name -> DBDragon.PropertyEntry
|
||||||
3, // 1: DBDragon.play:type_name -> DBDragon.PlayEntry
|
3, // 1: DBDragon.play:type_name -> DBDragon.PlayEntry
|
||||||
4, // 2: DBDragon.lvitem:type_name -> DBDragon.LvitemEntry
|
0, // 2: DBDragon.PlayEntry.value:type_name -> PlayData
|
||||||
0, // 3: DBDragon.PlayEntry.value:type_name -> PlayData
|
3, // [3:3] is the sub-list for method output_type
|
||||||
4, // [4:4] is the sub-list for method output_type
|
3, // [3:3] is the sub-list for method input_type
|
||||||
4, // [4:4] is the sub-list for method input_type
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
4, // [4:4] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
4, // [4:4] is the sub-list for extension extendee
|
0, // [0:3] is the sub-list for field type_name
|
||||||
0, // [0:4] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_dragon_dragon_db_proto_init() }
|
func init() { file_dragon_dragon_db_proto_init() }
|
||||||
@ -305,7 +290,7 @@ func file_dragon_dragon_db_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_dragon_dragon_db_proto_rawDesc,
|
RawDescriptor: file_dragon_dragon_db_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 5,
|
NumMessages: 4,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user