This commit is contained in:
meixiongfeng 2023-07-07 09:45:24 +08:00
commit bfd8688681
9 changed files with 687 additions and 69 deletions

View File

@ -0,0 +1,37 @@
package passon
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/pb"
)
// 参数校验
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.PassonInfoReq) (errdata *pb.ErrorData) {
return
}
// /获取自己的排行榜信息
func (this *apiComp) Info(session comm.IUserSession, req *pb.PassonInfoReq) (errdata *pb.ErrorData) {
var (
info *pb.DBPasson
err error
)
if errdata = this.InfoCheck(session, req); errdata != nil {
return
}
if info, err = this.module.modelPasson.getUserPasson(session.GetUserId()); err != nil && err != mgo.MongodbNil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "info", &pb.PassonInfoResp{Info: info})
return
}

View File

@ -8,7 +8,7 @@ import (
// 参数校验
func (this *apiComp) InRoomCheck(session comm.IUserSession, req *pb.PassonInRoomReq) (errdata *pb.ErrorData) {
if req.Heroid == "" {
if req.Heroid == "" || req.Index < 0 || req.Index > 11 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
@ -85,6 +85,14 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq)
if errdata = this.module.ModuleHero.PassonHero(session, map[string]bool{hero.Id: true}); errdata != nil {
return
}
if err = this.module.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "inroom", &pb.PassonInRoomResp{Heroid: req.Heroid})
return
}

View File

@ -0,0 +1,56 @@
package passon
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
)
// 参数校验
func (this *apiComp) OutRoomCheck(session comm.IUserSession, req *pb.PassonOutRoomReq) (errdata *pb.ErrorData) {
if req.Heroid == "" || req.Index < 0 || req.Index > 11 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: "Heroid is 0",
}
}
return
}
// /获取系统公告
func (this *apiComp) OutRoom(session comm.IUserSession, req *pb.PassonOutRoomReq) (errdata *pb.ErrorData) {
var (
passon *pb.DBPasson
err error
)
if errdata = this.OutRoomCheck(session, req); errdata != nil {
return
}
if passon, err = this.module.modelPasson.getUserPasson(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
passon.Student[req.Index].State = 2
passon.Student[req.Index].Cdtime = configure.Now().Unix()
if errdata = this.module.ModuleHero.PassonHero(session, map[string]bool{req.Heroid: false}); errdata != nil {
return
}
if err = this.module.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "outroom", &pb.PassonOutRoomResp{Index: passon.Student[req.Index]})
return
}

View File

@ -6,6 +6,7 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo"
"go.mongodb.org/mongo-driver/bson/primitive"
@ -42,9 +43,25 @@ func (this *modelPasson) getUserPasson(uid string) (results *pb.DBPasson, err er
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Teacher: make([]string, 5),
Student: make([]string, 12),
Student: make([]*pb.FutonItem, 12),
}
for i := 0; i < 12; i++ {
results.Student[i] = &pb.FutonItem{}
}
err = this.Add(uid, results)
}
return
}
func (this *modelPasson) updateUserPasson(uid string, data *pb.DBPasson) (err error) {
if err = this.Change(uid, map[string]interface{}{
"teacher": data.Teacher,
"student": data.Student,
}); err != nil {
this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()})
return
}
return
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"sort"
"go_dreamfactory/lego/base"
@ -74,22 +75,29 @@ func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32)
}
heros = this.ModuleHero.GetHeroList(session.GetUserId())
if len(heros) < 5 {
return
}
// 使用sort.Slice进行排序
sort.Slice(heros, func(i, j int) bool {
return heros[i].Lv < heros[j].Lv
})
if len(heros) < 5 {
for i, v := range heros {
passon.Teacher[i] = v.Id
}
if err = this.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
this.Errorln(err)
return
}
return
}
for i := 0; i < 5; i++ {
if heros[i].Ispasson {
change[heros[i].Id] = false
for ii, v := range passon.Student {
if v == heros[ii].Id {
passon.Student[ii] = ""
if v.Heroid == heros[ii].Id {
passon.Student[ii].State = 2
passon.Student[ii].Cdtime = configure.Now().Unix()
}
}
}
@ -110,12 +118,9 @@ func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32)
session.SendMsg(string(this.GetType()), "lvchange", &pb.PassonLvChangePush{Lv: passon.Passonlv})
}
if err = this.modelPasson.Change(session.GetUserId(), map[string]interface{}{
"passonlv": passon.Passonlv,
"teacher": passon.Teacher,
"student": passon.Student,
}); err != nil {
if err = this.modelPasson.updateUserPasson(session.GetUserId(), passon); err != nil {
this.Errorln(err)
return
}
}

