1
This commit is contained in:
parent
575d4312ee
commit
8521df0fa6
@ -4,6 +4,7 @@ namespace classes;
|
||||
|
||||
use phpcommon;
|
||||
use metatable;
|
||||
|
||||
require_once 'metatable/privilegecard.php';
|
||||
|
||||
class Privilege
|
||||
@ -24,7 +25,7 @@ class Privilege
|
||||
|
||||
public function getBattlePlus($account_id)
|
||||
{
|
||||
return 0;//$this->getPrivilegePlus($account_id, 'battleplus');
|
||||
return 0; //$this->getPrivilegePlus($account_id, 'battleplus');
|
||||
}
|
||||
|
||||
public function getCoinTimesPlus($account_id)
|
||||
@ -45,16 +46,19 @@ class Privilege
|
||||
':accountid' => $account_id,
|
||||
)
|
||||
);
|
||||
|
||||
if (!$row || $row['vip_info'] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$plus = 0;
|
||||
if ($row) {
|
||||
$nowtime = time();
|
||||
$vip_info = json_decode($row['vip_info'], true);
|
||||
foreach ($vip_info as $carditem) {
|
||||
if ($carditem['expire'] == 0 || $carditem['expire'] > $nowtime) {
|
||||
$privilegecard_conf = metatable\getPrivilegeCardById($carditem['id']);
|
||||
if (!$privilegecard_conf) {
|
||||
$plus += $privilegecard_conf[$name];
|
||||
}
|
||||
$nowtime = time();
|
||||
$vip_info = json_decode($row['vip_info'], true);
|
||||
foreach ($vip_info as $carditem) {
|
||||
if ($carditem['expire'] == 0 || $carditem['expire'] > $nowtime) {
|
||||
$privilegecard_conf = metatable\getPrivilegeCardById($carditem['id']);
|
||||
if (!$privilegecard_conf) {
|
||||
$plus += $privilegecard_conf[$name];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user