back_recharge
mashiyu 2019-01-23 11:33:31 +08:00
commit 9273cdd018
10 changed files with 621 additions and 258 deletions

View File

@ -1,252 +1,252 @@
Id Level CharacterLevelPara Consume Id Level CharacterLevelPara Consume
int int float mut,int#int,2 int int float mut,int#int,2
1 1 1 2#0|1100#0 1 1 1 2#500|1100#60
2 2 1 2#500|1100#60 2 2 1 2#600|1100#70
3 3 1 2#600|1100#70 3 3 1 2#700|1100#80
4 4 1 2#700|1100#80 4 4 1 2#800|1100#90
5 5 1 2#800|1100#90 5 5 1 2#900|1100#100
6 6 1 2#900|1100#100 6 6 1 2#1000|1100#110
7 7 1 2#1000|1100#110 7 7 1 2#1100|1100#120
8 8 1 2#1100|1100#120 8 8 1 2#1200|1100#130
9 9 1 2#1200|1100#130 9 9 1 2#1300|1100#140
10 10 1 2#1300|1100#140 10 10 1 2#1400|1100#150
11 11 1 2#1400|1100#150 11 11 1 2#1500|1100#160
12 12 1 2#1500|1100#160 12 12 1 2#1600|1100#170
13 13 1 2#1600|1100#170 13 13 1 2#1700|1100#180
14 14 1 2#1700|1100#180 14 14 1 2#1800|1100#190
15 15 1 2#1800|1100#190 15 15 1 2#1900|1100#200
16 16 1 2#1900|1100#200 16 16 1 2#2000|1100#210
17 17 1 2#2000|1100#210 17 17 1 2#2100|1100#220
18 18 1 2#2100|1100#220 18 18 1 2#2200|1100#230
19 19 1 2#2200|1100#230 19 19 1 2#2300|1100#240
20 20 1 2#2300|1100#240 20 20 1 2#2400|1100#250
21 21 1 2#2400|1100#250 21 21 1 2#2500|1100#260
22 22 1 2#2500|1100#260 22 22 1 2#2600|1100#270
23 23 1 2#2600|1100#270 23 23 1 2#2700|1100#280
24 24 1 2#2700|1100#280 24 24 1 2#2800|1100#290
25 25 1 2#2800|1100#290 25 25 1 2#2900|1100#300
26 26 1 2#2900|1100#300 26 26 1 2#3000|1100#310
27 27 2 2#3000|1100#310 27 27 2 2#3100|1100#320
28 28 2 2#3100|1100#320 28 28 2 2#3200|1100#330
29 29 2 2#3200|1100#330 29 29 2 2#3300|1100#340
30 30 2 2#3300|1100#340 30 30 2 2#3500|1100#350
31 31 2 2#3500|1100#350 31 31 2 2#3700|1100#360
32 32 2 2#3700|1100#360 32 32 2 2#3900|1100#370
33 33 2 2#3900|1100#370 33 33 2 2#4100|1100#380
34 34 2 2#4100|1100#380 34 34 2 2#4300|1100#390
35 35 2 2#4300|1100#390 35 35 2 2#4500|1100#400
36 36 2 2#4500|1100#400 36 36 2 2#4700|1100#410
37 37 2 2#4700|1100#410 37 37 2 2#4900|1100#420
38 38 2 2#4900|1100#420 38 38 2 2#5100|1100#430
39 39 2 2#5100|1100#430 39 39 2 2#5300|1100#440
40 40 2 2#5300|1100#440 40 40 2 2#5500|1100#450
41 41 2 2#5500|1100#450 41 41 2 2#5700|1100#460
42 42 2 2#5700|1100#460 42 42 2 2#5900|1100#470
43 43 2 2#5900|1100#470 43 43 2 2#6100|1100#480
44 44 2 2#6100|1100#480 44 44 2 2#6300|1100#490
45 45 2 2#6300|1100#490 45 45 2 2#6500|1100#500
46 46 2 2#6500|1100#500 46 46 2 2#6700|1100#510
47 47 2 2#6700|1100#510 47 47 2 2#6900|1100#520
48 48 2 2#6900|1100#520 48 48 2 2#7100|1100#530
49 49 2 2#7100|1100#530 49 49 2 2#7300|1100#540
50 50 2 2#7300|1100#540 50 50 2 2#7500|1100#550
51 51 2 2#7500|1100#550 51 51 2 2#7700|1100#560
52 52 3 2#7700|1100#560 52 52 3 2#7900|1100#570
53 53 3 2#7900|1100#570 53 53 3 2#8100|1100#580
54 54 3 2#8100|1100#580 54 54 3 2#8300|1100#590
55 55 3 2#8300|1100#590 55 55 3 2#8500|1100#600
56 56 3 2#8500|1100#600 56 56 3 2#8700|1100#610
57 57 3 2#8700|1100#610 57 57 3 2#8900|1100#620
58 58 3 2#8900|1100#620 58 58 3 2#9100|1100#630
59 59 3 2#9100|1100#630 59 59 3 2#9300|1100#640
60 60 3 2#9300|1100#640 60 60 3 2#10000|1100#650
61 61 3 2#10000|1100#650 61 61 3 2#10700|1100#660
62 62 3 2#10700|1100#660 62 62 3 2#11400|1100#670
63 63 3 2#11400|1100#670 63 63 3 2#12100|1100#680
64 64 3 2#12100|1100#680 64 64 3 2#12800|1100#690
65 65 3 2#12800|1100#690 65 65 3 2#13500|1100#700
66 66 3 2#13500|1100#700 66 66 3 2#14200|1100#710
67 67 3 2#14200|1100#710 67 67 3 2#14900|1100#720
68 68 3 2#14900|1100#720 68 68 3 2#15600|1100#730
69 69 3 2#15600|1100#730 69 69 3 2#16300|1100#740
70 70 3 2#16300|1100#740 70 70 3 2#17000|1100#750
71 71 3 2#17000|1100#750 71 71 3 2#17700|1100#760
72 72 3 2#17700|1100#760 72 72 3 2#18400|1100#770
73 73 3 2#18400|1100#770 73 73 3 2#19100|1100#780
74 74 3 2#19100|1100#780 74 74 3 2#19800|1100#790
75 75 3 2#19800|1100#790 75 75 3 2#20500|1100#800
76 76 3 2#20500|1100#800 76 76 3 2#21200|1100#810
77 77 3 2#21200|1100#810 77 77 3 2#21900|1100#820
78 78 4 2#21900|1100#820 78 78 4 2#22600|1100#830
79 79 4 2#22600|1100#830 79 79 4 2#23300|1100#840
80 80 4 2#23300|1100#840 80 80 4 2#24000|1100#850
81 81 4 2#24000|1100#850 81 81 4 2#24700|1100#860
82 82 4 2#24700|1100#860 82 82 4 2#25400|1100#870
83 83 4 2#25400|1100#870 83 83 4 2#26100|1100#880
84 84 4 2#26100|1100#880 84 84 4 2#26800|1100#890
85 85 4 2#26800|1100#890 85 85 4 2#27500|1100#900
86 86 4 2#27500|1100#900 86 86 4 2#28200|1100#910
87 87 4 2#28200|1100#910 87 87 4 2#28900|1100#920
88 88 4 2#28900|1100#920 88 88 4 2#29600|1100#930
89 89 4 2#29600|1100#930 89 89 4 2#30300|1100#940
90 90 4 2#30300|1100#940 90 90 4 2#31000|1100#950
91 91 4 2#31000|1100#950 91 91 4 2#31700|1100#960
92 92 4 2#31700|1100#960 92 92 4 2#32400|1100#970
93 93 4 2#32400|1100#970 93 93 4 2#33100|1100#980
94 94 4 2#33100|1100#980 94 94 4 2#33800|1100#990
95 95 4 2#33800|1100#990 95 95 4 2#34500|1100#1000
96 96 4 2#34500|1100#1000 96 96 4 2#35200|1100#1010
97 97 4 2#35200|1100#1010 97 97 4 2#35900|1100#1020
98 98 4 2#35900|1100#1020 98 98 4 2#36600|1100#1030
99 99 4 2#36600|1100#1030 99 99 4 2#37300|1100#1040
100 100 5 2#37300|1100#1040 100 100 5 2#38000|1100#1140
101 101 5 2#38000|1100#1140 101 101 5 2#39000|1100#1240
102 102 5 2#39000|1100#1240 102 102 5 2#40000|1100#1340
103 103 5 2#40000|1100#1340 103 103 5 2#41000|1100#1440
104 104 5 2#41000|1100#1440 104 104 5 2#42000|1100#1540
105 105 6 2#42000|1100#1540 105 105 6 2#43000|1100#1640
106 106 6 2#43000|1100#1640 106 106 6 2#44000|1100#1740
107 107 6 2#44000|1100#1740 107 107 6 2#45000|1100#1840
108 108 6 2#45000|1100#1840 108 108 6 2#46000|1100#1940
109 109 6 2#46000|1100#1940 109 109 6 2#47000|1100#2040
110 110 7 2#47000|1100#2040 110 110 7 2#48000|1100#2140
111 111 7 2#48000|1100#2140 111 111 7 2#49000|1100#2240
112 112 7 2#49000|1100#2240 112 112 7 2#50000|1100#2340
113 113 7 2#50000|1100#2340 113 113 7 2#51000|1100#2440
114 114 7 2#51000|1100#2440 114 114 7 2#52000|1100#2540
115 115 8 2#52000|1100#2540 115 115 8 2#53000|1100#2640
116 116 8 2#53000|1100#2640 116 116 8 2#54000|1100#2740
117 117 8 2#54000|1100#2740 117 117 8 2#55000|1100#2840
118 118 8 2#55000|1100#2840 118 118 8 2#56000|1100#2940
119 119 8 2#56000|1100#2940 119 119 8 2#57000|1100#3040
120 120 9 2#57000|1100#3040 120 120 9 2#58000|1100#3140
121 121 9 2#58000|1100#3140 121 121 9 2#59000|1100#3240
122 122 9 2#59000|1100#3240 122 122 9 2#60000|1100#3340
123 123 9 2#60000|1100#3340 123 123 9 2#61000|1100#3440
124 124 9 2#61000|1100#3440 124 124 9 2#62000|1100#3540
125 125 10 2#62000|1100#3540 125 125 10 2#63000|1100#3640
126 126 10 2#63000|1100#3640 126 126 10 2#64000|1100#3740
127 127 10 2#64000|1100#3740 127 127 10 2#65000|1100#3840
128 128 10 2#65000|1100#3840 128 128 10 2#66000|1100#3940
129 129 10 2#66000|1100#3940 129 129 10 2#67000|1100#4040
130 130 11 2#67000|1100#4040 130 130 11 2#68000|1100#4140
131 131 11 2#68000|1100#4140 131 131 11 2#69000|1100#4240
132 132 11 2#69000|1100#4240 132 132 11 2#70000|1100#4340
133 133 11 2#70000|1100#4340 133 133 11 2#71000|1100#4440
134 134 11 2#71000|1100#4440 134 134 11 2#72000|1100#4540
135 135 12 2#72000|1100#4540 135 135 12 2#73000|1100#4640
136 136 12 2#73000|1100#4640 136 136 12 2#74000|1100#4740
137 137 12 2#74000|1100#4740 137 137 12 2#75000|1100#4840
138 138 12 2#75000|1100#4840 138 138 12 2#76000|1100#4940
139 139 12 2#76000|1100#4940 139 139 12 2#77000|1100#5040
140 140 13 2#77000|1100#5040 140 140 13 2#80000|1100#5340
141 141 13 2#80000|1100#5340 141 141 13 2#83000|1100#5640
142 142 13 2#83000|1100#5640 142 142 13 2#86000|1100#5940
143 143 13 2#86000|1100#5940 143 143 13 2#89000|1100#6240
144 144 13 2#89000|1100#6240 144 144 13 2#92000|1100#6540
145 145 13 2#92000|1100#6540 145 145 13 2#95000|1100#6840
146 146 13 2#95000|1100#6840 146 146 13 2#98000|1100#7140
147 147 14 2#98000|1100#7140 147 147 14 2#101000|1100#7440
148 148 14 2#101000|1100#7440 148 148 14 2#104000|1100#7740
149 149 14 2#104000|1100#7740 149 149 14 2#107000|1100#8040
150 150 14 2#107000|1100#8040 150 150 14 2#110000|1100#8340
151 151 14 2#110000|1100#8340 151 151 14 2#113000|1100#8640
152 152 14 2#113000|1100#8640 152 152 14 2#116000|1100#8940
153 153 15 2#116000|1100#8940 153 153 15 2#119000|1100#9240
154 154 15 2#119000|1100#9240 154 154 15 2#122000|1100#9540
155 155 15 2#122000|1100#9540 155 155 15 2#125000|1100#9840
156 156 15 2#125000|1100#9840 156 156 15 2#128000|1100#10140
157 157 15 2#128000|1100#10140 157 157 15 2#131000|1100#10440
158 158 15 2#131000|1100#10440 158 158 15 2#134000|1100#10740
159 159 16 2#134000|1100#10740 159 159 16 2#137000|1100#11040
160 160 16 2#137000|1100#11040 160 160 16 2#140000|1100#11340
161 161 16 2#140000|1100#11340 161 161 16 2#145000|1100#11640
162 162 16 2#145000|1100#11640 162 162 16 2#150000|1100#11940
163 163 16 2#150000|1100#11940 163 163 16 2#155000|1100#12240
164 164 16 2#155000|1100#12240 164 164 16 2#160000|1100#12540
165 165 17 2#160000|1100#12540 165 165 17 2#165000|1100#12840
166 166 17 2#165000|1100#12840 166 166 17 2#170000|1100#13140
167 167 17 2#170000|1100#13140 167 167 17 2#175000|1100#13440
168 168 17 2#175000|1100#13440 168 168 17 2#180000|1100#13740
169 169 17 2#180000|1100#13740 169 169 17 2#185000|1100#14040
170 170 17 2#185000|1100#14040 170 170 17 2#190000|1100#14340
171 171 18 2#190000|1100#14340 171 171 18 2#195000|1100#14640
172 172 18 2#195000|1100#14640 172 172 18 2#200000|1100#14940
173 173 18 2#200000|1100#14940 173 173 18 2#205000|1100#15240
174 174 18 2#205000|1100#15240 174 174 18 2#210000|1100#15540
175 175 18 2#210000|1100#15540 175 175 18 2#215000|1100#15840
176 176 18 2#215000|1100#15840 176 176 18 2#220000|1100#16140
177 177 19 2#220000|1100#16140 177 177 19 2#225000|1100#16440
178 178 19 2#225000|1100#16440 178 178 19 2#230000|1100#16740
179 179 19 2#230000|1100#16740 179 179 19 2#235000|1100#17040
180 180 19 2#235000|1100#17040 180 180 19 2#240000|1100#17340
181 181 19 2#240000|1100#17340 181 181 19 2#245000|1100#17640
182 182 19 2#245000|1100#17640 182 182 19 2#250000|1100#17940
183 183 20 2#250000|1100#17940 183 183 20 2#255000|1100#18240
184 184 20 2#255000|1100#18240 184 184 20 2#260000|1100#18540
185 185 20 2#260000|1100#18540 185 185 20 2#265000|1100#18840
186 186 20 2#265000|1100#18840 186 186 20 2#270000|1100#19140
187 187 20 2#270000|1100#19140 187 187 20 2#275000|1100#19440
188 188 20 2#275000|1100#19440 188 188 20 2#280000|1100#19740
189 189 21 2#280000|1100#19740 189 189 21 2#285000|1100#20040
190 190 21 2#285000|1100#20040 190 190 21 2#290000|1100#20340
191 191 21 2#290000|1100#20340 191 191 21 2#295000|1100#20640
192 192 21 2#295000|1100#20640 192 192 21 2#300000|1100#20940
193 193 21 2#300000|1100#20940 193 193 21 2#305000|1100#21240
194 194 21 2#305000|1100#21240 194 194 21 2#310000|1100#21540
195 195 22 2#310000|1100#21540 195 195 22 2#315000|1100#21840
196 196 22 2#315000|1100#21840 196 196 22 2#320000|1100#22140
197 197 22 2#320000|1100#22140 197 197 22 2#325000|1100#22440
198 198 22 2#325000|1100#22440 198 198 22 2#330000|1100#22740
199 199 22 2#330000|1100#22740 199 199 22 2#335000|1100#22980
200 200 22 2#335000|1100#22980 200 200 22 2#340000|1100#23580
201 201 22 2#340000|1100#23580 201 201 22 2#345000|1100#24180
202 202 23 2#345000|1100#24180 202 202 23 2#350000|1100#24780
203 203 23 2#350000|1100#24780 203 203 23 2#355000|1100#25380
204 204 23 2#355000|1100#25380 204 204 23 2#360000|1100#25980
205 205 23 2#360000|1100#25980 205 205 23 2#365000|1100#26580
206 206 23 2#365000|1100#26580 206 206 23 2#370000|1100#27180
207 207 23 2#370000|1100#27180 207 207 23 2#375000|1100#27780
208 208 24 2#375000|1100#27780 208 208 24 2#380000|1100#28380
209 209 24 2#380000|1100#28380 209 209 24 2#385000|1100#28980
210 210 24 2#385000|1100#28980 210 210 24 2#390000|1100#29580
211 211 24 2#390000|1100#29580 211 211 24 2#395000|1100#30180
212 212 24 2#395000|1100#30180 212 212 24 2#400000|1100#30780
213 213 24 2#400000|1100#30780 213 213 24 2#405000|1100#31380
214 214 25 2#405000|1100#31380 214 214 25 2#410000|1100#31980
215 215 25 2#410000|1100#31980 215 215 25 2#415000|1100#32580
216 216 25 2#415000|1100#32580 216 216 25 2#420000|1100#33180
217 217 25 2#420000|1100#33180 217 217 25 2#425000|1100#33780
218 218 25 2#425000|1100#33780 218 218 25 2#430000|1100#34380
219 219 25 2#430000|1100#34380 219 219 25 2#435000|1100#34980
220 220 26 2#435000|1100#34980 220 220 26 2#440000|1100#35580
221 221 26 2#440000|1100#35580 221 221 26 2#445000|1100#36180
222 222 26 2#445000|1100#36180 222 222 26 2#450000|1100#36780
223 223 26 2#450000|1100#36780 223 223 26 2#455000|1100#37380
224 224 26 2#455000|1100#37380 224 224 26 2#460000|1100#37980
225 225 26 2#460000|1100#37980 225 225 26 2#465000|1100#38580
226 226 27 2#465000|1100#38580 226 226 27 2#470000|1100#39180
227 227 27 2#470000|1100#39180 227 227 27 2#475000|1100#39780
228 228 27 2#475000|1100#39780 228 228 27 2#480000|1100#40380
229 229 27 2#480000|1100#40380 229 229 27 2#485000|1100#40980
230 230 27 2#485000|1100#40980 230 230 27 2#490000|1100#41580
231 231 27 2#490000|1100#41580 231 231 27 2#495000|1100#42180
232 232 28 2#495000|1100#42180 232 232 28 2#500000|1100#42780
233 233 28 2#500000|1100#42780 233 233 28 2#505000|1100#43380
234 234 28 2#505000|1100#43380 234 234 28 2#510000|1100#43980
235 235 28 2#510000|1100#43980 235 235 28 2#515000|1100#44580
236 236 28 2#515000|1100#44580 236 236 28 2#520000|1100#45180
237 237 28 2#520000|1100#45180 237 237 28 2#525000|1100#45780
238 238 29 2#525000|1100#45780 238 238 29 2#530000|1100#46380
239 239 29 2#530000|1100#46380 239 239 29 2#535000|1100#46980
240 240 29 2#535000|1100#46980 240 240 29 2#540000|1100#47580
241 241 29 2#540000|1100#47580 241 241 29 2#545000|1100#48180
242 242 29 2#545000|1100#48180 242 242 29 2#550000|1100#48780
243 243 29 2#550000|1100#48780 243 243 29 2#555000|1100#49380
244 244 30 2#555000|1100#49380 244 244 30 2#560000|1100#49980
245 245 30 2#560000|1100#49980 245 245 30 2#565000|1100#50580
246 246 30 2#565000|1100#50580 246 246 30 2#570000|1100#51180
247 247 30 2#570000|1100#51180 247 247 30 2#575000|1100#51780
248 248 30 2#575000|1100#51780 248 248 30 2#580000|1100#52380
249 249 30 2#580000|1100#52380 249 249 30 2#585000|1100#52980
250 250 31 2#585000|1100#52980 250 250 31 null

