diff --git a/src/Player.php b/src/Player.php index a384a4a..849fa16 100644 --- a/src/Player.php +++ b/src/Player.php @@ -235,14 +235,18 @@ class Player if ($key < $round || $round == -1) { if ($pairing->Result == Result::WON_BYE) { $points += (isset($custompoints[ 'bye' ])) ? $custompoints[ 'bye' ] : 1; + $points += (isset($custompoints[ 'presence' ])) ? $custompoints[ 'presence' ] : 0; } else if ($pairing->Result == Result::ABSENT) { $points += (isset($custompoints[ 'absent' ])) ? $custompoints[ 'absent' ] : 0; } elseif (array_search($pairing->Result, Constants::WON) !== false) { $points += (isset($custompoints[ 'win' ])) ? $custompoints[ 'win' ] : 1; + $points += (isset($custompoints[ 'presence' ])) ? $custompoints[ 'presence' ] : 0; } elseif (array_search($pairing->Result, Constants::DRAW) !== false) { $points += (isset($custompoints[ 'draw' ])) ? $custompoints[ 'draw' ] : 0.5; + $points += (isset($custompoints[ 'presence' ])) ? $custompoints[ 'presence' ] : 0; } elseif (array_search($pairing->Result, Constants::LOST) !== false) { $points += (isset($custompoints[ 'loss' ])) ? $custompoints[ 'loss' ] : 0; + $points += (isset($custompoints[ 'presence' ])) ? $custompoints[ 'presence' ] : 0; } } }