精力&行动力

back_recharge
wangyuan 2019-03-02 18:30:38 +08:00
parent 5ab788a789
commit fbb2e1c6f2
12 changed files with 302 additions and 224 deletions

View File

@ -1,119 +1,119 @@
Id Quality ProfessionLimit Position PropertyMin PropertyMax Pool SecondNumMin SecondNumMax SkillId IfClear Id Quality ProfessionLimit Position PropertyMin PropertyMax Pool SecondNumMin SecondNumMax SkillId IfClear
int int int int mut,int#int,1 mut,int#int,1 int int int int int int int int int mut,int#int,1 mut,int#int,1 int int int int int
3001 1 3 1 2#42 2#70 1 0 0 0 0 3001 1 3 1 2#42 2#70 1 0 0 1000111 0
3002 1 3 1 2#42 2#70 1 0 0 0 0 3002 1 3 1 2#42 2#70 1 0 0 1000111 0
3003 1 5 1 2#42 2#70 1 0 0 0 0 3003 1 5 1 2#42 2#70 1 0 0 1000111 0
3004 1 5 1 2#42 2#70 1 0 0 0 0 3004 1 5 1 2#42 2#70 1 0 0 1000111 0
3005 1 1 1 2#42 2#70 1 0 0 0 0 3005 1 1 1 2#42 2#70 1 0 0 1000111 0
3006 1 1 1 2#42 2#70 1 0 0 0 0 3006 1 1 1 2#42 2#70 1 0 0 1000111 0
3007 1 2 1 2#42 2#70 1 0 0 0 0 3007 1 2 1 2#42 2#70 1 0 0 1000111 0
3008 1 2 1 2#42 2#70 1 0 0 0 0 3008 1 2 1 2#42 2#70 1 0 0 1000111 0
3009 1 4 1 2#42 2#70 1 0 0 0 0 3009 1 4 1 2#42 2#70 1 0 0 1000111 0
3010 1 4 1 2#42 2#70 1 0 0 0 0 3010 1 4 1 2#42 2#70 1 0 0 1000111 0
3011 1 0 2 3#43 3#72 1 0 0 0 0 3011 1 0 2 3#43 3#72 1 0 0 1000111 0
3012 1 0 2 3#43 3#72 1 0 0 0 0 3012 1 0 2 3#43 3#72 1 0 0 1000111 0
3013 1 0 2 4#40 4#67 1 0 0 0 0 3013 1 0 2 4#40 4#67 1 0 0 1000111 0
3014 1 0 2 4#40 4#67 1 0 0 0 0 3014 1 0 2 4#40 4#67 1 0 0 1000111 0
3015 1 0 4 5#24 5#28 1 0 0 0 0 3015 1 0 4 5#24 5#28 1 0 0 1000111 0
3016 1 0 4 5#24 5#28 1 0 0 0 0 3016 1 0 4 5#24 5#28 1 0 0 1000111 0
3017 1 0 3 1#460 1#767 1 0 0 0 0 3017 1 0 3 1#460 1#767 1 0 0 1000111 0
3018 1 0 3 1#460 1#767 1 0 0 0 0 3018 1 0 3 1#460 1#767 1 0 0 1000111 0
3101 2 3 1 2#56 2#93 1 0 1 0 0 3101 2 3 1 2#56 2#93 1 0 1 1000111 0
3102 2 3 1 2#56 2#93 1 0 1 0 0 3102 2 3 1 2#56 2#93 1 0 1 1000111 0
3103 2 5 1 2#56 2#93 1 0 1 0 0 3103 2 5 1 2#56 2#93 1 0 1 1000111 0
3104 2 5 1 2#56 2#93 1 0 1 0 0 3104 2 5 1 2#56 2#93 1 0 1 1000111 0
3105 2 1 1 2#56 2#93 1 0 1 0 0 3105 2 1 1 2#56 2#93 1 0 1 1000111 0
3106 2 1 1 2#56 2#93 1 0 1 0 0 3106 2 1 1 2#56 2#93 1 0 1 1000111 0
3107 2 2 1 2#56 2#93 1 0 1 0 0 3107 2 2 1 2#56 2#93 1 0 1 1000111 0
3108 2 2 1 2#56 2#93 1 0 1 0 0 3108 2 2 1 2#56 2#93 1 0 1 1000111 0
3109 2 4 1 2#56 2#93 1 0 1 0 0 3109 2 4 1 2#56 2#93 1 0 1 1000111 0
3110 2 4 1 2#56 2#93 1 0 1 0 0 3110 2 4 1 2#56 2#93 1 0 1 1000111 0
3111 2 0 2 3#58 3#96 2 0 1 0 0 3111 2 0 2 3#58 3#96 2 0 1 1000111 0
3112 2 0 2 3#58 3#96 2 0 1 0 0 3112 2 0 2 3#58 3#96 2 0 1 1000111 0
3113 2 0 2 4#54 4#90 2 0 1 0 0 3113 2 0 2 4#54 4#90 2 0 1 1000111 0
3114 2 0 2 4#54 4#90 2 0 1 0 0 3114 2 0 2 4#54 4#90 2 0 1 1000111 0
3115 2 0 4 5#48 5#56 3 0 1 0 0 3115 2 0 4 5#48 5#56 3 0 1 1000111 0
3116 2 0 4 5#48 5#56 3 0 1 0 0 3116 2 0 4 5#48 5#56 3 0 1 1000111 0
3117 2 0 3 1#616 1#1027 4 0 1 0 0 3117 2 0 3 1#616 1#1027 4 0 1 1000111 0
3118 2 0 3 1#616 1#1027 4 0 1 0 0 3118 2 0 3 1#616 1#1027 4 0 1 1000111 0
3201 3 3 1 2#72 2#120 5 1 3 0 1 3201 3 3 1 2#72 2#120 5 1 3 1000111 1
3202 3 3 1 2#72 2#120 5 1 3 0 1 3202 3 3 1 2#72 2#120 5 1 3 1000111 1
3203 3 5 1 2#72 2#120 5 1 3 0 1 3203 3 5 1 2#72 2#120 5 1 3 1000111 1
3204 3 5 1 2#72 2#120 5 1 3 0 1 3204 3 5 1 2#72 2#120 5 1 3 1000111 1
3205 3 1 1 2#72 2#120 5 1 3 0 1 3205 3 1 1 2#72 2#120 5 1 3 1000111 1
3206 3 1 1 2#72 2#120 5 1 3 0 1 3206 3 1 1 2#72 2#120 5 1 3 1000111 1
3207 3 2 1 2#72 2#120 5 1 3 0 1 3207 3 2 1 2#72 2#120 5 1 3 1000111 1
3208 3 2 1 2#72 2#120 5 1 3 0 1 3208 3 2 1 2#72 2#120 5 1 3 1000111 1
3209 3 4 1 2#72 2#120 5 1 3 0 1 3209 3 4 1 2#72 2#120 5 1 3 1000111 1
3210 3 4 1 2#72 2#120 5 1 3 0 1 3210 3 4 1 2#72 2#120 5 1 3 1000111 1
3211 3 0 2 3#74 3#124 6 1 3 0 1 3211 3 0 2 3#74 3#124 6 1 3 1000111 1
3212 3 0 2 3#74 3#124 6 1 3 0 1 3212 3 0 2 3#74 3#124 6 1 3 1000111 1
3213 3 0 2 4#70 4#116 6 1 3 0 1 3213 3 0 2 4#70 4#116 6 1 3 1000111 1
3214 3 0 2 4#70 4#116 6 1 3 0 1 3214 3 0 2 4#70 4#116 6 1 3 1000111 1
3215 3 0 4 5#72 5#84 7 1 3 0 1 3215 3 0 4 5#72 5#84 7 1 3 1000111 1
3216 3 0 4 5#72 5#84 7 1 3 0 1 3216 3 0 4 5#72 5#84 7 1 3 1000111 1
3217 3 0 3 1#792 1#1320 8 1 3 0 1 3217 3 0 3 1#792 1#1320 8 1 3 1000111 1
3218 3 0 3 1#792 1#1320 8 1 3 0 1 3218 3 0 3 1#792 1#1320 8 1 3 1000111 1
3301 4 3 1 2#383 2#638 9 2 4 0 1 3301 4 3 1 2#383 2#638 9 2 4 1000111 1
3302 4 3 1 2#383 2#638 9 2 4 0 1 3302 4 3 1 2#383 2#638 9 2 4 1000111 1
3303 4 5 1 2#383 2#638 9 2 4 0 1 3303 4 5 1 2#383 2#638 9 2 4 1000111 1
3304 4 5 1 2#383 2#638 9 2 4 0 1 3304 4 5 1 2#383 2#638 9 2 4 1000111 1
3305 4 1 1 2#383 2#638 9 2 4 0 1 3305 4 1 1 2#383 2#638 9 2 4 1000111 1
3306 4 1 1 2#383 2#638 9 2 4 0 1 3306 4 1 1 2#383 2#638 9 2 4 1000111 1
3307 4 2 1 2#383 2#638 9 2 4 0 1 3307 4 2 1 2#383 2#638 9 2 4 1000111 1
3308 4 2 1 2#383 2#638 9 2 4 0 1 3308 4 2 1 2#383 2#638 9 2 4 1000111 1
3309 4 4 1 2#383 2#638 9 2 4 0 1 3309 4 4 1 2#383 2#638 9 2 4 1000111 1
3310 4 4 1 2#383 2#638 9 2 4 0 1 3310 4 4 1 2#383 2#638 9 2 4 1000111 1
3311 4 0 2 3#396 3#659 10 2 4 0 1 3311 4 0 2 3#396 3#659 10 2 4 1000111 1
3312 4 0 2 3#396 3#659 10 2 4 0 1 3312 4 0 2 3#396 3#659 10 2 4 1000111 1
3313 4 0 2 4#370 4#617 10 2 4 0 1 3313 4 0 2 4#370 4#617 10 2 4 1000111 1
3314 4 0 2 4#370 4#617 10 2 4 0 1 3314 4 0 2 4#370 4#617 10 2 4 1000111 1
3315 4 0 4 5#96 5#113 11 2 4 0 1 3315 4 0 4 5#96 5#113 11 2 4 1000111 1
3316 4 0 4 5#96 5#113 11 2 4 0 1 3316 4 0 4 5#96 5#113 11 2 4 1000111 1
3317 4 0 3 1#4212 1#7020 12 2 4 0 1 3317 4 0 3 1#4212 1#7020 12 2 4 1000111 1
3318 4 0 3 1#4212 1#7020 12 2 4 0 1 3318 4 0 3 1#4212 1#7020 12 2 4 1000111 1
3319 4 3 1 2#383 2#638 9 2 4 0 1 3319 4 3 1 2#383 2#638 9 2 4 1000111 1
3320 4 3 1 2#383 2#638 9 2 4 0 1 3320 4 3 1 2#383 2#638 9 2 4 1000111 1
3321 4 5 1 2#383 2#638 9 2 4 0 1 3321 4 5 1 2#383 2#638 9 2 4 1000111 1
3322 4 5 1 2#383 2#638 9 2 4 0 1 3322 4 5 1 2#383 2#638 9 2 4 1000111 1
3323 4 1 1 2#383 2#638 9 2 4 0 1 3323 4 1 1 2#383 2#638 9 2 4 1000111 1
3324 4 1 1 2#383 2#638 9 2 4 0 1 3324 4 1 1 2#383 2#638 9 2 4 1000111 1
3325 4 2 1 2#383 2#638 9 2 4 0 1 3325 4 2 1 2#383 2#638 9 2 4 1000111 1
3326 4 2 1 2#383 2#638 9 2 4 0 1 3326 4 2 1 2#383 2#638 9 2 4 1000111 1
3327 4 4 1 2#383 2#638 9 2 4 0 1 3327 4 4 1 2#383 2#638 9 2 4 1000111 1
3328 4 4 1 2#383 2#638 9 2 4 0 1 3328 4 4 1 2#383 2#638 9 2 4 1000111 1
3329 4 0 2 3#396 3#659 10 2 4 0 1 3329 4 0 2 3#396 3#659 10 2 4 1000111 1
3330 4 0 2 3#396 3#659 10 2 4 0 1 3330 4 0 2 3#396 3#659 10 2 4 1000111 1
3331 4 0 2 4#370 4#617 10 2 4 0 1 3331 4 0 2 4#370 4#617 10 2 4 1000111 1
3332 4 0 2 4#370 4#617 10 2 4 0 1 3332 4 0 2 4#370 4#617 10 2 4 1000111 1
3333 4 0 4 5#96 5#113 11 2 4 0 1 3333 4 0 4 5#96 5#113 11 2 4 1000111 1
3334 4 0 4 5#96 5#113 11 2 4 0 1 3334 4 0 4 5#96 5#113 11 2 4 1000111 1
3335 4 0 3 1#4212 1#7020 12 2 4 0 1 3335 4 0 3 1#4212 1#7020 12 2 4 1000111 1
3336 4 0 3 1#4212 1#7020 12 2 4 0 1 3336 4 0 3 1#4212 1#7020 12 2 4 1000111 1
4001 3 3 1 2#72 2#120 5 1 3 0 0 4001 3 3 1 2#72 2#120 5 1 3 1000111 0
4002 3 5 1 2#72 2#120 5 1 3 0 0 4002 3 5 1 2#72 2#120 5 1 3 1000111 0
4003 3 1 1 2#72 2#120 5 1 3 0 0 4003 3 1 1 2#72 2#120 5 1 3 1000111 0
4004 3 2 1 2#72 2#120 5 1 3 0 0 4004 3 2 1 2#72 2#120 5 1 3 1000111 0
4005 3 4 1 2#72 2#120 5 1 3 0 0 4005 3 4 1 2#72 2#120 5 1 3 1000111 0
4006 3 0 2 3#74 3#124 6 1 3 0 0 4006 3 0 2 3#74 3#124 6 1 3 1000111 0
4007 3 0 2 4#70 4#116 6 1 3 0 0 4007 3 0 2 4#70 4#116 6 1 3 1000111 0
4008 3 0 4 5#72 5#84 7 1 3 0 0 4008 3 0 4 5#72 5#84 7 1 3 1000111 0
4009 3 0 3 1#792 1#1320 8 1 3 0 0 4009 3 0 3 1#792 1#1320 8 1 3 1000111 0
4101 4 3 1 2#383 2#638 9 2 4 0 0 4101 4 3 1 2#383 2#638 9 2 4 1000111 0
4102 4 3 1 2#383 2#638 9 2 4 0 0 4102 4 3 1 2#383 2#638 9 2 4 1000111 0
4103 4 5 1 2#383 2#638 9 2 4 0 0 4103 4 5 1 2#383 2#638 9 2 4 1000111 0
4104 4 5 1 2#383 2#638 9 2 4 0 0 4104 4 5 1 2#383 2#638 9 2 4 1000111 0
4105 4 1 1 2#383 2#638 9 2 4 0 0 4105 4 1 1 2#383 2#638 9 2 4 1000111 0
4106 4 1 1 2#383 2#638 9 2 4 0 0 4106 4 1 1 2#383 2#638 9 2 4 1000111 0
4107 4 2 1 2#383 2#638 9 2 4 0 0 4107 4 2 1 2#383 2#638 9 2 4 1000111 0
4108 4 2 1 2#383 2#638 9 2 4 0 0 4108 4 2 1 2#383 2#638 9 2 4 1000111 0
4109 4 4 1 2#383 2#638 9 2 4 0 0 4109 4 4 1 2#383 2#638 9 2 4 1000111 0
4110 4 4 1 2#383 2#638 9 2 4 0 0 4110 4 4 1 2#383 2#638 9 2 4 1000111 0
4111 4 0 2 3#396 3#659 10 2 4 0 0 4111 4 0 2 3#396 3#659 10 2 4 1000111 0
4112 4 0 2 3#396 3#659 10 2 4 0 0 4112 4 0 2 3#396 3#659 10 2 4 1000111 0
4113 4 0 2 4#370 4#617 10 2 4 0 0 4113 4 0 2 4#370 4#617 10 2 4 1000111 0
4114 4 0 2 4#370 4#617 10 2 4 0 0 4114 4 0 2 4#370 4#617 10 2 4 1000111 0
4115 4 0 4 5#96 5#113 11 2 4 0 0 4115 4 0 4 5#96 5#113 11 2 4 1000111 0
4116 4 0 4 5#96 5#113 11 2 4 0 0 4116 4 0 4 5#96 5#113 11 2 4 1000111 0
4117 4 0 3 1#4212 1#7020 12 2 4 0 0 4117 4 0 3 1#4212 1#7020 12 2 4 1000111 0
4118 4 0 3 1#4212 1#7020 12 2 4 0 0 4118 4 0 3 1#4212 1#7020 12 2 4 1000111 0

View File

@ -1,78 +1,78 @@
id PropertyId Min Max PoolNum Weight id PropertyId Min Max PoolNum Weight
int int int int int int int int int int int int
1 5 11 18 1 100 10005 5 11 18 1 100
2 54 5 5 1 100 10054 54 5 5 1 100
3 53 5 5 1 100 10053 53 5 5 1 100
4 1 235 392 2 100 20001 1 235 392 2 100
5 2 19 32 2 100 20002 2 19 32 2 100
6 53 5 5 2 100 20053 53 5 5 2 100
7 54 5 5 2 100 20054 54 5 5 2 100
8 1 268 448 3 100 30001 1 268 448 3 100
9 2 17 29 3 100 30002 2 17 29 3 100
10 3 9 15 3 100 30003 3 9 15 3 100
11 4 12 20 3 100 30004 4 12 20 3 100
12 3 26 43 4 100 40003 3 26 43 4 100
13 4 27 45 4 100 40004 4 27 45 4 100
14 5 15 26 4 100 40005 5 15 26 4 100
15 5 16 19 5 100 50005 5 16 19 5 100
16 54 8 8 5 100 50054 54 8 8 5 100
17 53 8 8 5 100 50053 53 8 8 5 100
18 56 25 25 5 100 50056 56 25 25 5 100
19 55 5 5 5 100 50055 55 5 5 5 100
20 1 302 504 6 100 60001 1 302 504 6 100
21 2 25 42 6 100 60002 2 25 42 6 100
22 53 8 8 6 100 60053 53 8 8 6 100
23 54 8 8 6 100 60054 54 8 8 6 100
24 1 345 576 7 100 70001 1 345 576 7 100
25 2 22 38 7 100 70002 2 22 38 7 100
26 3 12 20 7 100 70003 3 12 20 7 100
27 4 15 26 7 100 70004 4 15 26 7 100
28 55 5 5 7 100 70055 55 5 5 7 100
29 56 10 10 7 100 70056 56 10 10 7 100
30 3 33 56 8 100 80003 3 33 56 8 100
31 4 34 58 8 100 80004 4 34 58 8 100
32 5 23 27 8 100 80005 5 23 27 8 100
33 56 10 10 8 100 80056 56 10 10 8 100
34 5 22 26 9 100 90005 5 22 26 9 100
35 54 10 10 9 100 90054 54 10 10 9 100
36 53 10 10 9 100 90053 53 10 10 9 100
37 56 40 40 9 100 90056 56 40 40 9 100
38 55 15 15 9 100 90055 55 15 15 9 100
39 101 8 15 9 100 90101 101 8 15 9 100
40 102 8 15 9 100 90102 102 8 15 9 100
41 103 8 15 9 100 90103 103 8 15 9 100
42 104 8 15 9 100 90104 104 8 15 9 100
43 105 8 15 9 100 90105 105 8 15 9 100
44 106 8 15 9 100 90106 106 8 15 9 100
45 1 1608 2680 10 100 100001 1 1608 2680 10 100
46 2 134 223 10 100 100002 2 134 223 10 100
47 53 10 10 10 100 100053 53 10 10 10 100
48 54 10 10 10 100 100054 54 10 10 10 100
49 107 8 15 10 100 100107 107 8 15 10 100
50 108 8 15 10 100 100108 108 8 15 10 100
51 109 8 15 10 100 100109 109 8 15 10 100
52 110 8 15 10 100 100110 110 8 15 10 100
53 111 8 15 10 100 100111 111 8 15 10 100
54 112 8 15 10 100 100112 112 8 15 10 100
55 1 1837 3063 11 100 110001 1 1837 3063 11 100
56 2 121 202 11 100 110002 2 121 202 11 100
57 3 63 106 11 100 110003 3 63 106 11 100
58 4 82 138 11 100 110004 4 82 138 11 100
59 55 5 5 11 100 110055 55 5 5 11 100
60 56 15 15 11 100 110056 56 15 15 11 100
61 107 5 5 11 100 110107 107 5 5 11 100
62 108 5 5 11 100 110108 108 5 5 11 100
63 109 5 5 11 100 110109 109 5 5 11 100
64 110 5 5 11 100 110110 110 5 5 11 100
65 111 5 5 11 100 110111 111 5 5 11 100
66 112 5 5 11 100 110112 112 5 5 11 100
67 3 5 5 12 100 120003 3 5 5 12 100
68 4 185 308 12 100 120004 4 185 308 12 100
69 5 31 36 12 100 120005 5 31 36 12 100
70 56 25 25 12 100 120056 56 25 25 12 100
71 101 5 10 12 100 120101 101 5 10 12 100
72 102 5 10 12 100 120102 102 5 10 12 100
73 103 5 10 12 100 120103 103 5 10 12 100
74 104 5 10 12 100 120104 104 5 10 12 100
75 105 5 10 12 100 120105 105 5 10 12 100
76 106 5 10 12 100 120106 106 5 10 12 100