View File

@ -0,0 +1,12 @@
Id Type RankupPara LimitLevel OpenLevel LimitStar OpenStar ConsumeMaterial
int int float int int int int mut,int#int,2
1 1 2000 30 40 3 3 2#10000|1101#20
2 1 5000 40 50 3 3 2#20000|1101#40
3 1 9000 50 60 3 3 2#30000|1101#100
4 1 14000 60 80 4 4 2#30000|1101#300
5 1 20000 80 100 5 5 2#70000|1101#1000
6 1 60000 100 140 5 6 2#120000|1101#0
7 2 2000 140 160 6 7 2#0|1101#2000
8 2 4000 160 180 7 8 2#0|1101#3000
9 2 7000 180 200 8 9 2#0|1101#4000
10 2 10000 200 250 9 10 2#0|1101#10000

View File

@ -0,0 +1,75 @@
Id Issame StarLimit IsSameClan IsId
int int int int int
1 1 3 1 0
2 1 4 1 0
3 1 5 1 0
4 1 6 1 0
5 1 7 1 0
6 1 8 1 0
7 1 9 1 0
8 0 3 0 0
9 0 4 0 0
10 0 5 0 0
11 0 6 0 0
12 0 7 0 0
13 0 8 0 0
14 0 9 0 0
15 0 3 1 0
16 0 4 1 0
17 0 5 1 0
18 0 6 1 0
19 0 7 1 0
20 0 8 1 0
21 0 9 1 0
22 0 5 1 10024
23 0 5 1 10025
24 0 5 1 10026
25 0 5 1 10027
26 0 5 1 10028
27 0 5 1 10029
28 0 5 1 10030
29 0 5 1 10031
30 0 5 1 10032
31 0 5 1 10033
32 0 5 1 10034
33 0 5 1 10035
34 0 5 1 10036
35 0 5 1 10037
36 0 5 1 10038
37 0 5 1 10039
38 0 5 1 10040
39 0 5 1 10041
40 0 5 1 10042
41 0 5 1 10043
42 0 5 1 10044
43 0 5 1 10045
44 0 5 1 10046
45 0 4 1 10024
46 0 4 1 10025
47 0 4 1 10026
48 0 4 1 10027
49 0 4 1 10028
50 0 4 1 10029
51 0 4 1 10030
52 0 4 1 10031
53 0 4 1 10032
54 0 4 1 10033
55 0 4 1 10034
56 0 4 1 10035
57 0 4 1 10036
58 0 4 1 10037
59 0 4 1 10038
60 0 4 1 10039
61 0 4 1 10040
62 0 4 1 10041
63 0 4 1 10042
64 0 4 1 10043
65 0 4 1 10044
66 0 4 1 10045
67 0 4 1 10046
68 0 3 1 10047
69 0 3 1 10048
70 0 3 1 10049
71 0 3 1 10050
72 0 3 1 10051
73 0 3 1 10052

