改进
This commit is contained in:
parent
47edd6cf73
commit
2a4a9f4b1a
@ -89,6 +89,8 @@ public function cost($price = null)
|
|||||||
|
|
||||||
|
|
||||||
$amount = $price / Cache::get('drops_rate', 100) + 1;
|
$amount = $price / Cache::get('drops_rate', 100) + 1;
|
||||||
|
$amount = intval(log10(abs($amount)) / 3);
|
||||||
|
|
||||||
|
|
||||||
// if drops <= price
|
// if drops <= price
|
||||||
if ($drops < $this->price) {
|
if ($drops < $this->price) {
|
||||||
@ -115,6 +117,8 @@ public function cost($price = null)
|
|||||||
|
|
||||||
$this->price = intval(log10(abs($this->price)) / 3);
|
$this->price = intval(log10(abs($this->price)) / 3);
|
||||||
|
|
||||||
|
echo $this->price;
|
||||||
|
|
||||||
Cache::decrement($cache_key, $this->price);
|
Cache::decrement($cache_key, $this->price);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user