View File

@ -52,7 +52,7 @@ func (this *ModelWTask) getUserWTasks(uid string) (results *pb.DBWTask, err erro
}
func (this *ModelWTask) updateUserWTasks(uid string, data *pb.DBWTask) (err error) {
if err = this.module.modelwtask.Change(uid, map[string]interface{}{
if err = this.Change(uid, map[string]interface{}{
"currchapter": data.Currchapter,
"activations": data.Activations,
"accepts": data.Accepts,

View File

@ -149,6 +149,11 @@ func (this *WTask) BuriedsNotify(uid string, condis []*pb.ConIProgress) {
session.SendMsg(string(this.GetType()), "accepttaskchange", &pb.WTaskAcceptChangePush{Accepts: detailstasks})
}
// 功能开启
func (this *WTask) OpenCmdNotice(session comm.IUserSession, keys ...string) {
}
// 校验任务进度
func (this *WTask) pushtaskprogress(session comm.IUserSession, wtask *pb.DBWTask) (errdata *pb.ErrorData) {
var (

View File

@ -20,23 +20,86 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type FutonItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"` //当前听课英雄
Cdtime int64 `protobuf:"varint,2,opt,name=cdtime,proto3" json:"cdtime"` //cd 开始时间
State int32 `protobuf:"varint,3,opt,name=state,proto3" json:"state"` //状态 0:空位 1:听课中 2:cd中
}
func (x *FutonItem) Reset() {
*x = FutonItem{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FutonItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FutonItem) ProtoMessage() {}
func (x *FutonItem) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_db_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 FutonItem.ProtoReflect.Descriptor instead.
func (*FutonItem) Descriptor() ([]byte, []int) {
return file_passon_passon_db_proto_rawDescGZIP(), []int{0}
}
func (x *FutonItem) GetHeroid() string {
if x != nil {
return x.Heroid
}
return ""
}
func (x *FutonItem) GetCdtime() int64 {
if x != nil {
return x.Cdtime
}
return 0
}
func (x *FutonItem) GetState() int32 {
if x != nil {
return x.State
}
return 0
}
//用户传功数据
type DBPasson struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Passonlv int32 `protobuf:"varint,3,opt,name=passonlv,proto3" json:"passonlv"` //传功等级
Teacher []string `protobuf:"bytes,4,rep,name=teacher,proto3" json:"teacher"` //老师列表
Student []string `protobuf:"bytes,5,rep,name=student,proto3" json:"student"` //学生列表
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Passonlv int32 `protobuf:"varint,3,opt,name=passonlv,proto3" json:"passonlv"` //传功等级
Teacher []string `protobuf:"bytes,4,rep,name=teacher,proto3" json:"teacher"` //老师列表
Student []*FutonItem `protobuf:"bytes,5,rep,name=student,proto3" json:"student"` //学生列表
}
func (x *DBPasson) Reset() {
*x = DBPasson{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_db_proto_msgTypes[0]
mi := &file_passon_passon_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -49,7 +112,7 @@ func (x *DBPasson) String() string {
func (*DBPasson) ProtoMessage() {}
func (x *DBPasson) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_db_proto_msgTypes[0]
mi := &file_passon_passon_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -62,7 +125,7 @@ func (x *DBPasson) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBPasson.ProtoReflect.Descriptor instead.
func (*DBPasson) Descriptor() ([]byte, []int) {
return file_passon_passon_db_proto_rawDescGZIP(), []int{0}
return file_passon_passon_db_proto_rawDescGZIP(), []int{1}
}
func (x *DBPasson) GetId() string {
@ -93,7 +156,7 @@ func (x *DBPasson) GetTeacher() []string {
return nil
}
func (x *DBPasson) GetStudent() []string {
func (x *DBPasson) GetStudent() []*FutonItem {
if x != nil {
return x.Student
}
@ -104,14 +167,20 @@ var File_passon_passon_db_proto protoreflect.FileDescriptor
var file_passon_passon_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x08, 0x44, 0x42, 0x50, 0x61,
0x73, 0x73, 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, 0x28,
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e,
0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e,
0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20,
0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x09, 0x46, 0x75, 0x74, 0x6f,
0x6e, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x63, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63,
0x64, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x08,
0x44, 0x42, 0x50, 0x61, 0x73, 0x73, 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, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
0x73, 0x73, 0x6f, 0x6e, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
0x73, 0x73, 0x6f, 0x6e, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65,
0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72,
0x12, 0x24, 0x0a, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x75, 0x74, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x73,
0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
@ -128,16 +197,18 @@ func file_passon_passon_db_proto_rawDescGZIP() []byte {
return file_passon_passon_db_proto_rawDescData
}
var file_passon_passon_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_passon_passon_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_passon_passon_db_proto_goTypes = []interface{}{
(*DBPasson)(nil), // 0: DBPasson
(*FutonItem)(nil), // 0: FutonItem
(*DBPasson)(nil), // 1: DBPasson
}
var file_passon_passon_db_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
0, // 0: DBPasson.student:type_name -> FutonItem
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_passon_passon_db_proto_init() }
@ -147,6 +218,18 @@ func file_passon_passon_db_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_passon_passon_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FutonItem); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBPasson); i {
case 0:
return &v.state
@ -165,7 +248,7 @@ func file_passon_passon_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_passon_passon_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -20,6 +20,93 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//信息请求
type PassonInfoReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *PassonInfoReq) Reset() {
*x = PassonInfoReq{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonInfoReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonInfoReq) ProtoMessage() {}
func (x *PassonInfoReq) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_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 PassonInfoReq.ProtoReflect.Descriptor instead.
func (*PassonInfoReq) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{0}
}
//信息请求 回应
type PassonInfoResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Info *DBPasson `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
}
func (x *PassonInfoResp) Reset() {
*x = PassonInfoResp{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonInfoResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonInfoResp) ProtoMessage() {}
func (x *PassonInfoResp) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_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 PassonInfoResp.ProtoReflect.Descriptor instead.
func (*PassonInfoResp) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{1}
}
func (x *PassonInfoResp) GetInfo() *DBPasson {
if x != nil {
return x.Info
}
return nil
}
//上课请求
type PassonInRoomReq struct {
state protoimpl.MessageState
@ -27,12 +114,13 @@ type PassonInRoomReq struct {
unknownFields protoimpl.UnknownFields
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"`
Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index"`
}
func (x *PassonInRoomReq) Reset() {
*x = PassonInRoomReq{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[0]
mi := &file_passon_passon_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -45,7 +133,7 @@ func (x *PassonInRoomReq) String() string {
func (*PassonInRoomReq) ProtoMessage() {}
func (x *PassonInRoomReq) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[0]
mi := &file_passon_passon_msg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -58,7 +146,7 @@ func (x *PassonInRoomReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use PassonInRoomReq.ProtoReflect.Descriptor instead.
func (*PassonInRoomReq) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{0}
return file_passon_passon_msg_proto_rawDescGZIP(), []int{2}
}
func (x *PassonInRoomReq) GetHeroid() string {
@ -68,6 +156,13 @@ func (x *PassonInRoomReq) GetHeroid() string {
return ""
}
func (x *PassonInRoomReq) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
//上课请求 回应
type PassonInRoomResp struct {
state protoimpl.MessageState
@ -75,12 +170,13 @@ type PassonInRoomResp struct {
unknownFields protoimpl.UnknownFields
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"`
Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index"`
}
func (x *PassonInRoomResp) Reset() {
*x = PassonInRoomResp{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[1]
mi := &file_passon_passon_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -93,7 +189,7 @@ func (x *PassonInRoomResp) String() string {
func (*PassonInRoomResp) ProtoMessage() {}
func (x *PassonInRoomResp) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[1]
mi := &file_passon_passon_msg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -106,7 +202,7 @@ func (x *PassonInRoomResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use PassonInRoomResp.ProtoReflect.Descriptor instead.
func (*PassonInRoomResp) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{1}
return file_passon_passon_msg_proto_rawDescGZIP(), []int{3}
}
func (x *PassonInRoomResp) GetHeroid() string {
@ -116,6 +212,213 @@ func (x *PassonInRoomResp) GetHeroid() string {
return ""
}
func (x *PassonInRoomResp) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
//上课请求
type PassonOutRoomReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"`
Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index"`
}
func (x *PassonOutRoomReq) Reset() {
*x = PassonOutRoomReq{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonOutRoomReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonOutRoomReq) ProtoMessage() {}
func (x *PassonOutRoomReq) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[4]
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 PassonOutRoomReq.ProtoReflect.Descriptor instead.
func (*PassonOutRoomReq) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{4}
}
func (x *PassonOutRoomReq) GetHeroid() string {
if x != nil {
return x.Heroid
}
return ""
}
func (x *PassonOutRoomReq) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
//上课请求 回应
type PassonOutRoomResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index *FutonItem `protobuf:"bytes,1,opt,name=index,proto3" json:"index"`
}
func (x *PassonOutRoomResp) Reset() {
*x = PassonOutRoomResp{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonOutRoomResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonOutRoomResp) ProtoMessage() {}
func (x *PassonOutRoomResp) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[5]
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 PassonOutRoomResp.ProtoReflect.Descriptor instead.
func (*PassonOutRoomResp) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{5}
}
func (x *PassonOutRoomResp) GetIndex() *FutonItem {
if x != nil {
return x.Index
}
return nil
}
//清除cd
type PassonClearCDReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"`
}
func (x *PassonClearCDReq) Reset() {
*x = PassonClearCDReq{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonClearCDReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonClearCDReq) ProtoMessage() {}
func (x *PassonClearCDReq) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[6]
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 PassonClearCDReq.ProtoReflect.Descriptor instead.
func (*PassonClearCDReq) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{6}
}
func (x *PassonClearCDReq) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
//清除cd 回应
type PassonClearCDResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"`
}
func (x *PassonClearCDResp) Reset() {
*x = PassonClearCDResp{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PassonClearCDResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PassonClearCDResp) ProtoMessage() {}
func (x *PassonClearCDResp) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[7]
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 PassonClearCDResp.ProtoReflect.Descriptor instead.
func (*PassonClearCDResp) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{7}
}
func (x *PassonClearCDResp) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
//传功等级变化推送
type PassonLvChangePush struct {
state protoimpl.MessageState
@ -128,7 +431,7 @@ type PassonLvChangePush struct {
func (x *PassonLvChangePush) Reset() {
*x = PassonLvChangePush{}
if protoimpl.UnsafeEnabled {
mi := &file_passon_passon_msg_proto_msgTypes[2]
mi := &file_passon_passon_msg_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -141,7 +444,7 @@ func (x *PassonLvChangePush) String() string {
func (*PassonLvChangePush) ProtoMessage() {}
func (x *PassonLvChangePush) ProtoReflect() protoreflect.Message {
mi := &file_passon_passon_msg_proto_msgTypes[2]
mi := &file_passon_passon_msg_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -154,7 +457,7 @@ func (x *PassonLvChangePush) ProtoReflect() protoreflect.Message {
// Deprecated: Use PassonLvChangePush.ProtoReflect.Descriptor instead.
func (*PassonLvChangePush) Descriptor() ([]byte, []int) {
return file_passon_passon_msg_proto_rawDescGZIP(), []int{2}
return file_passon_passon_msg_proto_rawDescGZIP(), []int{8}
}
func (x *PassonLvChangePush) GetLv() int32 {
@ -168,16 +471,37 @@ var File_passon_passon_msg_proto protoreflect.FileDescriptor
var file_passon_passon_msg_proto_rawDesc = []byte{
0x0a, 0x17, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x5f,
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0f, 0x50, 0x61, 0x73,
0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06,
0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65,
0x72, 0x6f, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e,
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x61, 0x73, 0x73, 0x6f,
0x6e, 0x2f, 0x70, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x71, 0x22, 0x2f, 0x0a, 0x0e, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x52, 0x04, 0x69,
0x6e, 0x66, 0x6f, 0x22, 0x3f, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x52,
0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x14,
0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x40, 0x0a, 0x10, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x49, 0x6e,
0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64,
0x22, 0x24, 0x0a, 0x12, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x4c, 0x76, 0x43, 0x68, 0x61, 0x6e,
0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x40, 0x0a, 0x10, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e,
0x4f, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65,
0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f,
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x35, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73,
0x6f, 0x6e, 0x4f, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a,
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46,
0x75, 0x74, 0x6f, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22,
0x28, 0x0a, 0x10, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x44,
0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x29, 0x0a, 0x11, 0x50, 0x61, 0x73,
0x73, 0x6f, 0x6e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14,
0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x22, 0x24, 0x0a, 0x12, 0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x4c, 0x76,
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -192,18 +516,28 @@ func file_passon_passon_msg_proto_rawDescGZIP() []byte {
return file_passon_passon_msg_proto_rawDescData
}
var file_passon_passon_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_passon_passon_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_passon_passon_msg_proto_goTypes = []interface{}{
(*PassonInRoomReq)(nil), // 0: PassonInRoomReq
(*PassonInRoomResp)(nil), // 1: PassonInRoomResp
(*PassonLvChangePush)(nil), // 2: PassonLvChangePush
(*PassonInfoReq)(nil), // 0: PassonInfoReq
(*PassonInfoResp)(nil), // 1: PassonInfoResp
(*PassonInRoomReq)(nil), // 2: PassonInRoomReq
(*PassonInRoomResp)(nil), // 3: PassonInRoomResp
(*PassonOutRoomReq)(nil), // 4: PassonOutRoomReq
(*PassonOutRoomResp)(nil), // 5: PassonOutRoomResp
(*PassonClearCDReq)(nil), // 6: PassonClearCDReq
(*PassonClearCDResp)(nil), // 7: PassonClearCDResp
(*PassonLvChangePush)(nil), // 8: PassonLvChangePush
(*DBPasson)(nil), // 9: DBPasson
(*FutonItem)(nil), // 10: FutonItem
}
var file_passon_passon_msg_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
9, // 0: PassonInfoResp.info:type_name -> DBPasson
10, // 1: PassonOutRoomResp.index:type_name -> FutonItem
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_passon_passon_msg_proto_init() }
@ -211,9 +545,10 @@ func file_passon_passon_msg_proto_init() {
if File_passon_passon_msg_proto != nil {
return
}
file_passon_passon_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_passon_passon_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonInRoomReq); i {
switch v := v.(*PassonInfoReq); i {
case 0:
return &v.state
case 1:
@ -225,7 +560,7 @@ func file_passon_passon_msg_proto_init() {
}
}
file_passon_passon_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonInRoomResp); i {
switch v := v.(*PassonInfoResp); i {
case 0:
return &v.state
case 1:
@ -237,6 +572,78 @@ func file_passon_passon_msg_proto_init() {
}
}
file_passon_passon_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonInRoomReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonInRoomResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonOutRoomReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonOutRoomResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonClearCDReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonClearCDResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_passon_passon_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PassonLvChangePush); i {
case 0:
return &v.state
@ -255,7 +662,7 @@ func file_passon_passon_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_passon_passon_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 9,
NumExtensions: 0,
NumServices: 0,
},