View File

@ -45,15 +45,59 @@ public class SCHero implements BaseConfig{
private Map<Integer, List<Integer>> skillListByStar; private Map<Integer, List<Integer>> skillListByStar;
private Map<Integer, Map<Integer,SCHero.ConsumeMaterialInfo>> consumeMaterialInfoOfPositionByStar;
public class ConsumeMaterialInfo{
private int groupID;
private int nums;
public ConsumeMaterialInfo(int groupID, int nums) {
this.groupID = groupID;
this.nums = nums;
}
public int getGroupID() {
return groupID;
}
public void setGroupID(int groupID) {
this.groupID = groupID;
}
public int getNums() {
return nums;
}
public void setNums(int nums) {
this.nums = nums;
}
}
@Override @Override
public void init() throws Exception { public void init() throws Exception {
Map<Integer, SCHero> integerSCHeroMap = STableManager.getConfig(SCHero.class); Map<Integer, SCHero> integerSCHeroMap = STableManager.getConfig(SCHero.class);
for(SCHero scHero : integerSCHeroMap.values()){ for(SCHero scHero : integerSCHeroMap.values()){
Map<Integer, Map<Integer,SCHero.ConsumeMaterialInfo>> consumeMaterialInfoByStarTmp = new HashMap<>();
int[][] openSkillRules = scHero.getOpenSkillRules(); int[][] openSkillRules = scHero.getOpenSkillRules();
Map<Integer, List<Integer>> skillListByStarTmp = new HashMap<>(); Map<Integer, List<Integer>> skillListByStarTmp = new HashMap<>();
scHero.setSkillListByStar(skillListByStarTmp); scHero.setSkillListByStar(skillListByStarTmp);
int[][] rankupConsumeMaterial = scHero.getRankupConsumeMaterial();
for(int j=0;j<rankupConsumeMaterial.length;j++){
int[] ints = rankupConsumeMaterial[j];
int star = ints[0];
int position = ints[1];
int groupID = ints[2];
int nums = ints[3];
if(!consumeMaterialInfoByStarTmp.containsKey(star)){
consumeMaterialInfoByStarTmp.put(star,new HashMap<>());
}
consumeMaterialInfoByStarTmp.get(star).put(position,new ConsumeMaterialInfo(position,nums));
}
scHero.setConsumeMaterialInfoOfPositionByStar(consumeMaterialInfoByStarTmp);
for(int i=0;i<openSkillRules.length;i++){ for(int i=0;i<openSkillRules.length;i++){
int[] openSkillRule = openSkillRules[i]; int[] openSkillRule = openSkillRules[i];
int star = openSkillRule[0]; int star = openSkillRule[0];
@ -63,11 +107,20 @@ public class SCHero implements BaseConfig{
} }
skillListByStarTmp.get(star).add(skillId); skillListByStarTmp.get(star).add(skillId);
} }
} }
sCHero = integerSCHeroMap; sCHero = integerSCHeroMap;
} }
public Map<Integer, ConsumeMaterialInfo> getConsumeMaterialInfoOfPositionByStar(int star) {
return consumeMaterialInfoOfPositionByStar.get(star);
}
public void setConsumeMaterialInfoOfPositionByStar(Map<Integer, Map<Integer, ConsumeMaterialInfo>> consumeMaterialInfoOfPositionByStar) {
this.consumeMaterialInfoOfPositionByStar = consumeMaterialInfoOfPositionByStar;
}
public static Map<Integer, SCHero> getsCHero() { public static Map<Integer, SCHero> getsCHero() {
return sCHero; return sCHero;
} }

