...
This commit is contained in:
parent
76cb211997
commit
38848eb8ee
@ -63,6 +63,7 @@ define('TN_WEEKLY_END', 10005);
|
||||
|
||||
define('SHOP_BUY_MODE_NORMAL', 0);
|
||||
define('SHOP_BUY_MODE_DAILY_SELECTION', 1);
|
||||
define('MARKET_BUY_MODE_NORMAL', 2);
|
||||
|
||||
const kHAT_Begin = 0;
|
||||
const kHAT_Hp = 1;
|
||||
|
@ -681,7 +681,6 @@ class MarketController extends BaseAuthedController
|
||||
|
||||
public function buy()
|
||||
{
|
||||
$account = strtolower(getReqVal('account', ''));
|
||||
$idx = getReqVal('idx', '');
|
||||
|
||||
$goods = $this->getGoodsByIdx($idx);
|
||||
@ -712,7 +711,8 @@ class MarketController extends BaseAuthedController
|
||||
'order_type' => 1,
|
||||
'price' => $goods['s_price'],
|
||||
'ext_data' => json_encode(array(
|
||||
'mode' => SHOP_BUY_MODE_NORMAL,
|
||||
'mode' => MARKET_BUY_MODE_NORMAL,
|
||||
'idx' => $idx,
|
||||
)),
|
||||
));
|
||||
|
||||
|
@ -699,16 +699,16 @@ class ShopController extends BaseAuthedController
|
||||
{
|
||||
$address = $this->_getAccountId();
|
||||
|
||||
$maxCount = mt\Parameter::getByName('daily_selection_refresh_time')['param_value'];
|
||||
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
||||
$arrCosts = explode('|', $costs['param_value']);
|
||||
$maxCount = count($arrCosts);
|
||||
|
||||
$count = $this->countTodayRefreshTimes($address);
|
||||
if ($count >= $maxCount) {
|
||||
$this->_rspErr(2, 'The maximum number of refreshes has been reached');
|
||||
return;
|
||||
}
|
||||
|
||||
$count = $this->countTodayRefreshTimes($address);
|
||||
$costs = mt\Parameter::getByName('daily_selection_refresh_cost');
|
||||
$arrCosts = explode('|', $costs['param_value']);
|
||||
$cost = $arrCosts[$count];
|
||||
$costItemId = $this->getCostItemIdByTokenType(ShopController::TOKEN_TYPE_GOLD);
|
||||
$costItems = $this->makeCostItems($costItemId, $cost);
|
||||
|
Loading…
x
Reference in New Issue
Block a user