From 2a4a9f4b1a5d02f15272e45346a8e85f06ad9919 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Fri, 9 Sep 2022 20:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Host.php | 4 ++++ 1 file changed, 4 insertions(+) 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;