diff --git a/app/Models/Host.php b/app/Models/Host.php index f7af372..c9803d8 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -89,6 +89,8 @@ public function cost($price = null) $amount = $price / Cache::get('drops_rate', 100) + 1; + $amount = intval(log10(abs($amount)) / 3); + // if drops <= price if ($drops < $this->price) { @@ -115,6 +117,8 @@ public function cost($price = null) $this->price = intval(log10(abs($this->price)) / 3); + echo $this->price; + Cache::decrement($cache_key, $this->price); return true;