View File

@ -0,0 +1,54 @@
package com.ljsd.jieling.config;
import com.ljsd.jieling.logic.STableManager;
import com.ljsd.jieling.logic.Table;
import java.util.Map;
@Table(name ="HeroRankupGroup")
public class SHeroRankupGroup implements BaseConfig {
private static Map<Integer,SHeroRankupGroup> sHeroRankupGroupMap;
private int id;
private int issame;
private int starLimit;
private int isSameClan;
private int isId;
@Override
public void init() throws Exception {
sHeroRankupGroupMap = STableManager.getConfig(SHeroRankupGroup.class);
}
public static SHeroRankupGroup getsHeroRankupGroup(int groupId) {
return sHeroRankupGroupMap.get(groupId);
}
public int getId() {
return id;
}
public int getIssame() {
return issame;
}
public int getStarLimit() {
return starLimit;
}
public int getIsSameClan() {
return isSameClan;
}
public int getIsId() {
return isId;
}
}

View File

@ -2,4 +2,8 @@ package com.ljsd.jieling.core;
public interface GlobalsDef { public interface GlobalsDef {
String DEFAULT_NAME = "无名妖灵师"; String DEFAULT_NAME = "无名妖灵师";
int BREAK_TYPE =1 ; //1突破
int UP_STAR_TYPE = 2; //2升星
} }

View File

@ -0,0 +1,24 @@
package com.ljsd.jieling.handler;
import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.netty.cocdex.PacketNetData;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.HeroInfoProto;
import com.ljsd.jieling.protocols.MessageTypeProto;
import org.springframework.stereotype.Component;
@Component
public class UpHeroLevelHandler extends BaseHandler {
@Override
public MessageTypeProto.MessageType getMessageCode() {
return MessageTypeProto.MessageType.UP_HERO_LEVEL_REQUEST;
}
@Override
public void process(ISession iSession, PacketNetData netData) throws Exception {
byte[] bytes = netData.parseClientProtoNetData();
HeroInfoProto.UpHeroLevelRequest upHeroLevelRequest = HeroInfoProto.UpHeroLevelRequest.parseFrom(bytes);
String heroId = upHeroLevelRequest.getHeroId();
HeroLogic.getInstance().upHeroLevel(iSession,heroId);
}
}

View File

@ -0,0 +1,28 @@
package com.ljsd.jieling.handler;
import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.netty.cocdex.PacketNetData;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.HeroInfoProto;
import com.ljsd.jieling.protocols.MessageTypeProto;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class UpHeroStarHandler extends BaseHandler{
@Override
public MessageTypeProto.MessageType getMessageCode() {
return MessageTypeProto.MessageType.UP_HERO_STAR_REQUEST;
}
@Override
public void process(ISession iSession, PacketNetData netData) throws Exception {
byte[] bytes = netData.parseClientProtoNetData();
HeroInfoProto.UpHeroStarRequest upHeroStarRequest = HeroInfoProto.UpHeroStarRequest.parseFrom(bytes);
List<HeroInfoProto.ConsumeMaterial> consumeMaterialsList = upHeroStarRequest.getConsumeMaterialsList();
String heroId = upHeroStarRequest.getHeroId();
HeroLogic.getInstance().upHeroStar(iSession,heroId,consumeMaterialsList);
}
}

