You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that contract extensions are wrongly counted. The salary should depend on the number of games played (including assists and goals) and the strength of the player.
// if salary is already higher than average, then just expect 10% more
if ($player["player_contract_salary"] > $averageSalary) {
$salaryFactor = 1.10;
} else {
// make minimum salary dependent on happiness
$salaryFactor = (200 - $satisfaction) / 100;
}
$salaryFactor = max(1.1, $salaryFactor);
$minSalary = round($player["player_contract_salary"] * $salaryFactor);
// the salary should be at least 90% of the average, except if this would douple the salary
if ($averageSalary < ($parameters["salary"] * 2)) {
$minSalaryOfAverage = round(0.9 * $averageSalary);
$minSalary = max($minSalary, $minSalaryOfAverage);
}
if ($parameters["salary"] < $minSalary) {
// decrease satisfaction
$this->decreaseSatisfaction($player["player_id"], $player["player_strength_satisfaction"]);
throw new Exception($this->_i18n->getMessage("extend-contract_salary_too_low"));
}`
The text was updated successfully, but these errors were encountered:
It seems to me that contract extensions are wrongly counted. The salary should depend on the number of games played (including assists and goals) and the strength of the player.
`$averageSalary = $this->getAverageSalary($player["player_strength"]);
The text was updated successfully, but these errors were encountered: