Le calcul des points c'était n'importe quoi. J'ai simplifié c'est désormais: le nombre de ressources consommées x 0.7
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
aed31bcfc8
commit
dcb0eaf50d
@ -113,6 +113,7 @@ class User
|
|||||||
|
|
||||||
public function addPoints($metal, $cristal, $hydrogene, $credits = 0, $demolition = false)
|
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;
|
global $table_bourse_ressources;
|
||||||
//On charge les 3 valeurs boursières
|
//On charge les 3 valeurs boursières
|
||||||
$bdd = new BDD();
|
$bdd = new BDD();
|
||||||
@ -129,6 +130,11 @@ class User
|
|||||||
$points = bourse_calcPrixBase($bourse[0]["dispo"], $metal);
|
$points = bourse_calcPrixBase($bourse[0]["dispo"], $metal);
|
||||||
$points += bourse_calcPrixBase($bourse[1]["dispo"], $cristal);
|
$points += bourse_calcPrixBase($bourse[1]["dispo"], $cristal);
|
||||||
$points += bourse_calcPrixBase($bourse[2]["dispo"], $hydrogene);
|
$points += bourse_calcPrixBase($bourse[2]["dispo"], $hydrogene);
|
||||||
|
*/
|
||||||
|
$rate = 0.7;
|
||||||
|
$points = $metal *$rate;
|
||||||
|
$points += $cristal *$rate;
|
||||||
|
$points += $hydrogene *$rate;
|
||||||
|
|
||||||
if ($demolition) {
|
if ($demolition) {
|
||||||
$this->points -= intval($points);
|
$this->points -= intval($points);
|
||||||
|
Loading…
Reference in New Issue
Block a user