28 lines
851 B
PHP
28 lines
851 B
PHP
<?php
|
|
|
|
namespace services;
|
|
|
|
class ContributionService extends BaseService {
|
|
|
|
private static $ignoreCa = array(
|
|
'BlockChain@mintGoldBullion'=>1,
|
|
'InGameMall@sellS'=>2,
|
|
'InGameMall@buyS'=>3,
|
|
'InGameMall@shoppingCartBuyS'=>4,
|
|
);
|
|
|
|
public static function onGoldConsume($params) {
|
|
$ca = getReqVal('c', '') . '@' . getReqVal('a','');
|
|
if (array_key_exists($ca, self::$ignoreCa)) {
|
|
return;
|
|
}
|
|
if ($ca == 'Bag@buyItemS' && getReqVal('item_id', '')== 900006){
|
|
return;
|
|
}
|
|
myself()->_giveContributionPoint(round($params/10,2));
|
|
myself()->_callModelStatic('Contribution', 'add', round($params/10,2));
|
|
myself()->_callModelStatic('Contribution', 'addHistory', $params, round($params/10,2),getReqVal('c', ''),getReqVal('a',''));
|
|
}
|
|
|
|
}
|