diff --git a/cmd/gameserver/service/game.go b/cmd/gameserver/service/game.go index af1cb22..1201ed0 100644 --- a/cmd/gameserver/service/game.go +++ b/cmd/gameserver/service/game.go @@ -1,7 +1,6 @@ package service import ( - "fmt" "math/rand" _ "net/http/pprof" "pro2d/cmd/gameserver/action" @@ -12,8 +11,6 @@ import ( "pro2d/common/logger" "pro2d/models" "time" - - "pro2d/common/etcd" ) type GameServer struct { @@ -57,11 +54,11 @@ func NewGameServer() (*GameServer, error) { } //Etcd 初始化 - err = etcd.NewEtcdClient(common.GlobalConf.Etcd) - if err != nil { - return nil, err - } - etcd.PutWithLeasePrefix(sconf.Name, fmt.Sprintf("%d", sconf.ID), fmt.Sprintf("%s:%d", sconf.IP, sconf.Port), 5) + //err = etcd.NewEtcdClient(common.GlobalConf.Etcd) + //if err != nil { + // return nil, err + //} + //etcd.PutWithLeasePrefix(sconf.Name, fmt.Sprintf("%d", sconf.ID), fmt.Sprintf("%s:%d", sconf.IP, sconf.Port), 5) //设置服务器ID & game models.NewDBSeed(sconf.ID).InitServerDatabase(models.GameModels()) @@ -92,7 +89,7 @@ func (s *GameServer) Stop() { mongoproxy.CloseMongo() redisproxy.CloseRedis() - etcd.CloseEtcd() + //etcd.CloseEtcd() } func (s *GameServer) OnConnection(conn components.IConnection) { diff --git a/cmd/httpserver/action/AccountAction.go b/cmd/httpserver/action/AccountAction.go index a3235c8..a7c9209 100644 --- a/cmd/httpserver/action/AccountAction.go +++ b/cmd/httpserver/action/AccountAction.go @@ -8,7 +8,6 @@ import ( "pro2d/cmd/httpserver/service" "pro2d/common" "pro2d/common/db/redisproxy" - "pro2d/common/etcd" "pro2d/common/logger" "pro2d/common/sms" "pro2d/models" @@ -84,17 +83,9 @@ func (h *AccountAction) Login(c *gin.Context) (int, interface{}) { return 3, "password error" } - var gs []*pb.ServiceInfo - for k, v := range etcd.GEtcdClient().GetByPrefix(common.GlobalConf.GameConf.Name) { - gs = append(gs, &pb.ServiceInfo{ - Id: k, - Name: common.GlobalConf.GameConf.Name, - Address: v, - }) - } rsp := &pb.LoginRsp{ Token: account.Uid, - GameService: gs, + GameService: common.GlobalConf.GameService.ServiceInfo, } return 0, rsp } diff --git a/cmd/httpserver/service/http.go b/cmd/httpserver/service/http.go index 0fa7825..fdbdcf9 100644 --- a/cmd/httpserver/service/http.go +++ b/cmd/httpserver/service/http.go @@ -1,13 +1,11 @@ package service import ( - "fmt" "math/rand" "pro2d/common" "pro2d/common/components" "pro2d/common/db/mongoproxy" "pro2d/common/db/redisproxy" - "pro2d/common/etcd" "pro2d/models" "time" ) @@ -33,11 +31,11 @@ func (s *AccountServer) Init(sconf *common.SConf) error { } //Etcd 初始化 - err = etcd.NewEtcdClient(common.GlobalConf.Etcd) - if err != nil { - return err - } - etcd.PutWithLeasePrefix(sconf.Name, fmt.Sprintf("%d", sconf.ID), fmt.Sprintf("%s:%d", sconf.IP, sconf.Port), 5) + //err = etcd.NewEtcdClient(common.GlobalConf.Etcd) + //if err != nil { + // return err + //} + //etcd.PutWithLeasePrefix(sconf.Name, fmt.Sprintf("%d", sconf.ID), fmt.Sprintf("%s:%d", sconf.IP, sconf.Port), 5) models.NewDBSeed(sconf.ID).InitServerDatabase(models.AccountModels()) models.DBSeedS().InitAutoIncreUidTable(models.AccountModels()) @@ -64,5 +62,5 @@ func (s *AccountServer) Start() error { func (s *AccountServer) Stop() { s.IHttp.Stop() - etcd.CloseEtcd() + //etcd.CloseEtcd() } diff --git a/common/conf.go b/common/conf.go index 9ec5b1e..f6294cc 100644 --- a/common/conf.go +++ b/common/conf.go @@ -6,7 +6,7 @@ import ( "gopkg.in/yaml.v3" "io/ioutil" "pro2d/common/logger" - "pro2d/common/snow" + "pro2d/pb" "strings" ) @@ -81,6 +81,10 @@ type TestClient struct { Count int `yaml:"count"` } +type GameService struct { + ServiceInfo []*pb.ServiceInfo `yaml:"server_list"` +} + type ServerConf struct { ID string `yaml:"id"` Name string `yaml:"name"` @@ -90,24 +94,38 @@ type ServerConf struct { GameConf *SConf `yaml:"server_game"` LogConf *LogConf `yaml:"logconf" json:"logconf"` TestClient *TestClient `yaml:"test_client"` - Etcd *Etcd `yaml:"etcd"` + //Etcd *Etcd `yaml:"etcd"` + GameService *GameService `yaml:"server_list"` } var ( GlobalConf ServerConf GlobalSconf *SConf - SnowFlack *snow.Snowflake + //SnowFlack *snow.Snowflake ) func init() { - configFile, err := ioutil.ReadFile("conf/conf.yaml") + configFile, err := ioutil.ReadFile("conf/conf.yml") + if err != nil { + fmt.Printf("conf read faild: %v", err) + return + } + + servList, err := ioutil.ReadFile("conf/serverlist.yml") if err != nil { - fmt.Printf("conf faild: %v", err) + fmt.Printf("serverlist read faild: %v\n", err) return } + //初始化配置 if err = yaml.Unmarshal(configFile, &GlobalConf); err != nil { - fmt.Printf("yaml unmarshal faild: %v", err) + fmt.Printf("config.yml unmarshal faild: %v\n", err) + return + } + + //游戏服务列表 + if err = yaml.Unmarshal(servList, &GlobalConf.GameService); err != nil { + fmt.Printf("serverlist.yml unmarshal faild: %v\n", err) return } @@ -124,5 +142,5 @@ func init() { } //初始化雪花算法 - SnowFlack = snow.NewSnowflake(GlobalConf.WorkerID, GlobalConf.DatacenterID) + //SnowFlack = snow.NewSnowflake(GlobalConf.WorkerID, GlobalConf.DatacenterID) } diff --git a/conf/conf.yaml b/conf/conf.yaml deleted file mode 100644 index d4dfb5a..0000000 --- a/conf/conf.yaml +++ /dev/null @@ -1,93 +0,0 @@ -develop: true -name: "Pro2DServer" -workerid: 1 -datacenterid: 1 - -mongo: &default-mongo - host: "192.168.0.100" - port: 27017 - user: "root" - password: "root" - timeout: 2 - maxnum: 50 - -redis: &default-redis - address: "192.168.0.100:6100" - auth: "" - -etcd: - dialtimeout: 5 - endpoints: - - "192.168.0.100:2379" - -server_account: - id: 1 - name: "account" - ip: "192.168.0.206" - port: 8080 - pool_size: 1 - debugport: 6062 - mongo: - <<: *default-mongo - dbname: "account" - redis: - <<: *default-redis - db: 0 - -server_game: - id: 1 - name: "game" - ip: "192.168.0.206" - encipher: false - port: 8849 - debugport: 6060 - gm: 8880 - pool_size: 1 - plugin_path: "./bin/plugin.so" - mongo: - <<: *default-mongo - dbname: "game" - redis: - <<: *default-redis - db: 0 - -server_game1: - id: 2 - name: "game" - ip: "192.168.0.206" - encipher: false - port: 8850 - debugport: 6061 - gm: 8881 - pool_size: 1 - plugin_path: "./bin/plugin.so" - mongo: - <<: *default-mongo - dbname: "game" - redis: - <<: *default-redis - db: 0 -test_client: - ip: "192.168.0.100" - port: 8849 - count: 1 - -logconf: - TimeFormat: "2006-01-02 15:04:05" - Console: - level: "TRAC" - color: true - File: - level: "TRAC" - daily: true - maxlines: 1000000 - maxsize: 1 - maxdays: -1 - append: true - permit: "0660" -# Conn: -# net: "tcp" -# addr: "127.0.0.1" -# level: "TRAC" -# reconnect: false -# reconnectOnMsg: false \ No newline at end of file diff --git a/conf/conf.yml b/conf/conf.yml new file mode 100644 index 0000000..533a4c7 --- /dev/null +++ b/conf/conf.yml @@ -0,0 +1,72 @@ +develop: true +name: "Pro2DServer" +workerid: 1 +datacenterid: 1 + +mongo: &default-mongo + host: "192.168.0.100" + port: 27017 + user: "root" + password: "root" + timeout: 2 + maxnum: 50 + +redis: &default-redis + address: "192.168.0.100:6100" + auth: "" + +#etcd: +# dialtimeout: 5 +# endpoints: +# - "192.168.0.100:2379" + +server_account: + id: 1 + name: "account" + ip: "192.168.0.206" + port: 8080 + pool_size: 1 + debugport: 6062 + mongo: + <<: *default-mongo + dbname: "account" + redis: + <<: *default-redis + db: 0 + +server_game: + id: 1 + name: "game" + ip: "192.168.0.206" + encipher: false + port: 8849 + debugport: 6060 + gm: 8880 + pool_size: 1 + plugin_path: "./bin/plugin.so" + mongo: + <<: *default-mongo + dbname: "game" + redis: + <<: *default-redis + db: 0 + +logconf: + TimeFormat: "2006-01-02 15:04:05" + Console: + level: "TRAC" + color: true + File: + level: "TRAC" + daily: true + maxlines: 1000000 + maxsize: 1 + maxdays: -1 + append: true + permit: "0660" +# Conn: +# net: "tcp" +# addr: "127.0.0.1" +# level: "TRAC" +# reconnect: false +# reconnectOnMsg: false \ No newline at end of file diff --git a/conf/serverlist.yml b/conf/serverlist.yml new file mode 100644 index 0000000..0cfa27f --- /dev/null +++ b/conf/serverlist.yml @@ -0,0 +1,11 @@ +server_list: + - id: "1" + name: "似海浮沉" + address: "47.118.38.251" + game_port: 8849 + gm_port: 8880 + - id: "2" + name: "西风一年" + address: "192.168.0.100" + game_port: 8849 + gm_port: 8880 \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 78f2fd6..92ca11c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,7 +19,8 @@ WORKDIR /data COPY --from=0 /usr/local/bin/http . COPY --from=0 /usr/local/bin/game . COPY csvdata/data ./csvdata/data -COPY ./docker/conf.yaml ./conf/ +COPY ./docker/conf.yml ./conf/ +COPY ./docker/serverlist.yml ./conf/ RUN mkdir -p /data/logs && \ diff --git a/docker/conf.yaml b/docker/conf.yaml deleted file mode 100644 index 4c11abd..0000000 --- a/docker/conf.yaml +++ /dev/null @@ -1,77 +0,0 @@ -develop: true -name: "Pro2DServer" -workerid: 1 -datacenterid: 1 - -mongo: &default-mongo - host: "host.docker.internal" - port: 27017 - user: "root" - password: "root" - timeout: 2 - maxnum: 50 - -redis: &default-redis - address: "host.docker.internal:6100" - auth: "" - -etcd: - dialtimeout: 5 - endpoints: - - "host.docker.internal:2379" - -server_account: - id: 1 - name: "account" - ip: "192.168.0.100" - port: 8080 - pool_size: 1 - debugport: 6060 - mongo: - <<: *default-mongo - dbname: "account" - redis: - <<: *default-redis - db: 0 - -server_game: - id: 1 - name: "game" - ip: "192.168.0.100" - encipher: false - port: 8849 - debugport: 6060 - gm: 8880 - pool_size: 1 - plugin_path: "./bin/plugin.so" - mongo: - <<: *default-mongo - dbname: "game" - redis: - <<: *default-redis - db: 0 - -test_client: - ip: "127.0.0.1" - port: 8849 - count: 1 - -logconf: - TimeFormat: "2006-01-02 15:04:05" - Console: - level: "TRAC" - color: true - File: - level: "TRAC" - daily: true - maxlines: 1000000 - maxsize: 1 - maxdays: -1 - append: true - permit: "0660" -# Conn: -# net: "tcp" -# addr: "127.0.0.1" -# level: "TRAC" -# reconnect: false -# reconnectOnMsg: false \ No newline at end of file diff --git a/docker/conf.yml b/docker/conf.yml new file mode 100644 index 0000000..668f21c --- /dev/null +++ b/docker/conf.yml @@ -0,0 +1,77 @@ +develop: true +name: "Pro2DServer" +workerid: 1 +datacenterid: 1 + +mongo: &default-mongo + host: "host.docker.internal" + port: 27017 + user: "root" + password: "root" + timeout: 2 + maxnum: 50 + +redis: &default-redis + address: "host.docker.internal:6100" + auth: "" + +etcd: + dialtimeout: 5 + endpoints: + - "host.docker.internal:2379" + +server_account: + id: 1 + name: "account" + ip: "47.118.38.251" + port: 8080 + pool_size: 1 + debugport: 6060 + mongo: + <<: *default-mongo + dbname: "account" + redis: + <<: *default-redis + db: 0 + +server_game: + id: 1 + name: "game" + ip: "47.118.38.251" + encipher: false + port: 8849 + debugport: 6060 + gm: 8880 + pool_size: 1 + plugin_path: "./bin/plugin.so" + mongo: + <<: *default-mongo + dbname: "game" + redis: + <<: *default-redis + db: 0 + +test_client: + ip: "127.0.0.1" + port: 8849 + count: 1 + +logconf: + TimeFormat: "2006-01-02 15:04:05" + Console: + level: "TRAC" + color: true + File: + level: "TRAC" + daily: true + maxlines: 1000000 + maxsize: 1 + maxdays: -1 + append: true + permit: "0660" +# Conn: +# net: "tcp" +# addr: "127.0.0.1" +# level: "TRAC" +# reconnect: false +# reconnectOnMsg: false \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a90cd46..fb110a4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -14,12 +14,12 @@ services: - ./.docker/mongo.conf:/data/mongo.conf # command: --config /data/mongo.conf # 配置文件 command: [--auth] # 配置文件 - etcd: - image: xieyanze/etcd3 - container_name: etcd3-pro2d - restart: always - ports: - - '2379:2379' +# etcd: +# image: xieyanze/etcd3 +# container_name: etcd3-pro2d +# restart: always +# ports: +# - '2379:2379' redis: image: redis:latest container_name: redis-pro2d @@ -38,7 +38,7 @@ services: - '6061:6060' #debug volumes: - ./.docker/account_logs:/data/logs - - ./conf.yaml:/data/conf/conf.yaml + - ./conf.yml:/data/conf/conf.yml working_dir: /data command: [./http] game: @@ -51,6 +51,6 @@ services: - '8880:8880' #gm volumes: - ./.docker/game_logs:/data/logs - - ./conf.yaml:/data/conf/conf.yaml + - ./conf.yml:/data/conf/conf.yml working_dir: /data command: [./game] diff --git a/docker/serverlist.yml b/docker/serverlist.yml new file mode 100644 index 0000000..0cfa27f --- /dev/null +++ b/docker/serverlist.yml @@ -0,0 +1,11 @@ +server_list: + - id: "1" + name: "似海浮沉" + address: "47.118.38.251" + game_port: 8849 + gm_port: 8880 + - id: "2" + name: "西风一年" + address: "192.168.0.100" + game_port: 8849 + gm_port: 8880 \ No newline at end of file diff --git a/pb/account.pb.go b/pb/account.pb.go index a3d0549..287201c 100644 --- a/pb/account.pb.go +++ b/pb/account.pb.go @@ -25,9 +25,11 @@ type ServiceInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + GamePort int32 `protobuf:"varint,4,opt,name=game_port,json=gamePort,proto3" json:"game_port,omitempty"` + GmPort int32 `protobuf:"varint,5,opt,name=gm_port,json=gmPort,proto3" json:"gm_port,omitempty"` } func (x *ServiceInfo) Reset() { @@ -83,6 +85,20 @@ func (x *ServiceInfo) GetAddress() string { return "" } +func (x *ServiceInfo) GetGamePort() int32 { + if x != nil { + return x.GamePort + } + return 0 +} + +func (x *ServiceInfo) GetGmPort() int32 { + if x != nil { + return x.GmPort + } + return 0 +} + type LoginRsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -205,24 +221,27 @@ var File_account_proto protoreflect.FileDescriptor var file_account_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4b, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x59, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x73, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x22, 0x50, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x61, 0x6d, 0x65, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x6d, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6d, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x59, 0x0a, 0x08, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, + 0x0a, 0x0c, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x67, 0x61, 0x6d, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x50, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, + 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/models.pb.go b/pb/models.pb.go index ce95c97..ba757c2 100644 --- a/pb/models.pb.go +++ b/pb/models.pb.go @@ -94,7 +94,7 @@ type Hero struct { Level int32 `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"` 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" + Equipments string `protobuf:"bytes,7,opt,name=equipments,proto3" json:"equipments,omitempty"` //"id=tb_id id1=tb_id1" Exp int32 `protobuf:"varint,8,opt,name=exp,proto3" json:"exp,omitempty"` } diff --git a/protos b/protos index a1d159b..b898565 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit a1d159bdae5ffc9b49220ec8f20ff3f6649cc349 +Subproject commit b89856524155c49f2aa3c598e2d39b7b38e94c5d -- libgit2 0.21.2