From dcb0eaf50db9a103e264b25e761232afd9c14382 Mon Sep 17 00:00:00 2001 From: Nigel Sheldon Date: Fri, 1 Jan 2021 14:27:52 +0100 Subject: [PATCH] =?UTF-8?q?Le=20calcul=20des=20points=20c'=C3=A9tait=20n'i?= =?UTF-8?q?mporte=20quoi.=20J'ai=20simplifi=C3=A9=20c'est=20d=C3=A9sormais?= =?UTF-8?q?:=20le=20nombre=20de=20ressources=20consomm=C3=A9es=20x=200.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- onyx2/include/Class/user.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/onyx2/include/Class/user.php b/onyx2/include/Class/user.php index 6571675..4492209 100644 --- a/onyx2/include/Class/user.php +++ b/onyx2/include/Class/user.php @@ -113,6 +113,7 @@ class User public function addPoints($metal, $cristal, $hydrogene, $credits = 0, $demolition = false) { + /* Ancien code, fait des calculs boursier dans le système de points, wtf ? global $table_bourse_ressources; //On charge les 3 valeurs boursières $bdd = new BDD(); @@ -129,6 +130,11 @@ class User $points = bourse_calcPrixBase($bourse[0]["dispo"], $metal); $points += bourse_calcPrixBase($bourse[1]["dispo"], $cristal); $points += bourse_calcPrixBase($bourse[2]["dispo"], $hydrogene); + */ + $rate = 0.7; + $points = $metal *$rate; + $points += $cristal *$rate; + $points += $hydrogene *$rate; if ($demolition) { $this->points -= intval($points);