File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " exile-x" ,
33 "private" : true ,
4- "version" : " 0.3.0 " ,
4+ "version" : " 0.3.1 " ,
55 "description" : " A League Client Companion with automatisations" ,
66 "main" : " dist-electron/main.js" ,
77 "author" : " Gredon" ,
Original file line number Diff line number Diff line change @@ -119,14 +119,20 @@ class Honor {
119119 for ( const stat in stats ) {
120120 let actualStat = player . stats [ stat ] ;
121121 const { type, value : bestValue , weigth } = stats [ stat ] ;
122- console . log ( `- ${ stat } : ${ bestValue } ` ) ;
122+ console . log ( `- ${ stat } : ${ actualStat } ` ) ;
123123
124124 if ( type === 'lower' ) {
125125 score += actualStat ? ( bestValue / actualStat ) * weigth : weigth / 5 + weigth ;
126126 continue ;
127127 }
128128
129+ if ( ! bestValue ) {
130+ console . log ( `Best Value for ${ stat } is ${ bestValue } so ignore it.` ) ;
131+ continue
132+ } ;
133+
129134 score += ( actualStat / bestValue ) * weigth ;
135+
130136 }
131137
132138 console . log ( `- Score : ${ score } \n` ) ;
@@ -171,6 +177,7 @@ class Honor {
171177 }
172178 }
173179
180+ console . log ( 'Best Stats' , bestStats ) ;
174181 return bestStats ;
175182 }
176183
You can’t perform that action at this time.
0 commit comments