diff --git a/DesignerConfigs b/DesignerConfigs index 3b86cdc..5048930 160000 --- a/DesignerConfigs +++ b/DesignerConfigs @@ -1 +1 @@ -Subproject commit 3b86cdcde67acc5d79e9bcd51bde67c667f69613 +Subproject commit 5048930a93ad2f32939c0bfd14d83a87ffd816bb diff --git a/Makefile b/Makefile index 5b6166b..9974b77 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,8 @@ excel: -s all gen:proto excel +pull: + git submodule update --remote -.PHONY: all build protos test cert plugin doc proto \ No newline at end of file +.PHONY: all build protos test cert plugin doc proto pull \ No newline at end of file diff --git a/cmd/gameserver/action/RoleAction.go b/cmd/gameserver/action/RoleAction.go index 804aae3..ff69dad 100644 --- a/cmd/gameserver/action/RoleAction.go +++ b/cmd/gameserver/action/RoleAction.go @@ -198,14 +198,8 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i logger.Error("loginRpc err: %v", err) return 1, nil } - - //find chapter from table config chapterInfo := csvdata.Get().TbRogueChapter.Get(req.ChapterId) - - //find chapter from role pass chapterCount, first := role.Role.PassChapters[req.ChapterId] - - //find carbon carbonInfo, ok := chapterInfo.Carbons[req.CarbonId] if !ok { logger.Error("carbonInfo not exists") diff --git a/cmd/gameserver/main.go b/cmd/gameserver/main.go index 9d682a7..94c788e 100644 --- a/cmd/gameserver/main.go +++ b/cmd/gameserver/main.go @@ -26,7 +26,7 @@ func main() { return } go func() { - err <- http.ListenAndServe(fmt.Sprintf("localhost:%d", common.GlobalSconf.DebugPort), nil) + err <- http.ListenAndServe(fmt.Sprintf(":%d", common.GlobalSconf.DebugPort), nil) }() gm := service.NewGmServer(s, fmt.Sprintf(":%d", common.GlobalSconf.GMPort)) diff --git a/cmd/gameserver/service/agent.go b/cmd/gameserver/service/agent.go index 456f074..6dcbf2c 100644 --- a/cmd/gameserver/service/agent.go +++ b/cmd/gameserver/service/agent.go @@ -1,6 +1,7 @@ package service import ( + "fmt" "github.com/golang/protobuf/proto" "math" "pro2d/common" @@ -40,6 +41,7 @@ func (c *Agent) SetSchema(schema components.ISchema) { c.Role.SetConn(c) c.Server.GetConnManage().AddRID(c.Role.Role.Id, c.IConnection.GetID()) + c.Server.GetConnManage().AddUID(c.Role.Role.Uid, c.IConnection.GetID()) } func (c *Agent) GetSchema() components.ISchema { @@ -69,7 +71,18 @@ func (c *Agent) OnLoginQuery(msg components.IMessage) (int32, proto.Message) { return 1, nil } - role := models.RoleExistByUid(req.Token) + uid := req.Token + + // 判断是否已经登录 ,挤掉,断开连接 + conn := c.Server.GetConnManage().GetConnByUID(uid) + logger.Debug(conn) + if conn != nil { + logger.Debug("挤掉。。。。。。。。") + conn.SendSuccess(uint32(pb.ProtoCode_DisConnectRsp), nil) + conn.Stop() + } + + role := models.RoleExistByUid(uid) if role == nil { return 2, nil } @@ -85,50 +98,46 @@ func (c *Agent) OnLoginQuery(msg components.IMessage) (int32, proto.Message) { return 0, protoMsg } -func (c *Agent) SendMsg(errCode int32, cmd uint32, msg interface{}) { +func (c *Agent) SendMsg(errCode int32, cmd uint32, msg interface{}) error { if msg == nil || errCode != 0 { - c.Send(errCode, cmd, nil) - return + return c.Send(errCode, cmd, nil) } rsp, err := proto.Marshal(msg.(proto.Message)) if err != nil { - c.Send(-100, cmd, nil) - return + return c.Send(-100, cmd, nil) } - c.Send(errCode, cmd, rsp) + return c.Send(errCode, cmd, rsp) } -func (c *Agent) OnMessage(msg components.IMessage) { +func (c *Agent) OnMessage(msg components.IMessage) error { atomic.StoreInt64(&c.lastHeartCheckTime, common.Timex()) - logger.Debug("protocolID: %d", msg.GetHeader().GetMsgID()) + logger.Debug("req protocolID: %d", msg.GetHeader().GetMsgID()) //heart if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_HeartReq) { - return + return nil } //login if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_LoginReq) { code, protoMsg := c.OnLoginQuery(msg) - c.SendMsg(code, msg.GetHeader().GetMsgID(), protoMsg) - return + return c.SendMsg(code, msg.GetHeader().GetMsgID(), protoMsg) } //get handler by msgid md := c.Server.GetAction(msg.GetHeader().GetMsgID()) if md == nil { - logger.Debug("cmd: %d, handler is nil", msg.GetHeader().GetMsgID()) - return + return fmt.Errorf("cmd: %d, handler is nil", msg.GetHeader().GetMsgID()) } if msg.GetHeader().GetMsgID() != uint32(pb.ProtoCode_CreateReq) && c.Role == nil { - c.Send(-101, msg.GetHeader().GetMsgID(), nil) - return + return c.Send(-101, msg.GetHeader().GetMsgID(), nil) } //调用协议号对应的逻辑函数 f := md.(func(role *models.RoleModel, msg components.IMessage) (int32, interface{})) errCode, protoMsg := f(c.Role, msg) - c.SendMsg(errCode, msg.GetHeader().GetMsgID(), protoMsg) + logger.Debug("rsp errcode: %d, protocode: %d", errCode, msg.GetHeader().GetMsgID()) + return c.SendMsg(errCode, msg.GetHeader().GetMsgID(), protoMsg) } func (c *Agent) OnTimer() { @@ -158,6 +167,7 @@ func (c *Agent) OnClose() { logger.Debug("ID: %d close, roleid", c.IConnection.GetID(), c.Role.Role.Id) c.Server.GetConnManage().DelRID(c.Role.Role.Id) + c.Server.GetConnManage().DelUID(c.Role.Role.Uid) c.Role.OnOfflineEvent() } diff --git a/cmd/gameserver/service/game.go b/cmd/gameserver/service/game.go index e9ced44..af1cb22 100644 --- a/cmd/gameserver/service/game.go +++ b/cmd/gameserver/service/game.go @@ -106,7 +106,11 @@ func (s *GameServer) OnMessage(msg components.IMessage) { if agent == nil { return } - agent.(*Agent).OnMessage(msg) + err := agent.(*Agent).OnMessage(msg) + if err != nil { + logger.Error("%d, onmessage err: %s", agent.GetID(), err.Error()) + s.OnClose(agent) + } } func (s *GameServer) OnTimer(conn components.IConnection) { diff --git a/cmd/test/action/TestAction.go b/cmd/test/action/TestAction.go new file mode 100644 index 0000000..6810a25 --- /dev/null +++ b/cmd/test/action/TestAction.go @@ -0,0 +1,33 @@ +package action + +import ( + "github.com/golang/protobuf/proto" + "pro2d/common/components" + "pro2d/common/logger" + "pro2d/models" + "pro2d/pb" +) + +func HeartReq(role *models.RoleTestModel, msg components.IMessage) { +} + +func CreateReq(role *models.RoleTestModel, msg components.IMessage) { +} +func ChangeTeamReq(role *models.RoleTestModel, msg components.IMessage) { +} +func HeroEquipReferReq(role *models.RoleTestModel, msg components.IMessage) { +} +func RoleClearItemsReq(role *models.RoleTestModel, msg components.IMessage) { +} +func RoleStartBattleReq(role *models.RoleTestModel, msg components.IMessage) { +} +func RoleEndBattleReq(role *models.RoleTestModel, msg components.IMessage) { + rsp := pb.RoleEndBattleRsp{} + if err := proto.Unmarshal(msg.GetData(), &rsp); err != nil { + logger.Error("rsp err: %v", err) + return + } + logger.Debug(rsp) +} +func EquipmentDelReq(role *models.RoleTestModel, msg components.IMessage) { +} diff --git a/cmd/test/action/protocode.go b/cmd/test/action/protocode.go new file mode 100644 index 0000000..2bad651 --- /dev/null +++ b/cmd/test/action/protocode.go @@ -0,0 +1,19 @@ +package action + +import ( + "pro2d/pb" +) + +func GetTestActionMap() map[interface{}]interface{} { + am := make(map[interface{}]interface{}) + am[uint32(pb.ProtoCode_HeartReq)] = HeartReq + am[uint32(pb.ProtoCode_CreateReq)] = CreateReq + am[uint32(pb.ProtoCode_ChangeTeamReq)] = ChangeTeamReq + am[uint32(pb.ProtoCode_HeroEquipReferReq)] = HeroEquipReferReq + am[uint32(pb.ProtoCode_RoleClearItemsReq)] = RoleClearItemsReq + am[uint32(pb.ProtoCode_RoleStartBattleReq)] = RoleStartBattleReq + am[uint32(pb.ProtoCode_RoleEndBattleReq)] = RoleEndBattleReq + am[uint32(pb.ProtoCode_EquipmentDelReq)] = EquipmentDelReq + + return am +} diff --git a/cmd/test/client.go b/cmd/test/client.go deleted file mode 100644 index 3226a33..0000000 --- a/cmd/test/client.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "github.com/golang/protobuf/proto" - "pro2d/common" - "pro2d/common/components" - "pro2d/common/logger" - "pro2d/pb" - "time" -) - -func main() { - - head := &components.PBHead{ - Length: 0, - Cmd: uint32(pb.ProtoCode_LoginReq), - ErrCode: 0, - PreField: 0, - } - - loginReq := &pb.LoginReq{ - Token: "141815055745814528", - Device: "123123", - } - l, _ := proto.Marshal(loginReq) - - options := []components.ConnectorOption{ - components.WithCtorCount(common.GlobalConf.TestClient.Count), - components.WithCtorSplitter(components.NewPBSplitter(nil)), - } - - client := components.NewConnector(common.GlobalConf.TestClient.Ip, common.GlobalConf.TestClient.Port, options...) - if err := client.Connect(); err != nil { - logger.Error(err) - return - } - - for { - client.Send(head.Cmd, l) - time.Sleep(1 * time.Second) - } -} diff --git a/cmd/test/client_test.go b/cmd/test/client_test.go deleted file mode 100644 index e72e7ab..0000000 --- a/cmd/test/client_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "testing" -) - -type Error struct { - errCode uint8 -} -func (e *Error) Error() string { - switch e.errCode { - case 1: - return "file not found" - case 2: - return "time out" - case 3: - return "permission denied" - default: - return "unknown error" - } -} - -func checkError(err error) { - if err != nil { - panic(err) - } -} - -func TestStart( t *testing.T) { - var e *Error - checkError(e) -} \ No newline at end of file diff --git a/cmd/test/main.go b/cmd/test/main.go new file mode 100644 index 0000000..7fcdfe0 --- /dev/null +++ b/cmd/test/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "pro2d/cmd/test/service" + "pro2d/pb" + "time" +) + +func main() { + tc := service.NewTestClient() + if tc == nil { + return + } + + tc.Login("1") + + pp := &pb.RoleEndBattleReq{ + ChapterId: 1, + CarbonId: 1, + Pass: true, + } + + time.Sleep(2 * time.Second) + for { + //tc.SendPB(pb.ProtoCode_HeartReq, nil) + tc.SendPB(pb.ProtoCode_RoleEndBattleReq, pp) + time.Sleep(5 * time.Second) + } + +} diff --git a/cmd/test/service/TestClient.go b/cmd/test/service/TestClient.go new file mode 100644 index 0000000..41b31de --- /dev/null +++ b/cmd/test/service/TestClient.go @@ -0,0 +1,119 @@ +package service + +import ( + "fmt" + "github.com/golang/protobuf/proto" + "pro2d/cmd/test/action" + "pro2d/common" + "pro2d/common/components" + "pro2d/common/logger" + "pro2d/models" + "pro2d/pb" + "sync/atomic" +) + +type TestClient struct { + components.IConnector + + Token string + RoleTest *models.RoleTestModel + lastHeartCheckTime int64 +} + +func NewTestClient() *TestClient { + options := []components.ConnectorOption{ + components.WithCtorCount(common.GlobalConf.TestClient.Count), + components.WithCtorSplitter(components.NewPBSplitter(nil)), + } + + client := components.NewConnector(common.GlobalConf.TestClient.Ip, common.GlobalConf.TestClient.Port, options...) + if err := client.Connect(); err != nil { + logger.Error(err) + return nil + } + t := &TestClient{IConnector: client} + + client.GetConn().SetConnectionCallback(t.OnConn) + client.GetConn().SetMessageCallback(t.OnMessage) + client.GetConn().SetCloseCallback(t.OnClose) + client.GetConn().SetTimerCallback(t.OnTimer) + client.GetConn().Start() + return t +} + +func (t *TestClient) OnConn(conn components.IConnection) { +} + +func (t *TestClient) OnLoginQuery(msg components.IMessage) { + errCode := msg.GetHeader().GetErrCode() + if errCode != 0 { + logger.Error("Login errcode: %d", errCode) + + if errCode == 2 { + req := &pb.CreateReq{ + Token: t.Token, + Device: "test-create", + } + r, _ := proto.Marshal(req) + t.GetConn().SendSuccess(uint32(pb.ProtoCode_CreateReq), r) + return + } + } + + req := pb.RoleRsp{} + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { + logger.Error("loginRpc err: %v", err) + return + } + + t.RoleTest = models.NewRoleTestModel(req) +} + +func (t *TestClient) OnMessage(msg components.IMessage) { + atomic.StoreInt64(&t.lastHeartCheckTime, common.Timex()) + logger.Debug("rsp errCode:%d, protocolID: %d", msg.GetHeader().GetErrCode(), msg.GetHeader().GetMsgID()) + + //login rsp + if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_LoginReq) { + t.OnLoginQuery(msg) + return + } + + errCode := msg.GetHeader().GetErrCode() + if errCode != 0 { + logger.Error("protocolID: %d, errCode %d", msg.GetHeader().GetMsgID(), errCode) + return + } + + //get handler by msgid + md, ok := action.GetTestActionMap()[msg.GetHeader().GetMsgID()] + if !ok { + fmt.Errorf("cmd: %d, handler is nil", msg.GetHeader().GetMsgID()) + return + } + + //调用协议号对应的逻辑函数 + f := md.(func(role *models.RoleTestModel, msg components.IMessage)) + f(t.RoleTest, msg) +} + +func (t *TestClient) OnClose(conn components.IConnection) { +} +func (t *TestClient) OnTimer(conn components.IConnection) { +} + +func (t *TestClient) Login(token string) { + t.Token = token + head := &components.PBHead{ + Length: 0, + Cmd: uint32(pb.ProtoCode_LoginReq), + ErrCode: 0, + PreField: 0, + } + loginReq := &pb.LoginReq{ + Token: token, + Device: "test-login", + } + l, _ := proto.Marshal(loginReq) + t.Send(head.Cmd, l) +} diff --git a/common/components/conn.go b/common/components/conn.go index 3f9710f..5bcd8bb 100644 --- a/common/components/conn.go +++ b/common/components/conn.go @@ -39,8 +39,8 @@ var connectionPool = &sync.Pool{ func NewConn(id int, conn net.Conn, splitter ISplitter) IConnection { c := connectionPool.Get().(*Connection) - closed := atomic.LoadUint32(&c.Status) - if closed != 0 { + status := atomic.LoadUint32(&c.Status) + if status != 0 { connectionPool.Put(c) c = new(Connection) } diff --git a/common/components/connector.go b/common/components/connector.go index 7141aaa..196d66f 100644 --- a/common/components/connector.go +++ b/common/components/connector.go @@ -2,8 +2,10 @@ package components import ( "fmt" + "github.com/golang/protobuf/proto" "net" "pro2d/common/logger" + "pro2d/pb" ) type ConnectorOption func(*Connector) @@ -22,22 +24,19 @@ func WithCtorCount(count int) ConnectorOption { type Connector struct { IConnector + IConnection IServer + Id int splitter ISplitter ip string port int sum int - - Conns IConnManage - ids uint32 } func NewConnector(ip string, port int, options ...ConnectorOption) IConnector { c := &Connector{ - ids: 0, - ip: ip, - port: port, - Conns: NewConnManage(), + ip: ip, + port: port, } for _, option := range options { option(c) @@ -45,50 +44,51 @@ func NewConnector(ip string, port int, options ...ConnectorOption) IConnector { return c } +func (c *Connector) GetConn() IConnection { + return c.IConnection +} + func (c *Connector) Connect() error { - if c.sum == 0 { - c.sum = 1 - } - for i := 0; i < c.sum; i++ { - conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", c.ip, c.port)) - if err != nil { - return err - } - c.ids++ - cli := NewConn(int(c.ids), conn, c.splitter) - cli.SetConnectionCallback(c.OnConnect) - cli.SetMessageCallback(c.OnMessage) - cli.SetCloseCallback(c.OnClose) - cli.SetTimerCallback(c.OnTimer) - - cli.Start() + conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", c.ip, c.port)) + if err != nil { + return err } + cli := NewConn(c.Id, conn, c.splitter) + cli.SetMessageCallback(c.OnMessage) + cli.SetCloseCallback(c.OnClose) + cli.SetTimerCallback(c.OnTimer) + c.IConnection = cli return nil } func (c *Connector) DisConnect() { - c.Conns.StopAllConns() + c.IConnection.Stop() } -func (c *Connector) Send(cmd uint32, b []byte) { - c.Conns.Range(func(key interface{}, value interface{}) bool { - conn := value.(IConnection) - conn.Send(0, cmd, b) - return true - }) +func (c *Connector) Send(cmd uint32, b []byte) error { + logger.Debug("connector send cmd: %d, msg: %s", cmd, b) + return c.IConnection.Send(0, cmd, b) } -func (c *Connector) GetSplitter() ISplitter { - return c.splitter +func (c *Connector) SendPB(cmd pb.ProtoCode, b proto.Message) error { + if b == nil { + return c.Send(uint32(cmd), nil) + } + + l, err := proto.Marshal(b) + if err != nil { + return err + } + return c.Send(uint32(cmd), l) } -func (c *Connector) OnConnect(conn IConnection) { - c.Conns.AddConn(conn.GetID(), conn) +func (c *Connector) GetSplitter() ISplitter { + return c.splitter } func (c *Connector) OnMessage(msg IMessage) { - logger.Debug("recv msg cmd: %d, conn: %d data: %s", msg.GetHeader().GetMsgID(), msg.GetSID(), msg.GetData()) + logger.Debug("recv msg errorCode: %d cmd: %d, conn: %d data: %s", msg.GetHeader().GetErrCode(), msg.GetHeader().GetMsgID(), msg.GetSID(), msg.GetData()) } func (c *Connector) OnClose(conn IConnection) { @@ -96,5 +96,5 @@ func (c *Connector) OnClose(conn IConnection) { } func (c *Connector) OnTimer(conn IConnection) { - logger.Debug("ontimer id: %d", conn.GetID()) + //logger.Debug("ontimer id: %d", conn.GetID()) } diff --git a/common/components/connmanage.go b/common/components/connmanage.go index 73b1e15..7c8bc24 100644 --- a/common/components/connmanage.go +++ b/common/components/connmanage.go @@ -8,6 +8,9 @@ type ConnManage struct { r2cRW sync.RWMutex r2c map[string]uint32 // role to connID + + u2cRW sync.RWMutex + u2c map[string]uint32 // uid to connID } func NewConnManage() *ConnManage { @@ -17,6 +20,9 @@ func NewConnManage() *ConnManage { r2cRW: sync.RWMutex{}, r2c: make(map[string]uint32), + + u2cRW: sync.RWMutex{}, + u2c: make(map[string]uint32), } } @@ -76,3 +82,22 @@ func (c *ConnManage) GetConnByRID(rid string) IConnection { cid := c.r2c[rid] return c.GetConn(cid) } + +func (c *ConnManage) AddUID(uid string, id uint32) { + c.u2cRW.Lock() + defer c.u2cRW.Unlock() + c.u2c[uid] = id +} + +func (c *ConnManage) DelUID(uid string) { + c.r2cRW.Lock() + defer c.r2cRW.Unlock() + delete(c.r2c, uid) +} + +func (c *ConnManage) GetConnByUID(uid string) IConnection { + c.u2cRW.RLock() + defer c.u2cRW.RUnlock() + cid := c.u2c[uid] + return c.GetConn(cid) +} diff --git a/common/components/icompontents.go b/common/components/icompontents.go index ea78438..e7b7aae 100644 --- a/common/components/icompontents.go +++ b/common/components/icompontents.go @@ -4,6 +4,7 @@ import ( "github.com/gin-gonic/gin" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" + "pro2d/pb" "reflect" ) @@ -71,6 +72,10 @@ type ( AddRID(rid string, id uint32) DelRID(rid string) GetConnByRID(rid string) IConnection + + AddUID(uid string, id uint32) + DelUID(uid string) + GetConnByUID(uid string) IConnection } //server IServer interface { @@ -102,7 +107,9 @@ type ( Connect() error DisConnect() - Send(cmd uint32, b []byte) + GetConn() IConnection + Send(cmd uint32, b []byte) error + SendPB(cmd pb.ProtoCode, b proto.Message) error } //httpserver diff --git a/conf/conf.yaml b/conf/conf.yaml index d27f2e9..a00e300 100644 --- a/conf/conf.yaml +++ b/conf/conf.yaml @@ -69,8 +69,8 @@ server_game1: db: 0 test_client: ip: "127.0.0.1" - port: 8850 - count: 10 + port: 8849 + count: 1 logconf: TimeFormat: "2006-01-02 15:04:05" diff --git a/models/role.go b/models/role.go index c10a2c7..0cd5b18 100644 --- a/models/role.go +++ b/models/role.go @@ -133,7 +133,8 @@ func (m *RoleModel) InitRole() { m.AddTeam(&t4) //init limit - m.UpdateProperties(map[string]interface{}{"clotheslimit": 100, "weaponslimit": 100, "otherlimit": 100}, false) + var limit uint32 = 50 + m.UpdateProperties(map[string]interface{}{"clotheslimit": limit, "weaponslimit": limit, "otherlimit": limit, "jewelrylimit": limit, "materiallimit": limit}, false) m.Update() } diff --git a/models/roleTest.go b/models/roleTest.go new file mode 100644 index 0000000..b0a22af --- /dev/null +++ b/models/roleTest.go @@ -0,0 +1,37 @@ +package models + +import ( + "github.com/golang/protobuf/proto" + "pro2d/pb" +) + +type ProtoMap map[string]proto.Message + +type RoleTestModel struct { + Role *pb.Role + Hero ProtoMap + Team ProtoMap + Equipment ProtoMap +} + +func NewRoleTestModel(rsp pb.RoleRsp) *RoleTestModel { + data := &RoleTestModel{ + Role: rsp.Role, + Hero: make(ProtoMap), + Team: make(ProtoMap), + Equipment: make(ProtoMap), + } + + for _, hero := range rsp.Hero { + data.Hero[hero.Id] = hero + } + + for _, team := range rsp.Team { + data.Team[team.Id] = team + } + for _, equip := range rsp.Equipments { + data.Equipment[equip.Id] = equip + } + + return data +} diff --git a/pb/game.pb.go b/pb/game.pb.go index 55e842e..ace1e6a 100644 --- a/pb/game.pb.go +++ b/pb/game.pb.go @@ -227,6 +227,44 @@ func (x *CreateReq) GetDevice() string { return "" } +type DisConnectRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DisConnectRsp) Reset() { + *x = DisConnectRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_game_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisConnectRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisConnectRsp) ProtoMessage() {} + +func (x *DisConnectRsp) ProtoReflect() protoreflect.Message { + mi := &file_game_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 DisConnectRsp.ProtoReflect.Descriptor instead. +func (*DisConnectRsp) Descriptor() ([]byte, []int) { + return file_game_proto_rawDescGZIP(), []int{4} +} + //ResponseCmd ChangeTeamReq type ChangeTeamReq struct { state protoimpl.MessageState @@ -239,7 +277,7 @@ type ChangeTeamReq struct { func (x *ChangeTeamReq) Reset() { *x = ChangeTeamReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[4] + mi := &file_game_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -252,7 +290,7 @@ func (x *ChangeTeamReq) String() string { func (*ChangeTeamReq) ProtoMessage() {} func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[4] + mi := &file_game_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -265,7 +303,7 @@ func (x *ChangeTeamReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeTeamReq.ProtoReflect.Descriptor instead. func (*ChangeTeamReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{4} + return file_game_proto_rawDescGZIP(), []int{5} } func (x *ChangeTeamReq) GetTeam() []*Team { @@ -289,7 +327,7 @@ type HeroEquipReferReq struct { func (x *HeroEquipReferReq) Reset() { *x = HeroEquipReferReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[5] + mi := &file_game_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -302,7 +340,7 @@ func (x *HeroEquipReferReq) String() string { func (*HeroEquipReferReq) ProtoMessage() {} func (x *HeroEquipReferReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[5] + mi := &file_game_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -315,7 +353,7 @@ func (x *HeroEquipReferReq) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroEquipReferReq.ProtoReflect.Descriptor instead. func (*HeroEquipReferReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{5} + return file_game_proto_rawDescGZIP(), []int{6} } func (x *HeroEquipReferReq) GetEquipId() string { @@ -353,7 +391,7 @@ type RoleRsp struct { func (x *RoleRsp) Reset() { *x = RoleRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[6] + mi := &file_game_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -366,7 +404,7 @@ func (x *RoleRsp) String() string { func (*RoleRsp) ProtoMessage() {} func (x *RoleRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[6] + mi := &file_game_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -379,7 +417,7 @@ func (x *RoleRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleRsp.ProtoReflect.Descriptor instead. func (*RoleRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{6} + return file_game_proto_rawDescGZIP(), []int{7} } func (x *RoleRsp) GetRole() *Role { @@ -423,7 +461,7 @@ type RoleUpdatePropertyRsp struct { func (x *RoleUpdatePropertyRsp) Reset() { *x = RoleUpdatePropertyRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[7] + mi := &file_game_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -436,7 +474,7 @@ func (x *RoleUpdatePropertyRsp) String() string { func (*RoleUpdatePropertyRsp) ProtoMessage() {} func (x *RoleUpdatePropertyRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[7] + mi := &file_game_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -449,7 +487,7 @@ func (x *RoleUpdatePropertyRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleUpdatePropertyRsp.ProtoReflect.Descriptor instead. func (*RoleUpdatePropertyRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{7} + return file_game_proto_rawDescGZIP(), []int{8} } func (x *RoleUpdatePropertyRsp) GetId() []int32 { @@ -478,7 +516,7 @@ type RoleUpdateItemsRsp struct { func (x *RoleUpdateItemsRsp) Reset() { *x = RoleUpdateItemsRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[8] + mi := &file_game_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -491,7 +529,7 @@ func (x *RoleUpdateItemsRsp) String() string { func (*RoleUpdateItemsRsp) ProtoMessage() {} func (x *RoleUpdateItemsRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[8] + mi := &file_game_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -504,7 +542,7 @@ func (x *RoleUpdateItemsRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleUpdateItemsRsp.ProtoReflect.Descriptor instead. func (*RoleUpdateItemsRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{8} + return file_game_proto_rawDescGZIP(), []int{9} } func (x *RoleUpdateItemsRsp) GetItems() string { @@ -527,7 +565,7 @@ type RoleClearItemsReq struct { func (x *RoleClearItemsReq) Reset() { *x = RoleClearItemsReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[9] + mi := &file_game_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -540,7 +578,7 @@ func (x *RoleClearItemsReq) String() string { func (*RoleClearItemsReq) ProtoMessage() {} func (x *RoleClearItemsReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[9] + mi := &file_game_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,7 +591,7 @@ func (x *RoleClearItemsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleClearItemsReq.ProtoReflect.Descriptor instead. func (*RoleClearItemsReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{9} + return file_game_proto_rawDescGZIP(), []int{10} } func (x *RoleClearItemsReq) GetId() string { @@ -582,7 +620,7 @@ type RoleStartBattleReq struct { func (x *RoleStartBattleReq) Reset() { *x = RoleStartBattleReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[10] + mi := &file_game_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -595,7 +633,7 @@ func (x *RoleStartBattleReq) String() string { func (*RoleStartBattleReq) ProtoMessage() {} func (x *RoleStartBattleReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[10] + mi := &file_game_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -608,7 +646,7 @@ func (x *RoleStartBattleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleStartBattleReq.ProtoReflect.Descriptor instead. func (*RoleStartBattleReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{10} + return file_game_proto_rawDescGZIP(), []int{11} } func (x *RoleStartBattleReq) GetChapterId() int32 { @@ -625,6 +663,7 @@ func (x *RoleStartBattleReq) GetCarbonId() int32 { return 0 } +//ResponseCmd RoleEndBattleRsp type RoleEndBattleReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -638,7 +677,7 @@ type RoleEndBattleReq struct { func (x *RoleEndBattleReq) Reset() { *x = RoleEndBattleReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[11] + mi := &file_game_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -651,7 +690,7 @@ func (x *RoleEndBattleReq) String() string { func (*RoleEndBattleReq) ProtoMessage() {} func (x *RoleEndBattleReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[11] + mi := &file_game_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -664,7 +703,7 @@ func (x *RoleEndBattleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleEndBattleReq.ProtoReflect.Descriptor instead. func (*RoleEndBattleReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{11} + return file_game_proto_rawDescGZIP(), []int{12} } func (x *RoleEndBattleReq) GetChapterId() int32 { @@ -704,7 +743,7 @@ type RoleEndBattleRsp struct { func (x *RoleEndBattleRsp) Reset() { *x = RoleEndBattleRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[12] + mi := &file_game_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +756,7 @@ func (x *RoleEndBattleRsp) String() string { func (*RoleEndBattleRsp) ProtoMessage() {} func (x *RoleEndBattleRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[12] + mi := &file_game_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +769,7 @@ func (x *RoleEndBattleRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use RoleEndBattleRsp.ProtoReflect.Descriptor instead. func (*RoleEndBattleRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{12} + return file_game_proto_rawDescGZIP(), []int{13} } func (x *RoleEndBattleRsp) GetRoleLevel() int32 { @@ -787,7 +826,7 @@ type EquipmentDelReq struct { func (x *EquipmentDelReq) Reset() { *x = EquipmentDelReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[13] + mi := &file_game_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -800,7 +839,7 @@ func (x *EquipmentDelReq) String() string { func (*EquipmentDelReq) ProtoMessage() {} func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[13] + mi := &file_game_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -813,7 +852,7 @@ func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EquipmentDelReq.ProtoReflect.Descriptor instead. func (*EquipmentDelReq) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{13} + return file_game_proto_rawDescGZIP(), []int{14} } func (x *EquipmentDelReq) GetId() string { @@ -835,7 +874,7 @@ type EquipmentAddRsp struct { func (x *EquipmentAddRsp) Reset() { *x = EquipmentAddRsp{} if protoimpl.UnsafeEnabled { - mi := &file_game_proto_msgTypes[14] + mi := &file_game_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -848,7 +887,7 @@ func (x *EquipmentAddRsp) String() string { func (*EquipmentAddRsp) ProtoMessage() {} func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { - mi := &file_game_proto_msgTypes[14] + mi := &file_game_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -861,7 +900,7 @@ func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { - return file_game_proto_rawDescGZIP(), []int{14} + return file_game_proto_rawDescGZIP(), []int{15} } func (x *EquipmentAddRsp) GetEquip() *Equipment { @@ -887,68 +926,69 @@ var file_game_proto_rawDesc = []byte{ 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x5c, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, - 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, - 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x15, 0x52, - 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x52, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, - 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x22, - 0x62, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x70, - 0x61, 0x73, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x6f, - 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, - 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x45, - 0x78, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x6f, 0x6c, 0x65, - 0x45, 0x78, 0x70, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x06, 0x20, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x52, 0x73, 0x70, 0x22, 0x31, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x5c, 0x0a, 0x11, 0x48, 0x65, 0x72, + 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x72, 0x65, 0x66, 0x65, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, - 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x21, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, - 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, - 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, - 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x0a, 0x0a, 0x65, 0x71, 0x75, + 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x15, + 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x52, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, + 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x62, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x70, 0x61, 0x73, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, + 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, + 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, + 0x5f, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, + 0x45, 0x78, 0x70, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x6f, 0x6c, + 0x65, 0x45, 0x78, 0x70, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x70, 0x61, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, + 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x21, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, + 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x0f, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x12, 0x27, + 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -963,37 +1003,38 @@ func file_game_proto_rawDescGZIP() []byte { return file_game_proto_rawDescData } -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_game_proto_goTypes = []interface{}{ (*HeartReq)(nil), // 0: game.HeartReq (*HeartRsp)(nil), // 1: game.HeartRsp (*LoginReq)(nil), // 2: game.LoginReq (*CreateReq)(nil), // 3: game.CreateReq - (*ChangeTeamReq)(nil), // 4: game.ChangeTeamReq - (*HeroEquipReferReq)(nil), // 5: game.HeroEquipReferReq - (*RoleRsp)(nil), // 6: game.RoleRsp - (*RoleUpdatePropertyRsp)(nil), // 7: game.RoleUpdatePropertyRsp - (*RoleUpdateItemsRsp)(nil), // 8: game.RoleUpdateItemsRsp - (*RoleClearItemsReq)(nil), // 9: game.RoleClearItemsReq - (*RoleStartBattleReq)(nil), // 10: game.RoleStartBattleReq - (*RoleEndBattleReq)(nil), // 11: game.RoleEndBattleReq - (*RoleEndBattleRsp)(nil), // 12: game.RoleEndBattleRsp - (*EquipmentDelReq)(nil), // 13: game.EquipmentDelReq - (*EquipmentAddRsp)(nil), // 14: game.EquipmentAddRsp - (*Team)(nil), // 15: models.Team - (*Role)(nil), // 16: models.Role - (*Hero)(nil), // 17: models.Hero - (*Equipment)(nil), // 18: models.Equipment + (*DisConnectRsp)(nil), // 4: game.DisConnectRsp + (*ChangeTeamReq)(nil), // 5: game.ChangeTeamReq + (*HeroEquipReferReq)(nil), // 6: game.HeroEquipReferReq + (*RoleRsp)(nil), // 7: game.RoleRsp + (*RoleUpdatePropertyRsp)(nil), // 8: game.RoleUpdatePropertyRsp + (*RoleUpdateItemsRsp)(nil), // 9: game.RoleUpdateItemsRsp + (*RoleClearItemsReq)(nil), // 10: game.RoleClearItemsReq + (*RoleStartBattleReq)(nil), // 11: game.RoleStartBattleReq + (*RoleEndBattleReq)(nil), // 12: game.RoleEndBattleReq + (*RoleEndBattleRsp)(nil), // 13: game.RoleEndBattleRsp + (*EquipmentDelReq)(nil), // 14: game.EquipmentDelReq + (*EquipmentAddRsp)(nil), // 15: game.EquipmentAddRsp + (*Team)(nil), // 16: models.Team + (*Role)(nil), // 17: models.Role + (*Hero)(nil), // 18: models.Hero + (*Equipment)(nil), // 19: models.Equipment } var file_game_proto_depIdxs = []int32{ - 15, // 0: game.ChangeTeamReq.team:type_name -> models.Team - 16, // 1: game.RoleRsp.role:type_name -> models.Role - 17, // 2: game.RoleRsp.hero:type_name -> models.Hero - 15, // 3: game.RoleRsp.team:type_name -> models.Team - 18, // 4: game.RoleRsp.equipments:type_name -> models.Equipment - 16, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role - 17, // 6: game.RoleEndBattleRsp.hero:type_name -> models.Hero - 18, // 7: game.EquipmentAddRsp.equip:type_name -> models.Equipment + 16, // 0: game.ChangeTeamReq.team:type_name -> models.Team + 17, // 1: game.RoleRsp.role:type_name -> models.Role + 18, // 2: game.RoleRsp.hero:type_name -> models.Hero + 16, // 3: game.RoleRsp.team:type_name -> models.Team + 19, // 4: game.RoleRsp.equipments:type_name -> models.Equipment + 17, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role + 18, // 6: game.RoleEndBattleRsp.hero:type_name -> models.Hero + 19, // 7: game.EquipmentAddRsp.equip:type_name -> models.Equipment 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -1057,7 +1098,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeTeamReq); i { + switch v := v.(*DisConnectRsp); i { case 0: return &v.state case 1: @@ -1069,7 +1110,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroEquipReferReq); i { + switch v := v.(*ChangeTeamReq); i { case 0: return &v.state case 1: @@ -1081,7 +1122,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleRsp); i { + switch v := v.(*HeroEquipReferReq); i { case 0: return &v.state case 1: @@ -1093,7 +1134,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleUpdatePropertyRsp); i { + switch v := v.(*RoleRsp); i { case 0: return &v.state case 1: @@ -1105,7 +1146,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleUpdateItemsRsp); i { + switch v := v.(*RoleUpdatePropertyRsp); i { case 0: return &v.state case 1: @@ -1117,7 +1158,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleClearItemsReq); i { + switch v := v.(*RoleUpdateItemsRsp); i { case 0: return &v.state case 1: @@ -1129,7 +1170,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleStartBattleReq); i { + switch v := v.(*RoleClearItemsReq); i { case 0: return &v.state case 1: @@ -1141,7 +1182,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleEndBattleReq); i { + switch v := v.(*RoleStartBattleReq); i { case 0: return &v.state case 1: @@ -1153,7 +1194,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoleEndBattleRsp); i { + switch v := v.(*RoleEndBattleReq); i { case 0: return &v.state case 1: @@ -1165,7 +1206,7 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipmentDelReq); i { + switch v := v.(*RoleEndBattleRsp); i { case 0: return &v.state case 1: @@ -1177,6 +1218,18 @@ func file_game_proto_init() { } } file_game_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EquipmentDelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EquipmentAddRsp); i { case 0: return &v.state @@ -1195,7 +1248,7 @@ func file_game_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/models.pb.go b/pb/models.pb.go index d9dbd4e..05f1e5e 100644 --- a/pb/models.pb.go +++ b/pb/models.pb.go @@ -95,7 +95,7 @@ type Hero struct { ReinCount int32 `protobuf:"varint,5,opt,name=rein_count,json=reinCount,proto3" json:"rein_count,omitempty"` ReinPoint int32 `protobuf:"varint,6,opt,name=rein_point,json=reinPoint,proto3" json:"rein_point,omitempty"` Equipments string `protobuf:"bytes,7,opt,name=equipments,proto3" json:"equipments,omitempty"` //"id=type id1=type1" - Exp int64 `protobuf:"varint,8,opt,name=exp,proto3" json:"exp,omitempty"` + Exp int32 `protobuf:"varint,8,opt,name=exp,proto3" json:"exp,omitempty"` } func (x *Hero) Reset() { @@ -179,7 +179,7 @@ func (x *Hero) GetEquipments() string { return "" } -func (x *Hero) GetExp() int64 { +func (x *Hero) GetExp() int32 { if x != nil { return x.Exp } @@ -674,7 +674,7 @@ var file_models_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, + 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, diff --git a/pb/protocode.pb.go b/pb/protocode.pb.go index f613576..ba185de 100644 --- a/pb/protocode.pb.go +++ b/pb/protocode.pb.go @@ -29,17 +29,18 @@ const ( ProtoCode_HeartRsp ProtoCode = 3 ProtoCode_LoginReq ProtoCode = 4 ProtoCode_CreateReq ProtoCode = 5 - ProtoCode_ChangeTeamReq ProtoCode = 6 - ProtoCode_HeroEquipReferReq ProtoCode = 7 - ProtoCode_RoleRsp ProtoCode = 8 - ProtoCode_RoleUpdatePropertyRsp ProtoCode = 9 - ProtoCode_RoleUpdateItemsRsp ProtoCode = 10 - ProtoCode_RoleClearItemsReq ProtoCode = 11 - ProtoCode_RoleStartBattleReq ProtoCode = 12 - ProtoCode_RoleEndBattleReq ProtoCode = 13 - ProtoCode_RoleEndBattleRsp ProtoCode = 14 - ProtoCode_EquipmentDelReq ProtoCode = 15 - ProtoCode_EquipmentAddRsp ProtoCode = 16 + ProtoCode_DisConnectRsp ProtoCode = 6 + ProtoCode_ChangeTeamReq ProtoCode = 7 + ProtoCode_HeroEquipReferReq ProtoCode = 8 + ProtoCode_RoleRsp ProtoCode = 9 + ProtoCode_RoleUpdatePropertyRsp ProtoCode = 10 + ProtoCode_RoleUpdateItemsRsp ProtoCode = 11 + ProtoCode_RoleClearItemsReq ProtoCode = 12 + ProtoCode_RoleStartBattleReq ProtoCode = 13 + ProtoCode_RoleEndBattleReq ProtoCode = 14 + ProtoCode_RoleEndBattleRsp ProtoCode = 15 + ProtoCode_EquipmentDelReq ProtoCode = 16 + ProtoCode_EquipmentAddRsp ProtoCode = 17 ) // Enum value maps for ProtoCode. @@ -51,17 +52,18 @@ var ( 3: "HeartRsp", 4: "LoginReq", 5: "CreateReq", - 6: "ChangeTeamReq", - 7: "HeroEquipReferReq", - 8: "RoleRsp", - 9: "RoleUpdatePropertyRsp", - 10: "RoleUpdateItemsRsp", - 11: "RoleClearItemsReq", - 12: "RoleStartBattleReq", - 13: "RoleEndBattleReq", - 14: "RoleEndBattleRsp", - 15: "EquipmentDelReq", - 16: "EquipmentAddRsp", + 6: "DisConnectRsp", + 7: "ChangeTeamReq", + 8: "HeroEquipReferReq", + 9: "RoleRsp", + 10: "RoleUpdatePropertyRsp", + 11: "RoleUpdateItemsRsp", + 12: "RoleClearItemsReq", + 13: "RoleStartBattleReq", + 14: "RoleEndBattleReq", + 15: "RoleEndBattleRsp", + 16: "EquipmentDelReq", + 17: "EquipmentAddRsp", } ProtoCode_value = map[string]int32{ "UNKNOWN": 0, @@ -70,17 +72,18 @@ var ( "HeartRsp": 3, "LoginReq": 4, "CreateReq": 5, - "ChangeTeamReq": 6, - "HeroEquipReferReq": 7, - "RoleRsp": 8, - "RoleUpdatePropertyRsp": 9, - "RoleUpdateItemsRsp": 10, - "RoleClearItemsReq": 11, - "RoleStartBattleReq": 12, - "RoleEndBattleReq": 13, - "RoleEndBattleRsp": 14, - "EquipmentDelReq": 15, - "EquipmentAddRsp": 16, + "DisConnectRsp": 6, + "ChangeTeamReq": 7, + "HeroEquipReferReq": 8, + "RoleRsp": 9, + "RoleUpdatePropertyRsp": 10, + "RoleUpdateItemsRsp": 11, + "RoleClearItemsReq": 12, + "RoleStartBattleReq": 13, + "RoleEndBattleReq": 14, + "RoleEndBattleRsp": 15, + "EquipmentDelReq": 16, + "EquipmentAddRsp": 17, } ) @@ -115,30 +118,31 @@ var File_protocode_proto protoreflect.FileDescriptor var file_protocode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xce, 0x02, 0x0a, + 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xe1, 0x02, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x73, 0x70, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x10, 0x05, 0x12, 0x11, - 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x10, - 0x06, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x73, 0x70, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, 0x70, 0x10, 0x09, - 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, - 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x10, 0x0b, 0x12, - 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, - 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0d, 0x12, 0x14, 0x0a, - 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, - 0x70, 0x10, 0x0e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, - 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x10, 0x42, 0x0a, 0x5a, - 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x73, 0x70, 0x10, + 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, + 0x70, 0x52, 0x65, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x10, 0x09, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, + 0x70, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x52, + 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0d, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x6f, + 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0e, + 0x12, 0x14, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x52, 0x73, 0x70, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x10, 0x10, 0x12, 0x13, 0x0a, 0x0f, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x11, + 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protos b/protos index aac4a98..0157426 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit aac4a98512069d7ea74a88fd61637b59e7345bff +Subproject commit 015742626c9deaa014003202fa6981a3fa9f9df9 -- libgit2 0.21.2