Skip to content

Commit

Permalink
Merge branch 'iss#112' into dev-forest
Browse files Browse the repository at this point in the history
* iss#112:
  2.5.9
  Fixing #112 - Negative Honor Bug - modified super modifier to ignore bonus currency and penalty values less than 0 (negative honor will not debuff rewards and negative penalties will not buff rewards)
  • Loading branch information
foresthoffman committed Feb 23, 2016
2 parents 100ff78 + 6e52949 commit d4daca0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion game-on.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description: Gamification tools for teachers.
Author: Valhalla Mac Lab
Author URI: https://github.com/TheMacLab/game-on/blob/master/README.md
Version: 2.5.8
Version: 2.5.9
*/

include( 'go_datatable.php' );
Expand Down
4 changes: 2 additions & 2 deletions go_pnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ function go_return_multiplier( $user_id, $points, $currency, $user_bonuses, $use
$bonus_threshold = (int) get_option( 'go_multiplier_threshold', 10 );
$penalty_threshold = (int) get_option( 'go_penalty_threshold', 5 );
$multiplier = ( (int) get_option( 'go_multiplier_percentage', 10 ) ) / 100;
$bonus_frac = intval( $user_bonuses / $bonus_threshold );
$penalty_frac = intval( $user_penalties / $penalty_threshold );
$bonus_frac = ( $user_bonuses > 0 ? intval( $user_bonuses / $bonus_threshold ) : 0 );
$penalty_frac = ( $user_penalties > 0 ? intval( $user_penalties / $penalty_threshold ) : 0 );
$diff = $bonus_frac - $penalty_frac;
if ( $diff == 0 ) {
if ( $return_mod === false ) {
Expand Down

0 comments on commit d4daca0

Please sign in to comment.