This commit is contained in:
yangduo 2025-01-16 18:32:09 +08:00
parent 575d4312ee
commit 8521df0fa6

View File

@ -4,6 +4,7 @@ namespace classes;
use phpcommon; use phpcommon;
use metatable; use metatable;
require_once 'metatable/privilegecard.php'; require_once 'metatable/privilegecard.php';
class Privilege class Privilege
@ -24,7 +25,7 @@ class Privilege
public function getBattlePlus($account_id) public function getBattlePlus($account_id)
{ {
return 0;//$this->getPrivilegePlus($account_id, 'battleplus'); return 0; //$this->getPrivilegePlus($account_id, 'battleplus');
} }
public function getCoinTimesPlus($account_id) public function getCoinTimesPlus($account_id)
@ -45,8 +46,12 @@ class Privilege
':accountid' => $account_id, ':accountid' => $account_id,
) )
); );
if (!$row || $row['vip_info'] == NULL) {
return 0;
}
$plus = 0; $plus = 0;
if ($row) {
$nowtime = time(); $nowtime = time();
$vip_info = json_decode($row['vip_info'], true); $vip_info = json_decode($row['vip_info'], true);
foreach ($vip_info as $carditem) { foreach ($vip_info as $carditem) {
@ -57,7 +62,6 @@ class Privilege
} }
} }
} }
}
return $plus; return $plus;
} }