Commit 6cc8a5a6a18abe2e1f4ab3813d0cfea4fba91c28
1 parent
1a591d4b
feat: 增加装备相关数据和协议
1.models.hero型增加装备字段,models.Equipment增加hero_id字段。 2.增加穿戴装备,脱下装备协议HeroEquipReferReq 3.RoleRsp数据模型增加装备列表
Showing
3 changed files
with
17 additions
and
8 deletions
Show diff stats
game.proto
... | ... | @@ -31,10 +31,18 @@ message ChangeTeamReq { |
31 | 31 | repeated models.Team team = 1; |
32 | 32 | } |
33 | 33 | |
34 | +//ResponseCmd HeroEquipReferReq | |
35 | +message HeroEquipReferReq { | |
36 | + string equipId = 1; | |
37 | + string hero_id = 2; | |
38 | + bool refer = 3; //true 穿戴, false 脱下 | |
39 | +} | |
40 | + | |
34 | 41 | message RoleRsp { |
35 | 42 | models.Role role = 2; |
36 | 43 | repeated models.Hero hero = 3; |
37 | 44 | repeated models.Team team = 4; |
45 | + repeated models.Equipment equipments = 5; | |
38 | 46 | } |
39 | 47 | |
40 | 48 | //ResponseCmd RoleUpdatePropertyRsp | ... | ... |
models.proto
... | ... | @@ -17,15 +17,15 @@ message Hero { |
17 | 17 | int32 level = 4; |
18 | 18 | int32 rein_count = 5; |
19 | 19 | int32 rein_point = 6; |
20 | - string equipments = 7; | |
20 | + string equipments = 7; //"id=type id1=type1" | |
21 | 21 | } |
22 | 22 | |
23 | 23 | message Equipment { |
24 | 24 | string id = 1; // @inject_tag: index:"unique" pri:"1" |
25 | 25 | string role_id = 2; |
26 | - int64 type = 3; | |
27 | - bool equip = 4; | |
28 | - bool enhance_level = 5; | |
26 | + string type = 3; | |
27 | + int32 enhance_level = 4; | |
28 | + string hero_id = 5; | |
29 | 29 | } |
30 | 30 | |
31 | 31 | message Prop { |
... | ... | @@ -61,5 +61,5 @@ message Role { |
61 | 61 | bool del = 13; |
62 | 62 | map<string,uint32> incres = 14; |
63 | 63 | |
64 | - string items = 15; | |
64 | + string items = 15;//物品 "id=count id2=count2" | |
65 | 65 | } | ... | ... |
protocode.proto
... | ... | @@ -12,8 +12,9 @@ enum ProtoCode |
12 | 12 | LoginReq = 4; |
13 | 13 | CreateReq = 5; |
14 | 14 | ChangeTeamReq = 6; |
15 | - RoleRsp = 7; | |
16 | - RoleUpdatePropertyRsp = 8; | |
17 | - RoleUpdateItemsRsp = 9; | |
15 | + HeroEquipReferReq = 7; | |
16 | + RoleRsp = 8; | |
17 | + RoleUpdatePropertyRsp = 9; | |
18 | + RoleUpdateItemsRsp = 10; | |
18 | 19 | |
19 | 20 | } |
20 | 21 | \ No newline at end of file | ... | ... |