From e465e7469b43511c0691571ae4a906a3efa1386b Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 23 Oct 2022 13:00:41 +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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Host.php b/app/Models/Host.php index 86f399e..4d21195 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -95,11 +95,13 @@ public function cost($price = null, $auto = true) $drops = $transaction->getDrops($this->user_id); - if ($price == null) { + if ($price !== null) { + $real_price = $price; + } else { $real_price = $this->price; } - if ($price == 0) { + if ($real_price == 0) { return true; }