View File

@ -16,14 +16,19 @@ public class SFoodsConfig implements BaseConfig {
private int[] effectValue; private int[] effectValue;
private static Map<Integer,SFoodsConfig> sFoodsConfigMap;
@Override @Override
public void init() throws Exception { public void init() throws Exception {
sFoodsConfigMap = STableManager.getConfig(SFoodsConfig.class);
} }
public static SFoodsConfig getsFoodsConfigByFoodId(int foodId) {
return sFoodsConfigMap.get(foodId);
}
public int getId() { public int getId() {
return id; return id;
} }

View File

@ -3,6 +3,8 @@ package com.ljsd.jieling.core;
public interface GlobalsDef { public interface GlobalsDef {
String DEFAULT_NAME = "无名妖灵师"; String DEFAULT_NAME = "无名妖灵师";
int BATTLING = -1;
int BREAK_TYPE =1 ; //1突破 int BREAK_TYPE =1 ; //1突破
int UP_STAR_TYPE = 2; //2升星 int UP_STAR_TYPE = 2; //2升星
@ -12,6 +14,7 @@ public interface GlobalsDef {
int PHYSICAL_DEFENCE_TYPE =3; int PHYSICAL_DEFENCE_TYPE =3;
int MAGIC_DEFENCE_TYPE =4; int MAGIC_DEFENCE_TYPE =4;
int SPEED_TYPE =5; int SPEED_TYPE =5;
int ACTION_POWER_RORMULA_TYPE =6; //英雄行动力
// //
int RANKUP_PARA_TYPE =1; int RANKUP_PARA_TYPE =1;

View File

@ -191,7 +191,7 @@ public class MapLogic {
/** /**
* *
*/ */
public List<CommonProto.HeroFightInfo> fightStart(int uid, int bigEventId, User user){ public List<CommonProto.HeroFightInfo> fightStart(int uid, int bigEventId, User user) throws Exception {
String key = RedisKey.getKey(RedisKey.FIGHT, Integer.toString(uid) + RedisKey.UNDERLINE_LINE + Integer.toString(bigEventId), false); String key = RedisKey.getKey(RedisKey.FIGHT, Integer.toString(uid) + RedisKey.UNDERLINE_LINE + Integer.toString(bigEventId), false);
RedisUtil.getInstence().set(key, Integer.toString(uid), RedisKey.EXPIRE_TIME); RedisUtil.getInstence().set(key, Integer.toString(uid), RedisKey.EXPIRE_TIME);
Set<String> heroes = user.getMapManager().getHeroes(); Set<String> heroes = user.getMapManager().getHeroes();
@ -525,4 +525,6 @@ public class MapLogic {
MessageUtil.sendMessage(session, 1, messageType.getNumber(), null, true); MessageUtil.sendMessage(session, 1, messageType.getNumber(), null, true);
} }
//在地图吃东西
} }

View File

@ -159,6 +159,31 @@ public class Hero extends MongoBase {
this.breakId = breakId; this.breakId = breakId;
} }
public int getLastUpdateEnergyTime() {
return lastUpdateEnergyTime;
}
public void updateEnergy(int energy,int updateTime) throws Exception {
updateString("energy",energy);
updateString("lastUpdateEnergyTime",energy);
this.energy = energy;
this.lastUpdateEnergyTime = updateTime;
}
public void setCreateTime(int createTime) throws Exception {
updateString("createTime",createTime);
this.createTime = createTime;
}
public void setLastUpdateEnergyTime(int lastUpdateEnergyTime) throws Exception {
updateString("lastUpdateEnergyTime",lastUpdateEnergyTime);
this.lastUpdateEnergyTime = lastUpdateEnergyTime;
}
public int getEnergy() {
return energy;
}
public int getCreateTime() { public int getCreateTime() {
return createTime; return createTime;
} }

View File

@ -3,6 +3,8 @@ package com.ljsd.jieling.logic.fight;
import com.ljsd.jieling.config.SAdventureConfig; import com.ljsd.jieling.config.SAdventureConfig;
import com.ljsd.jieling.config.SAdventureSetting; import com.ljsd.jieling.config.SAdventureSetting;
import com.ljsd.jieling.config.SFoodsConfig;
import com.ljsd.jieling.handler.map.MapManager;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.hero.HeroLogic; import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.network.session.ISession; import com.ljsd.jieling.network.session.ISession;
@ -11,6 +13,7 @@ import com.ljsd.jieling.protocols.FightInfoProto;
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.ItemUtil;
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;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -131,7 +134,7 @@ public class CombatLogic {
float myForceRatio = totalForce*1.0f / recommendForce; float myForceRatio = totalForce*1.0f / recommendForce;
float hourRewardRatioTmp = calABX(hourDuration, hourRewardRatio); float hourRewardRatioTmp = MathUtils.calABX(hourDuration, hourRewardRatio);
float baseRewardRatioTmp = calRatio(myForceRatio, baseRewardRatio) * hourRewardRatioTmp; float baseRewardRatioTmp = calRatio(myForceRatio, baseRewardRatio) * hourRewardRatioTmp;
float randomRewardRatioTmp = calRatio(myForceRatio, randomRewardRatio) * hourRewardRatioTmp; float randomRewardRatioTmp = calRatio(myForceRatio, randomRewardRatio) * hourRewardRatioTmp;
@ -169,25 +172,23 @@ public class CombatLogic {
return result; return result;
} }
//ab x 公式
public float calABX(float source,float[] base){ //在地图吃东西
float result = 0; public void outMap(ISession session, int foodId) throws Exception {
int length = base.length; int uid = session.getUid();
for(int i=0;i< base.length;i++){
double pow = Math.pow(source, --length);
result += base[i]*pow;
}
return result;
}
public void eatFood(ISession iSession,int foodId) throws Exception {
int uid = iSession.getUid();
User user = UserManager.getUser(uid); User user = UserManager.getUser(uid);
MapManager mapManager = user.getMapManager();
if (mapManager.getMapInfo() == null) {
LOGGER.info("mapManager.getMapInfo() == null");
return;
}
boolean enough = ItemUtil.itemCost(user, new int[][]{{foodId, 1}});
if(!enough){
return;
}
SFoodsConfig sFoodsConfig = SFoodsConfig.getsFoodsConfigByFoodId(foodId);
} }
} }

View File

@ -476,6 +476,10 @@ public class HeroLogic {
float randSpeedRatio = MathUtils.random(speed[0], speed[1]) / 100.0f; float randSpeedRatio = MathUtils.random(speed[0], speed[1]) / 100.0f;
return (int)((baseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(baseValue, hero.getBreakId()))*randSpeedRatio); return (int)((baseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(baseValue, hero.getBreakId()))*randSpeedRatio);
} }
if(type == GlobalsDef.ACTION_POWER_RORMULA_TYPE){
int[] actionPowerRormula = SGameSetting.getGameSetting().getActionPowerRormula();
return (int)MathUtils.calABX(hero.getLevel(),actionPowerRormula);
}
return (int)(baseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + baseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f); return (int)(baseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + baseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f);
} }
@ -723,7 +727,7 @@ public class HeroLogic {
} }
// 异妖进阶 //
public void pokemonAdvanced(ISession session,int pokemonId) throws Exception { public void pokemonAdvanced(ISession session,int pokemonId) throws Exception {
int uid = session.getUid(); int uid = session.getUid();
User user = UserManager.getUser(uid); User user = UserManager.getUser(uid);

View File

@ -245,11 +245,6 @@ public class WorkShopLogic {
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.WORKSHOP_FOUNDATION_RESPONSE_VALUE,null,true); MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.WORKSHOP_FOUNDATION_RESPONSE_VALUE,null,true);
} }
public static void main(String[] args) {
Date date = new Date(1545253200*1000L);
System.out.println(date);
}
//装备打造 TODO //装备打造 TODO
public void createEquipByUser(ISession session,int equipTid, List<Integer> runneIdsList) throws Exception { public void createEquipByUser(ISession session,int equipTid, List<Integer> runneIdsList) throws Exception {
int uid=session.getUid(); int uid=session.getUid();

View File

@ -1,5 +1,6 @@
package com.ljsd.jieling.network.server; package com.ljsd.jieling.network.server;
import com.google.protobuf.GeneratedMessage;
import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.MessageLite; import com.google.protobuf.MessageLite;
import com.ljsd.GameApplication; import com.ljsd.GameApplication;

View File

@ -1,6 +1,9 @@
package com.ljsd.jieling.util; package com.ljsd.jieling.util;
import com.ljsd.jieling.config.SCHero;
import com.ljsd.jieling.config.SGameSetting;
import com.ljsd.jieling.config.SMonsterConfig; import com.ljsd.jieling.config.SMonsterConfig;
import com.ljsd.jieling.core.GlobalsDef;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.protocols.CommonProto; import com.ljsd.jieling.protocols.CommonProto;
import com.ljsd.jieling.protocols.FightInfoProto; import com.ljsd.jieling.protocols.FightInfoProto;
@ -39,13 +42,15 @@ public class CBean2Proto {
return itemProto; return itemProto;
} }
public static CommonProto.Hero getHero(Hero hero){ public static CommonProto.Hero getHero(Hero hero) throws Exception {
Map<Integer, String> equipByPositionMap = hero.getEquipByPositionMap(); Map<Integer, String> equipByPositionMap = hero.getEquipByPositionMap();
List<String> equipList = new ArrayList<>(); List<String> equipList = new ArrayList<>();
for(String equipId : equipByPositionMap.values()){ if(equipByPositionMap!=null && !equipByPositionMap.isEmpty()){
equipList.add(equipId); equipList.addAll(equipByPositionMap.values());
} }
CommonProto.Hero heroProto = CommonProto.Hero //todo 只能自己才能检测恢复精力
checkAndUpdateHeroEnergy(hero);
return CommonProto.Hero
.newBuilder() .newBuilder()
.setId(hero.getId()) .setId(hero.getId())
.setHeroId(hero.getTemplateId()) .setHeroId(hero.getTemplateId())
@ -53,11 +58,26 @@ public class CBean2Proto {
.setStar(hero.getStar()) .setStar(hero.getStar())
.setBreakId(hero.getBreakId()) .setBreakId(hero.getBreakId())
.setCreateTime(hero.getCreateTime()) .setCreateTime(hero.getCreateTime())
.setEnergy(hero.getEnergy())
.setLastUpdateEnergyTime(hero.getLastUpdateEnergyTime())
.addAllSkillIdList(hero.getSkillList()) .addAllSkillIdList(hero.getSkillList())
.addAllEquipIdList(equipList) .addAllEquipIdList(equipList)
.build(); .build();
return heroProto;
} }
private static void checkAndUpdateHeroEnergy(Hero hero) throws Exception {
int baseEnergy = hero.getEnergy();
if(hero.getLastUpdateEnergyTime() != GlobalsDef.BATTLING && baseEnergy<SGameSetting.getGameSetting().getInitialEnergy()){
int updateTime = (int)(System.currentTimeMillis()/1000);
int addValue = (updateTime - hero.getLastUpdateEnergyTime())/60/SGameSetting.getGameSetting().getEnergyRecoverSpeed();
if(addValue == 0){
return;
}
int curEnergy = MathUtils.setBetweenWithMax(baseEnergy + addValue,0,SGameSetting.getGameSetting().getInitialEnergy());
hero.updateEnergy(curEnergy,updateTime);
}
}
public static CommonProto.Mail getMail(Mail mail){ public static CommonProto.Mail getMail(Mail mail){
CommonProto.Mail mailProto = CommonProto.Mail CommonProto.Mail mailProto = CommonProto.Mail
.newBuilder() .newBuilder()

View File

@ -118,4 +118,26 @@ public class MathUtils {
} }
return b; return b;
} }
//ab x 公式
public static float calABX(float source,float[] base){
float result = 0;
int length = base.length;
for(int i=0;i< base.length;i++){
double pow = Math.pow(source, --length);
result += base[i]*pow;
}
return result;
}
//ab x 公式
public static float calABX(float source,int[] base){
float result = 0;
int length = base.length;
for(int i=0;i< base.length;i++){
double pow = Math.pow(source, --length);
result += base[i]*pow;
}
return result;
}
} }