Commit d691a0e09e1c178e14c85d55123a26e87d868041
1 parent
6f599ad8
feat: add store
Showing
3 changed files
with
39 additions
and
18 deletions
Show diff stats
game.proto
... | ... | @@ -140,3 +140,18 @@ message EmailDelRsp { |
140 | 140 | message EmailNewNty { |
141 | 141 | models.Email email = 1; |
142 | 142 | } |
143 | + | |
144 | +message StoreBuyReq { | |
145 | + int32 typ = 1; | |
146 | + int32 id = 2; | |
147 | + int32 count = 3; | |
148 | +} | |
149 | + | |
150 | +message StoreBuyRsp { | |
151 | + string reward = 1; | |
152 | +} | |
153 | + | |
154 | +message StoreUpdatePropertyNty { | |
155 | + repeated string keys = 1; // 键 名字 | |
156 | + models.Store store = 2; | |
157 | +} | |
143 | 158 | \ No newline at end of file | ... | ... |
models.proto
... | ... | @@ -85,6 +85,12 @@ message Increment { |
85 | 85 | int64 val = 2; |
86 | 86 | } |
87 | 87 | |
88 | +message Store { | |
89 | + string id = 1; // @inject_tag: index:"unique" pri:"1" | |
90 | + map<string, int32> buy_r =2; // buy item by gold | |
91 | + map<string, int32> pay_r =3; // buy item by money | |
92 | +} | |
93 | + | |
88 | 94 | message Role { |
89 | 95 | string id = 1; // @inject_tag: index:"unique" pri:"1" |
90 | 96 | string uid = 2; // @inject_tag: index:"unique" |
... | ... | @@ -95,22 +101,20 @@ message Role { |
95 | 101 | |
96 | 102 | int64 hp = 7; |
97 | 103 | int64 hp_max = 8; |
98 | - string buy_r = 9; | |
99 | - string pay_r = 10; | |
100 | - bool del = 11; | |
101 | - map<string,uint32> incres = 12; | |
102 | - | |
103 | - string items = 13;//物品 "id=count id2=count2" | |
104 | - uint32 clotheslimit = 14; | |
105 | - uint32 weaponslimit = 15; | |
106 | - uint32 otherlimit = 16; | |
107 | - uint32 jewelrylimit = 17; | |
108 | - uint32 materiallimit = 18; | |
109 | - | |
110 | - map<int32,int32> passchapters = 19; // 通关记录 | |
111 | - map<int32,int32> time_reset = 20; // 重置记录 {1=1,2=1,3=1} 1=CrossDay,2=CrossWeek,3=CrossMonth | |
112 | - | |
113 | - map<int32,int32> daily_task = 21; | |
114 | - map<int32,int32> week_task = 22; | |
115 | - map<int32,int32> month_task = 23; | |
104 | + bool del = 9; | |
105 | + map<string,uint32> incres = 10; | |
106 | + | |
107 | + string items = 11;//物品 "id=count id2=count2" | |
108 | + uint32 clotheslimit = 12; | |
109 | + uint32 weaponslimit = 13; | |
110 | + uint32 otherlimit = 14; | |
111 | + uint32 jewelrylimit = 15; | |
112 | + uint32 materiallimit = 16; | |
113 | + | |
114 | + map<int32,int32> passchapters = 17; // 通关记录 | |
115 | + map<int32,int32> time_reset = 18; // 重置记录 {1=1,2=1,3=1} 1=CrossDay,2=CrossWeek,3=CrossMonth | |
116 | + | |
117 | + map<int32,int32> daily_task = 19; | |
118 | + map<int32,int32> week_task = 20; | |
119 | + map<int32,int32> month_task = 21; | |
116 | 120 | } |
117 | 121 | \ No newline at end of file | ... | ... |
protocode.proto
... | ... | @@ -21,12 +21,14 @@ enum ProtoCode |
21 | 21 | EmailDrawRpc = 513; |
22 | 22 | EmailCheckRpc = 514; |
23 | 23 | EmailDelRpc = 515; |
24 | + StoreBuyRpc = 516; | |
24 | 25 | |
25 | 26 | DisConnectNty = 1001; |
26 | 27 | RoleUpdatePropertyNty = 1002; |
27 | 28 | RoleUpdateItemsNty = 1003; |
28 | 29 | EquipmentAddNty = 1004; |
29 | 30 | EmailNewNty = 1005; |
31 | + StoreUpdatePropertyNty = 1006; | |
30 | 32 | |
31 | 33 | |
32 | 34 | ... | ... |