View File

@ -23,7 +23,7 @@ public class HeroManager extends MongoBase {
public void addHero(Hero hero) throws Exception { public void addHero(Hero hero) throws Exception {
//绑定关系 //绑定关系
hero.init(getRoot(), getMongoKey() + ".heroMap." + hero.getId()); hero.init(getRoot(), getMongoKey() + ".heroMap." + hero.getId());
updateString("heroMap." + hero.getTemplateId(), hero); updateString("heroMap." + hero.getId(), hero);
heroMap.put(hero.getId(), hero); heroMap.put(hero.getId(), hero);
} }
@ -32,9 +32,12 @@ public class HeroManager extends MongoBase {
} }
public void removeHero(String heroId) { public void removeHero(String heroId) {
removeString("heroMap." + heroId);
heroMap.remove(heroId); heroMap.remove(heroId);
} }
public Map<String, Hero> getHeroMap() { public Map<String, Hero> getHeroMap() {
return heroMap; return heroMap;
} }

View File

@ -2,12 +2,14 @@ package com.ljsd.jieling.logic.hero;
import com.ljsd.jieling.GameApplication; import com.ljsd.jieling.GameApplication;
import com.ljsd.jieling.config.*; import com.ljsd.jieling.config.*;
import com.ljsd.jieling.core.GlobalsDef;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.network.session.ISession; import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.CommonProto; import com.ljsd.jieling.protocols.CommonProto;
import com.ljsd.jieling.protocols.HeroInfoProto; import com.ljsd.jieling.protocols.HeroInfoProto;
import com.ljsd.jieling.protocols.MessageTypeProto; import com.ljsd.jieling.protocols.MessageTypeProto;
import com.ljsd.jieling.util.CBean2Proto; import com.ljsd.jieling.util.CBean2Proto;
import com.ljsd.jieling.util.ItemUtil;
import com.ljsd.jieling.util.MathUtils; import com.ljsd.jieling.util.MathUtils;
import com.ljsd.jieling.util.MessageUtil; import com.ljsd.jieling.util.MessageUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -194,24 +196,132 @@ public class HeroLogic {
public void upHeroLevel(ISession session,String heroId) throws Exception { public void upHeroLevel(ISession session,String heroId) throws Exception {
User user = UserManager.getUser(session.getUid()); User user = UserManager.getUser(session.getUid());
Hero hero = user.getHeroManager().getHero(heroId); Hero hero = user.getHeroManager().getHero(heroId);
if( null == hero){ if( null == hero){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_LEVEL_RESPONSE_VALUE,"");
return; return;
} }
//校验消耗
int oldLevel = hero.getLevel(); int oldLevel = hero.getLevel();
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(oldLevel); //判断需要进行升级还是进行突破
int[][] consume = sHeroLevlConfig.getConsume(); Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.BREAK_TYPE);
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(oldLevel);
boolean isBreak =false;
int[][] consume;
if(scHeroRankUpConfig!=null){
isBreak =true;
consume = scHeroRankUpConfig.getConsumeMaterial();
}else{
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(oldLevel);
consume = sHeroLevlConfig.getConsume();
}
//校验消耗
boolean result = ItemUtil.itemCost(user, consume);
if(!result){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_LEVEL_RESPONSE_VALUE,"道具不足");
return;
}
if(!isBreak){
hero.setLevel( oldLevel + 1);
}
hero.setLevel( oldLevel + 1); //发送成功消息
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.UP_HERO_LEVEL_RESPONSE_VALUE,null,true);
}
public void upHeroStar(ISession session, String heroId, List<HeroInfoProto.ConsumeMaterial> consumeMaterialsList) throws Exception {
int uid = session.getUid();
User user = UserManager.getUser(uid);
HeroManager heroManager = user.getHeroManager();
Hero targetHero = heroManager.getHero(heroId);
if( null == targetHero){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"");
return;
}
int oldStar = targetHero.getStar();
SCHero scHero = SCHero.getsCHero().get(targetHero.getTemplateId());
Map<Integer,SCHero.ConsumeMaterialInfo> consumeMaterialInfoByPosition = scHero.getConsumeMaterialInfoOfPositionByStar(oldStar + 1);
boolean canUse = true;
List<String> removeHeroIds = new ArrayList<>();
for(HeroInfoProto.ConsumeMaterial consumeMaterial1 : consumeMaterialsList){
int position = consumeMaterial1.getPosition();
SCHero.ConsumeMaterialInfo consumeMaterialInfo = consumeMaterialInfoByPosition.get(position);
List<String> heroIdsList = consumeMaterial1.getHeroIdsList();
SHeroRankupGroup sHeroRankupGroup = SHeroRankupGroup.getsHeroRankupGroup(consumeMaterialInfo.getGroupID());
for(String consumeHero : heroIdsList){
Hero hero = heroManager.getHero(consumeHero);
if( null == hero ){
canUse =false;
break;
}
int isSame = sHeroRankupGroup.getIssame();
int starLimit = sHeroRankupGroup.getStarLimit();
int isSameClan = sHeroRankupGroup.getIsSameClan();
int isId = sHeroRankupGroup.getIsId();
if( 1 == isSame) {
if(hero.getTemplateId() != targetHero.getTemplateId()){
canUse =false;
break;
}
}
if( starLimit != 0 ) {
if(hero.getStar() != starLimit){
canUse =false;
break;
}
}
if( 1 == isSameClan) {
SCHero scHeroTmp = SCHero.getsCHero().get(hero.getTemplateId());
SCHero targetSHero = SCHero.getsCHero().get(targetHero.getTemplateId());
if( scHeroTmp.getPropertyName() != targetSHero.getPropertyName() ){
canUse =false;
break;
}
}
if( isId != 0) {
if(hero.getTemplateId() != isId){
canUse =false;
break;
}
}
removeHeroIds.add(consumeHero);
}
}
if(!canUse){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"");
return;
}
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.UP_STAR_TYPE);
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(oldStar);
int[][] consumeMaterial = scHeroRankUpConfig.getConsumeMaterial();
boolean enoughCost = ItemUtil.itemCost(user, consumeMaterial);
if(!enoughCost){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"");
return;
}
//删除hero
recyleHeroBySystem(user,removeHeroIds);
targetHero.setStar( oldStar + 1 );
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,null,true);
}
public void recyleHeroBySystem(User user,List<String> removeHeroIds){
HeroManager heroManager = user.getHeroManager();
for(String useHeroId : removeHeroIds){
heroManager.removeHero(useHeroId);
}
} }