Commit 51d48d119340593ff8a9d67e1fcdab04ba540f68
1 parent
84316161
fix: 删除装备 删除物品请求
Showing
5 changed files
with
175 additions
and
90 deletions
Show diff stats
cmd/gameserver/action/GmAction.go
1 | 1 | package action |
2 | 2 | |
3 | 3 | import ( |
4 | - "github.com/golang/protobuf/proto" | |
5 | - "pro2d/common/db/mongoproxy" | |
6 | 4 | "pro2d/common/logger" |
7 | 5 | "pro2d/models" |
8 | 6 | "pro2d/pb" |
... | ... | @@ -31,32 +29,3 @@ func (gm *GmAction) AddEquip(role *models.RoleModel, params ...interface{}) { |
31 | 29 | } |
32 | 30 | role.AddEquip(equip) |
33 | 31 | } |
34 | - | |
35 | -func (gm *GmAction) DelEquip(role *models.RoleModel, params ...interface{}) { | |
36 | - logger.Debug(params) | |
37 | - id := params[0].(string) | |
38 | - if err := mongoproxy.DelOne("equip", "id", id); err != nil { | |
39 | - logger.Error(err.Error()) | |
40 | - return | |
41 | - } | |
42 | - delete(role.Equipments, id) | |
43 | - update := &pb.EquipmentDelRsp{Id: id} | |
44 | - if rsp, err := proto.Marshal(update); err != nil { | |
45 | - logger.Error(" err:", err.Error()) | |
46 | - return | |
47 | - } else { | |
48 | - if role.GetConn() != nil { | |
49 | - role.GetConn().SendSuccess(uint32(pb.ProtoCode_EquipmentDelRsp), rsp) | |
50 | - } | |
51 | - } | |
52 | -} | |
53 | - | |
54 | -func (gm *GmAction) DelItem(role *models.RoleModel, params ...interface{}) { | |
55 | - logger.Debug(params) | |
56 | - id := params[0].(string) | |
57 | - count := params[1].(int32) | |
58 | - | |
59 | - if !role.CostItem(id, count) { | |
60 | - logger.Error("item cost error: ", id) | |
61 | - } | |
62 | -} | ... | ... |
cmd/gameserver/action/RoleAction.go
... | ... | @@ -5,6 +5,7 @@ import ( |
5 | 5 | "github.com/golang/protobuf/proto" |
6 | 6 | "pro2d/common" |
7 | 7 | "pro2d/common/components" |
8 | + "pro2d/common/db/mongoproxy" | |
8 | 9 | "pro2d/common/db/redisproxy" |
9 | 10 | "pro2d/common/logger" |
10 | 11 | "pro2d/models" |
... | ... | @@ -148,3 +149,41 @@ func HeroEquipReferRpc(agent components.IAgent, msg components.IMessage) (int32, |
148 | 149 | } |
149 | 150 | return 0, nil |
150 | 151 | } |
152 | + | |
153 | +func RoleClearItemsRpc(agent components.IAgent, msg components.IMessage) (int32, interface{}) { | |
154 | + req := pb.RoleClearItemsReq{} | |
155 | + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { | |
156 | + logger.Error("loginRpc err: %v", err) | |
157 | + return 1, nil | |
158 | + } | |
159 | + role := agent.GetSchema().(*models.RoleModel) | |
160 | + if role == nil { | |
161 | + return 2, nil | |
162 | + } | |
163 | + | |
164 | + if !role.CostItem(req.Id, req.Count) { | |
165 | + logger.Error("cost err: %s, %d", req.Id, req.Count) | |
166 | + return 3, nil | |
167 | + } | |
168 | + return 0, nil | |
169 | +} | |
170 | + | |
171 | +func EquipmentDelRpc(agent components.IAgent, msg components.IMessage) (int32, interface{}) { | |
172 | + req := pb.EquipmentDelReq{} | |
173 | + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { | |
174 | + logger.Error("loginRpc err: %v", err) | |
175 | + return 1, nil | |
176 | + } | |
177 | + role := agent.GetSchema().(*models.RoleModel) | |
178 | + if role == nil { | |
179 | + return 2, nil | |
180 | + } | |
181 | + | |
182 | + if err := mongoproxy.DelOne("equip", "id", req.Id); err != nil { | |
183 | + logger.Error(err.Error()) | |
184 | + return 3, nil | |
185 | + } | |
186 | + delete(role.Equipments, req.Id) | |
187 | + | |
188 | + return 0, nil | |
189 | +} | ... | ... |
cmd/gameserver/action/protocode.go
... | ... | @@ -13,6 +13,8 @@ func GetActionMap() map[interface{}]interface{} { |
13 | 13 | am[uint32(pb.ProtoCode_CreateReq)] = CreateRpc |
14 | 14 | am[uint32(pb.ProtoCode_ChangeTeamReq)] = ChangeTeamRpc |
15 | 15 | am[uint32(pb.ProtoCode_HeroEquipReferReq)] = HeroEquipReferRpc |
16 | + am[uint32(pb.ProtoCode_RoleClearItemsReq)] = RoleClearItemsRpc | |
17 | + am[uint32(pb.ProtoCode_EquipmentDelReq)] = EquipmentDelRpc | |
16 | 18 | |
17 | 19 | return am |
18 | 20 | } | ... | ... |
pb/game.pb.go
... | ... | @@ -514,17 +514,17 @@ func (x *RoleUpdateItemsRsp) GetItems() string { |
514 | 514 | return "" |
515 | 515 | } |
516 | 516 | |
517 | -//ResponseCmd EquipmentAddRsp | |
518 | -type EquipmentAddRsp struct { | |
517 | +type RoleClearItemsReq struct { | |
519 | 518 | state protoimpl.MessageState |
520 | 519 | sizeCache protoimpl.SizeCache |
521 | 520 | unknownFields protoimpl.UnknownFields |
522 | 521 | |
523 | - Equip *Equipment `protobuf:"bytes,1,opt,name=equip,proto3" json:"equip,omitempty"` | |
522 | + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` | |
523 | + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` | |
524 | 524 | } |
525 | 525 | |
526 | -func (x *EquipmentAddRsp) Reset() { | |
527 | - *x = EquipmentAddRsp{} | |
526 | +func (x *RoleClearItemsReq) Reset() { | |
527 | + *x = RoleClearItemsReq{} | |
528 | 528 | if protoimpl.UnsafeEnabled { |
529 | 529 | mi := &file_game_proto_msgTypes[9] |
530 | 530 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -532,13 +532,13 @@ func (x *EquipmentAddRsp) Reset() { |
532 | 532 | } |
533 | 533 | } |
534 | 534 | |
535 | -func (x *EquipmentAddRsp) String() string { | |
535 | +func (x *RoleClearItemsReq) String() string { | |
536 | 536 | return protoimpl.X.MessageStringOf(x) |
537 | 537 | } |
538 | 538 | |
539 | -func (*EquipmentAddRsp) ProtoMessage() {} | |
539 | +func (*RoleClearItemsReq) ProtoMessage() {} | |
540 | 540 | |
541 | -func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | |
541 | +func (x *RoleClearItemsReq) ProtoReflect() protoreflect.Message { | |
542 | 542 | mi := &file_game_proto_msgTypes[9] |
543 | 543 | if protoimpl.UnsafeEnabled && x != nil { |
544 | 544 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -550,19 +550,26 @@ func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { |
550 | 550 | return mi.MessageOf(x) |
551 | 551 | } |
552 | 552 | |
553 | -// Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. | |
554 | -func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { | |
553 | +// Deprecated: Use RoleClearItemsReq.ProtoReflect.Descriptor instead. | |
554 | +func (*RoleClearItemsReq) Descriptor() ([]byte, []int) { | |
555 | 555 | return file_game_proto_rawDescGZIP(), []int{9} |
556 | 556 | } |
557 | 557 | |
558 | -func (x *EquipmentAddRsp) GetEquip() *Equipment { | |
558 | +func (x *RoleClearItemsReq) GetId() string { | |
559 | 559 | if x != nil { |
560 | - return x.Equip | |
560 | + return x.Id | |
561 | 561 | } |
562 | - return nil | |
562 | + return "" | |
563 | +} | |
564 | + | |
565 | +func (x *RoleClearItemsReq) GetCount() int32 { | |
566 | + if x != nil { | |
567 | + return x.Count | |
568 | + } | |
569 | + return 0 | |
563 | 570 | } |
564 | 571 | |
565 | -type EquipmentDelRsp struct { | |
572 | +type EquipmentDelReq struct { | |
566 | 573 | state protoimpl.MessageState |
567 | 574 | sizeCache protoimpl.SizeCache |
568 | 575 | unknownFields protoimpl.UnknownFields |
... | ... | @@ -570,8 +577,8 @@ type EquipmentDelRsp struct { |
570 | 577 | Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` |
571 | 578 | } |
572 | 579 | |
573 | -func (x *EquipmentDelRsp) Reset() { | |
574 | - *x = EquipmentDelRsp{} | |
580 | +func (x *EquipmentDelReq) Reset() { | |
581 | + *x = EquipmentDelReq{} | |
575 | 582 | if protoimpl.UnsafeEnabled { |
576 | 583 | mi := &file_game_proto_msgTypes[10] |
577 | 584 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -579,13 +586,13 @@ func (x *EquipmentDelRsp) Reset() { |
579 | 586 | } |
580 | 587 | } |
581 | 588 | |
582 | -func (x *EquipmentDelRsp) String() string { | |
589 | +func (x *EquipmentDelReq) String() string { | |
583 | 590 | return protoimpl.X.MessageStringOf(x) |
584 | 591 | } |
585 | 592 | |
586 | -func (*EquipmentDelRsp) ProtoMessage() {} | |
593 | +func (*EquipmentDelReq) ProtoMessage() {} | |
587 | 594 | |
588 | -func (x *EquipmentDelRsp) ProtoReflect() protoreflect.Message { | |
595 | +func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { | |
589 | 596 | mi := &file_game_proto_msgTypes[10] |
590 | 597 | if protoimpl.UnsafeEnabled && x != nil { |
591 | 598 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -597,18 +604,66 @@ func (x *EquipmentDelRsp) ProtoReflect() protoreflect.Message { |
597 | 604 | return mi.MessageOf(x) |
598 | 605 | } |
599 | 606 | |
600 | -// Deprecated: Use EquipmentDelRsp.ProtoReflect.Descriptor instead. | |
601 | -func (*EquipmentDelRsp) Descriptor() ([]byte, []int) { | |
607 | +// Deprecated: Use EquipmentDelReq.ProtoReflect.Descriptor instead. | |
608 | +func (*EquipmentDelReq) Descriptor() ([]byte, []int) { | |
602 | 609 | return file_game_proto_rawDescGZIP(), []int{10} |
603 | 610 | } |
604 | 611 | |
605 | -func (x *EquipmentDelRsp) GetId() string { | |
612 | +func (x *EquipmentDelReq) GetId() string { | |
606 | 613 | if x != nil { |
607 | 614 | return x.Id |
608 | 615 | } |
609 | 616 | return "" |
610 | 617 | } |
611 | 618 | |
619 | +//ResponseCmd EquipmentAddRsp | |
620 | +type EquipmentAddRsp struct { | |
621 | + state protoimpl.MessageState | |
622 | + sizeCache protoimpl.SizeCache | |
623 | + unknownFields protoimpl.UnknownFields | |
624 | + | |
625 | + Equip *Equipment `protobuf:"bytes,1,opt,name=equip,proto3" json:"equip,omitempty"` | |
626 | +} | |
627 | + | |
628 | +func (x *EquipmentAddRsp) Reset() { | |
629 | + *x = EquipmentAddRsp{} | |
630 | + if protoimpl.UnsafeEnabled { | |
631 | + mi := &file_game_proto_msgTypes[11] | |
632 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
633 | + ms.StoreMessageInfo(mi) | |
634 | + } | |
635 | +} | |
636 | + | |
637 | +func (x *EquipmentAddRsp) String() string { | |
638 | + return protoimpl.X.MessageStringOf(x) | |
639 | +} | |
640 | + | |
641 | +func (*EquipmentAddRsp) ProtoMessage() {} | |
642 | + | |
643 | +func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | |
644 | + mi := &file_game_proto_msgTypes[11] | |
645 | + if protoimpl.UnsafeEnabled && x != nil { | |
646 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
647 | + if ms.LoadMessageInfo() == nil { | |
648 | + ms.StoreMessageInfo(mi) | |
649 | + } | |
650 | + return ms | |
651 | + } | |
652 | + return mi.MessageOf(x) | |
653 | +} | |
654 | + | |
655 | +// Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. | |
656 | +func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { | |
657 | + return file_game_proto_rawDescGZIP(), []int{11} | |
658 | +} | |
659 | + | |
660 | +func (x *EquipmentAddRsp) GetEquip() *Equipment { | |
661 | + if x != nil { | |
662 | + return x.Equip | |
663 | + } | |
664 | + return nil | |
665 | +} | |
666 | + | |
612 | 667 | var File_game_proto protoreflect.FileDescriptor |
613 | 668 | |
614 | 669 | var file_game_proto_rawDesc = []byte{ |
... | ... | @@ -652,14 +707,17 @@ var file_game_proto_rawDesc = []byte{ |
652 | 707 | 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, |
653 | 708 | 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, |
654 | 709 | 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, |
655 | - 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, | |
656 | - 0x64, 0x64, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, | |
657 | - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, | |
658 | - 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x22, 0x21, | |
659 | - 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x73, | |
660 | - 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, | |
661 | - 0x64, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, | |
662 | - 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
710 | + 0x6d, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, | |
711 | + 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, | |
712 | + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, | |
713 | + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x21, 0x0a, | |
714 | + 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, | |
715 | + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, | |
716 | + 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, | |
717 | + 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, | |
718 | + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, | |
719 | + 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x42, 0x0a, 0x5a, 0x08, | |
720 | + 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
663 | 721 | } |
664 | 722 | |
665 | 723 | var ( |
... | ... | @@ -674,7 +732,7 @@ func file_game_proto_rawDescGZIP() []byte { |
674 | 732 | return file_game_proto_rawDescData |
675 | 733 | } |
676 | 734 | |
677 | -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 11) | |
735 | +var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 12) | |
678 | 736 | var file_game_proto_goTypes = []interface{}{ |
679 | 737 | (*HeartReq)(nil), // 0: game.HeartReq |
680 | 738 | (*HeartRsp)(nil), // 1: game.HeartRsp |
... | ... | @@ -685,21 +743,22 @@ var file_game_proto_goTypes = []interface{}{ |
685 | 743 | (*RoleRsp)(nil), // 6: game.RoleRsp |
686 | 744 | (*RoleUpdatePropertyRsp)(nil), // 7: game.RoleUpdatePropertyRsp |
687 | 745 | (*RoleUpdateItemsRsp)(nil), // 8: game.RoleUpdateItemsRsp |
688 | - (*EquipmentAddRsp)(nil), // 9: game.EquipmentAddRsp | |
689 | - (*EquipmentDelRsp)(nil), // 10: game.EquipmentDelRsp | |
690 | - (*Team)(nil), // 11: models.Team | |
691 | - (*Role)(nil), // 12: models.Role | |
692 | - (*Hero)(nil), // 13: models.Hero | |
693 | - (*Equipment)(nil), // 14: models.Equipment | |
746 | + (*RoleClearItemsReq)(nil), // 9: game.RoleClearItemsReq | |
747 | + (*EquipmentDelReq)(nil), // 10: game.EquipmentDelReq | |
748 | + (*EquipmentAddRsp)(nil), // 11: game.EquipmentAddRsp | |
749 | + (*Team)(nil), // 12: models.Team | |
750 | + (*Role)(nil), // 13: models.Role | |
751 | + (*Hero)(nil), // 14: models.Hero | |
752 | + (*Equipment)(nil), // 15: models.Equipment | |
694 | 753 | } |
695 | 754 | var file_game_proto_depIdxs = []int32{ |
696 | - 11, // 0: game.ChangeTeamReq.team:type_name -> models.Team | |
697 | - 12, // 1: game.RoleRsp.role:type_name -> models.Role | |
698 | - 13, // 2: game.RoleRsp.hero:type_name -> models.Hero | |
699 | - 11, // 3: game.RoleRsp.team:type_name -> models.Team | |
700 | - 14, // 4: game.RoleRsp.equipments:type_name -> models.Equipment | |
701 | - 12, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role | |
702 | - 14, // 6: game.EquipmentAddRsp.equip:type_name -> models.Equipment | |
755 | + 12, // 0: game.ChangeTeamReq.team:type_name -> models.Team | |
756 | + 13, // 1: game.RoleRsp.role:type_name -> models.Role | |
757 | + 14, // 2: game.RoleRsp.hero:type_name -> models.Hero | |
758 | + 12, // 3: game.RoleRsp.team:type_name -> models.Team | |
759 | + 15, // 4: game.RoleRsp.equipments:type_name -> models.Equipment | |
760 | + 13, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role | |
761 | + 15, // 6: game.EquipmentAddRsp.equip:type_name -> models.Equipment | |
703 | 762 | 7, // [7:7] is the sub-list for method output_type |
704 | 763 | 7, // [7:7] is the sub-list for method input_type |
705 | 764 | 7, // [7:7] is the sub-list for extension type_name |
... | ... | @@ -823,7 +882,7 @@ func file_game_proto_init() { |
823 | 882 | } |
824 | 883 | } |
825 | 884 | file_game_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { |
826 | - switch v := v.(*EquipmentAddRsp); i { | |
885 | + switch v := v.(*RoleClearItemsReq); i { | |
827 | 886 | case 0: |
828 | 887 | return &v.state |
829 | 888 | case 1: |
... | ... | @@ -835,7 +894,19 @@ func file_game_proto_init() { |
835 | 894 | } |
836 | 895 | } |
837 | 896 | file_game_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { |
838 | - switch v := v.(*EquipmentDelRsp); i { | |
897 | + switch v := v.(*EquipmentDelReq); i { | |
898 | + case 0: | |
899 | + return &v.state | |
900 | + case 1: | |
901 | + return &v.sizeCache | |
902 | + case 2: | |
903 | + return &v.unknownFields | |
904 | + default: | |
905 | + return nil | |
906 | + } | |
907 | + } | |
908 | + file_game_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { | |
909 | + switch v := v.(*EquipmentAddRsp); i { | |
839 | 910 | case 0: |
840 | 911 | return &v.state |
841 | 912 | case 1: |
... | ... | @@ -853,7 +924,7 @@ func file_game_proto_init() { |
853 | 924 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
854 | 925 | RawDescriptor: file_game_proto_rawDesc, |
855 | 926 | NumEnums: 0, |
856 | - NumMessages: 11, | |
927 | + NumMessages: 12, | |
857 | 928 | NumExtensions: 0, |
858 | 929 | NumServices: 0, |
859 | 930 | }, | ... | ... |
pb/protocode.pb.go
... | ... | @@ -34,8 +34,9 @@ const ( |
34 | 34 | ProtoCode_RoleRsp ProtoCode = 8 |
35 | 35 | ProtoCode_RoleUpdatePropertyRsp ProtoCode = 9 |
36 | 36 | ProtoCode_RoleUpdateItemsRsp ProtoCode = 10 |
37 | - ProtoCode_EquipmentAddRsp ProtoCode = 11 | |
38 | - ProtoCode_EquipmentDelRsp ProtoCode = 12 | |
37 | + ProtoCode_RoleClearItemsReq ProtoCode = 11 | |
38 | + ProtoCode_EquipmentDelReq ProtoCode = 12 | |
39 | + ProtoCode_EquipmentAddRsp ProtoCode = 13 | |
39 | 40 | ) |
40 | 41 | |
41 | 42 | // Enum value maps for ProtoCode. |
... | ... | @@ -52,8 +53,9 @@ var ( |
52 | 53 | 8: "RoleRsp", |
53 | 54 | 9: "RoleUpdatePropertyRsp", |
54 | 55 | 10: "RoleUpdateItemsRsp", |
55 | - 11: "EquipmentAddRsp", | |
56 | - 12: "EquipmentDelRsp", | |
56 | + 11: "RoleClearItemsReq", | |
57 | + 12: "EquipmentDelReq", | |
58 | + 13: "EquipmentAddRsp", | |
57 | 59 | } |
58 | 60 | ProtoCode_value = map[string]int32{ |
59 | 61 | "UNKNOWN": 0, |
... | ... | @@ -67,8 +69,9 @@ var ( |
67 | 69 | "RoleRsp": 8, |
68 | 70 | "RoleUpdatePropertyRsp": 9, |
69 | 71 | "RoleUpdateItemsRsp": 10, |
70 | - "EquipmentAddRsp": 11, | |
71 | - "EquipmentDelRsp": 12, | |
72 | + "RoleClearItemsReq": 11, | |
73 | + "EquipmentDelReq": 12, | |
74 | + "EquipmentAddRsp": 13, | |
72 | 75 | } |
73 | 76 | ) |
74 | 77 | |
... | ... | @@ -103,7 +106,7 @@ var File_protocode_proto protoreflect.FileDescriptor |
103 | 106 | |
104 | 107 | var file_protocode_proto_rawDesc = []byte{ |
105 | 108 | 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
106 | - 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xf3, 0x01, 0x0a, | |
109 | + 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x8a, 0x02, 0x0a, | |
107 | 110 | 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, |
108 | 111 | 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, |
109 | 112 | 0x52, 0x73, 0x70, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x65, |
... | ... | @@ -116,11 +119,12 @@ var file_protocode_proto_rawDesc = []byte{ |
116 | 119 | 0x52, 0x73, 0x70, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, |
117 | 120 | 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, 0x70, 0x10, 0x09, |
118 | 121 | 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, |
119 | - 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, | |
120 | - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x0b, 0x12, 0x13, 0x0a, | |
121 | - 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x73, 0x70, | |
122 | - 0x10, 0x0c, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, | |
123 | - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
122 | + 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, | |
123 | + 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x10, 0x0b, 0x12, | |
124 | + 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, | |
125 | + 0x65, 0x71, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, | |
126 | + 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x0d, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, | |
127 | + 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
124 | 128 | } |
125 | 129 | |
126 | 130 | var ( | ... | ... |