1
This commit is contained in:
parent
4b1e33d91a
commit
7d52ce5bed
@ -497,10 +497,14 @@ class AddReward {
|
|||||||
$active_time = 0;
|
$active_time = 0;
|
||||||
}
|
}
|
||||||
if ($t == 0) {
|
if ($t == 0) {
|
||||||
$status = $this->getStatus($item_id, $status,$accountid);
|
if ($item_id >= 14000 && $item_id < 15000) {
|
||||||
|
$status = $this->getStatus($item_id, $status,$accountid);
|
||||||
|
}
|
||||||
} else if ($t == 1){
|
} else if ($t == 1){
|
||||||
$status = 0;
|
if ($item_id >= 14000 && $item_id < 15000) {
|
||||||
$this->updateStatus($item_id, $accountid);
|
$status = 0;
|
||||||
|
$this->updateStatus($item_id, $accountid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$ret = $conn->execScript('INSERT INTO bag(accountid, id, color_id, status, num, active_time, create_time, modify_time) ' .
|
$ret = $conn->execScript('INSERT INTO bag(accountid, id, color_id, status, num, active_time, create_time, modify_time) ' .
|
||||||
' VALUES(:account_id, :id, 0, :status, 0, :active_time, :create_time, :modify_time) ' .
|
' VALUES(:account_id, :id, 0, :status, 0, :active_time, :create_time, :modify_time) ' .
|
||||||
@ -537,10 +541,14 @@ class AddReward {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($t == 0) {
|
if ($t == 0) {
|
||||||
$status = $this->getStatus($item_id, $status,$accountid);
|
if ($item_id >= 14000 && $item_id < 15000) {
|
||||||
|
$status = $this->getStatus($item_id, $status,$accountid);
|
||||||
|
}
|
||||||
} else if ($t == 1){
|
} else if ($t == 1){
|
||||||
$status = 0;
|
if ($item_id >= 14000 && $item_id < 15000) {
|
||||||
$this->updateStatus($item_id, $accountid);
|
$status = 0;
|
||||||
|
$this->updateStatus($item_id, $accountid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$ret = $conn->execScript('UPDATE bag SET active_time=:active_time, status=:status, modify_time=:modify_time ' .
|
$ret = $conn->execScript('UPDATE bag SET active_time=:active_time, status=:status, modify_time=:modify_time ' .
|
||||||
' WHERE accountid=:account_id AND id=:id;',
|
' WHERE accountid=:account_id AND id=:id;',
|
||||||
|
@ -4,6 +4,7 @@ require 'classes/Quest.php';
|
|||||||
require 'classes/AddReward.php';
|
require 'classes/AddReward.php';
|
||||||
require_once 'metatable/drop.php';
|
require_once 'metatable/drop.php';
|
||||||
require_once 'metatable/draw.php';
|
require_once 'metatable/draw.php';
|
||||||
|
require_once 'metatable/parameter.php';
|
||||||
|
|
||||||
class ActivityController extends BaseAuthedController {
|
class ActivityController extends BaseAuthedController {
|
||||||
|
|
||||||
@ -1200,7 +1201,7 @@ class ActivityController extends BaseAuthedController {
|
|||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
':id' => $id,
|
':id' => $id,
|
||||||
));
|
));
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1214,6 +1215,7 @@ class ActivityController extends BaseAuthedController {
|
|||||||
$times = 1;
|
$times = 1;
|
||||||
$extra_id = 0;
|
$extra_id = 0;
|
||||||
$isfree = false;
|
$isfree = false;
|
||||||
|
$item_list = array();
|
||||||
if ($type == 0) {
|
if ($type == 0) {
|
||||||
$cost = explode(':', $dr['onecost']);
|
$cost = explode(':', $dr['onecost']);
|
||||||
if ($rowd && $rowd['free_times'] != 0) {
|
if ($rowd && $rowd['free_times'] != 0) {
|
||||||
@ -1223,50 +1225,67 @@ class ActivityController extends BaseAuthedController {
|
|||||||
$cost = explode(':', $dr['tencost']);
|
$cost = explode(':', $dr['tencost']);
|
||||||
$extra_id = $dr['ten_drop'];
|
$extra_id = $dr['ten_drop'];
|
||||||
$times = 9;
|
$times = 9;
|
||||||
|
if (isset($_REQUEST['isnew']) && $_REQUEST['isnew'] == 1) {
|
||||||
|
if ($id == 1) {
|
||||||
|
$drop_id = metatable\getParameterByName('newbie_draw_cloth1');
|
||||||
|
$extra_id = metatable\getParameterByName('newbie_draw_cloth10');
|
||||||
|
$times = 8;
|
||||||
|
array_push($item_list, array(
|
||||||
|
'item_id' => 15001,
|
||||||
|
'item_num' => 1,
|
||||||
|
'time' => 0,
|
||||||
|
));
|
||||||
|
} else if ($id == 2) {
|
||||||
|
$drop_id = metatable\getParameterByName('newbie_draw_arms1');
|
||||||
|
$extra_id = metatable\getParameterByName('newbie_draw_arms10');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$coin_num = $row['coin_num'];
|
$coin_num = $row['coin_num'];
|
||||||
$rmb_num = $row['rmb_num'];
|
$rmb_num = $row['rmb_num'];
|
||||||
$draw_times = $rowd['draw_times'] + 1;
|
$draw_times = $rowd['draw_times'] + 1;
|
||||||
$free_times = $rowd['free_times'];
|
$free_times = $rowd['free_times'];
|
||||||
if (!$isfree) {
|
if (isset($_REQUEST['isnew']) && $_REQUEST['isnew'] == 1) {
|
||||||
if ($cost[0] == 10001) {
|
} else {
|
||||||
if ($row['coin_num'] < $cost[1]) {
|
if (!$isfree) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 2, '金币不足');
|
if ($cost[0] == 10001) {
|
||||||
return;
|
if ($row['coin_num'] < $cost[1]) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 2, '金币不足');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$coin_num = $row['coin_num'] - $cost[1];
|
||||||
|
} else if ($cost[0] == 10003) {
|
||||||
|
if ($row['rmb_num'] < $cost[1]) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 3, '点券不足');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$rmb_num = $row['rmb_num'] - $cost[1];
|
||||||
}
|
}
|
||||||
$coin_num = $row['coin_num'] - $cost[1];
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num, rmb_num=:rmb_num, modify_time=:modify_time ' .
|
||||||
} else if ($cost[0] == 10003) {
|
' WHERE accountid=:accountid;',
|
||||||
if ($row['rmb_num'] < $cost[1]) {
|
array(
|
||||||
phpcommon\sendError(ERR_USER_BASE + 3, '点券不足');
|
':accountid' => $account_id,
|
||||||
return;
|
':coin_num' => $coin_num,
|
||||||
}
|
':rmb_num' => $rmb_num,
|
||||||
$rmb_num = $row['rmb_num'] - $cost[1];
|
':modify_time' => phpcommon\getNowTime()
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
$free_times = $rowd['free_times'] - 1;
|
||||||
}
|
}
|
||||||
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num, rmb_num=:rmb_num, modify_time=:modify_time ' .
|
$ret = $conn->execScript('UPDATE draw SET free_times=:free_times, draw_times=:draw_times, modifytime=:modifytime ' .
|
||||||
' WHERE accountid=:accountid;',
|
' WHERE accountid=:accountid AND id=:id;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
':coin_num' => $coin_num,
|
':free_times' => $free_times,
|
||||||
':rmb_num' => $rmb_num,
|
':draw_times' => $draw_times,
|
||||||
':modify_time' => phpcommon\getNowTime()
|
':id' => $id,
|
||||||
|
':modifytime' => phpcommon\getNowTime()
|
||||||
));
|
));
|
||||||
} else {
|
if (!$ret) {
|
||||||
$free_times = $rowd['free_times'] - 1;
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$ret = $conn->execScript('UPDATE draw SET free_times=:free_times, draw_times=:draw_times, modifytime=:modifytime ' .
|
|
||||||
' WHERE accountid=:accountid AND id=:id;',
|
|
||||||
array(
|
|
||||||
':accountid' => $account_id,
|
|
||||||
':free_times' => $free_times,
|
|
||||||
':draw_times' => $draw_times,
|
|
||||||
':id' => $id,
|
|
||||||
':modifytime' => phpcommon\getNowTime()
|
|
||||||
));
|
|
||||||
if (!$ret) {
|
|
||||||
die();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$item_list = array();
|
|
||||||
if ($times == 1) {
|
if ($times == 1) {
|
||||||
if ($draw_times % 10 == 0) {
|
if ($draw_times % 10 == 0) {
|
||||||
$item_list = metatable\getDropAllListById($extra_id, $item_list);
|
$item_list = metatable\getDropAllListById($extra_id, $item_list);
|
||||||
|
@ -82,7 +82,7 @@ class BaseAuthedController extends BaseController {
|
|||||||
$row = phpcommon\SqlHelper::selectOne
|
$row = phpcommon\SqlHelper::selectOne
|
||||||
($this->getSelfMysql(),
|
($this->getSelfMysql(),
|
||||||
'user',
|
'user',
|
||||||
array($fields),
|
$fields,
|
||||||
array(
|
array(
|
||||||
'accountid' => $this->getAccountId()
|
'accountid' => $this->getAccountId()
|
||||||
)
|
)
|
||||||
|
@ -98,28 +98,28 @@ class EquipController extends BaseAuthedController {
|
|||||||
if (!$rows) {
|
if (!$rows) {
|
||||||
//新玩家装备数据
|
//新玩家装备数据
|
||||||
//$id = $addreward->getRealIndexid(12151, $account_id);
|
//$id = $addreward->getRealIndexid(12151, $account_id);
|
||||||
$id = 23001;
|
// $id = 23001;
|
||||||
$ret = $conn->execScript('INSERT INTO equip(accountid, id, lv, active_time, sub_time, create_time, modify_time, using_id, exp) ' .
|
// $ret = $conn->execScript('INSERT INTO equip(accountid, id, lv, active_time, sub_time, create_time, modify_time, using_id, exp) ' .
|
||||||
' VALUES(:account_id, :id, 0, :active_time, :sub_time, :create_time, :modify_time, :using_id, 0) ' .
|
// ' VALUES(:account_id, :id, 0, :active_time, :sub_time, :create_time, :modify_time, :using_id, 0) ' .
|
||||||
' ON DUPLICATE KEY UPDATE accountid=:account_id, id=:id, lv=0, active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time, using_id=:using_id, exp=0;',
|
// ' ON DUPLICATE KEY UPDATE accountid=:account_id, id=:id, lv=0, active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time, using_id=:using_id, exp=0;',
|
||||||
array(
|
// array(
|
||||||
':account_id' => $account_id,
|
// ':account_id' => $account_id,
|
||||||
':id' => $id,
|
// ':id' => $id,
|
||||||
':active_time' => 0,
|
// ':active_time' => 0,
|
||||||
':create_time' => phpcommon\getNowTime(),
|
// ':create_time' => phpcommon\getNowTime(),
|
||||||
':modify_time' => phpcommon\getNowTime(),
|
// ':modify_time' => phpcommon\getNowTime(),
|
||||||
':sub_time' => 0,
|
// ':sub_time' => 0,
|
||||||
':using_id' => $id,
|
// ':using_id' => $id,
|
||||||
));
|
// ));
|
||||||
if(!$ret){
|
// if(!$ret){
|
||||||
die();
|
// die();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
array_push($equip_list, array(
|
array_push($equip_list, array(
|
||||||
'id' => $id,
|
'id' => 0,
|
||||||
'lv' => 0,
|
'lv' => 0,
|
||||||
'active_time' => 0,
|
'active_time' => 0,
|
||||||
'using_id' => $id,
|
'using_id' => 0,
|
||||||
'exp' => 0,
|
'exp' => 0,
|
||||||
'time_flag' => 0,
|
'time_flag' => 0,
|
||||||
));
|
));
|
||||||
|
@ -586,4 +586,43 @@ class GameOverController extends BaseAuthedController {
|
|||||||
'errmsg'=> '',
|
'errmsg'=> '',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addGameTimes()
|
||||||
|
{
|
||||||
|
$row = phpcommon\SqlHelper::selectOne
|
||||||
|
($this->getSelfMysql(),
|
||||||
|
'user',
|
||||||
|
array(
|
||||||
|
'game_times',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'accountid' => $this->getAccountId()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!$row) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret = phpcommon\SqlHelper::update
|
||||||
|
($this->getSelfMysql(),
|
||||||
|
'user',
|
||||||
|
array(
|
||||||
|
'accountid' => $this->getAccountId()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'game_times' => $row['game_times'] + 1,
|
||||||
|
'modify_time' => $this->getNowTime()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg'=> '',
|
||||||
|
'game_times' => $row['game_times'] + 1,
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,6 +449,7 @@ class HangController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$num = 0;
|
$num = 0;
|
||||||
|
$onlinetime = phpcommon\getNowTime();
|
||||||
} else {
|
} else {
|
||||||
$addreward = new classes\AddReward();
|
$addreward = new classes\AddReward();
|
||||||
$p_num = $this->getParameter(OFFLINE_REWARD_NUMBER);
|
$p_num = $this->getParameter(OFFLINE_REWARD_NUMBER);
|
||||||
@ -462,6 +463,7 @@ class HangController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$val2 = $addreward->getVipVal($account_id, 6);
|
$val2 = $addreward->getVipVal($account_id, 6);
|
||||||
$num = floor($num + $num * $val2 / 100);
|
$num = floor($num + $num * $val2 / 100);
|
||||||
|
$onlinetime = $row['hang_time'];
|
||||||
}
|
}
|
||||||
$cost = metatable\getParameterByName('season_card_cost');
|
$cost = metatable\getParameterByName('season_card_cost');
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
@ -489,6 +491,7 @@ class HangController extends BaseAuthedController {
|
|||||||
'pass_array' => $pass_array,
|
'pass_array' => $pass_array,
|
||||||
'onlinenum' => $num,
|
'onlinenum' => $num,
|
||||||
'max_rank' => $max_rank,
|
'max_rank' => $max_rank,
|
||||||
|
'onlinetime' => $onlinetime,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,6 +512,18 @@ class HangController extends BaseAuthedController {
|
|||||||
$num = 0;
|
$num = 0;
|
||||||
$item_list = array();
|
$item_list = array();
|
||||||
$all_item_list = array();
|
$all_item_list = array();
|
||||||
|
$rowuser = $conn->execQueryOne('SELECT game_times FROM user WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id
|
||||||
|
));
|
||||||
|
if (!$rowuser || $rowuser['game_times'] < metatable\getParameterByName('function_open_coin')) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$isnew = 0;
|
||||||
|
if (isset($_REQUEST['isnew']) && $_REQUEST['isnew'] == 1) {
|
||||||
|
$isnew = 1;
|
||||||
|
}
|
||||||
$row = $conn->execQueryOne('SELECT * FROM hang WHERE accountid=:accountid;',
|
$row = $conn->execQueryOne('SELECT * FROM hang WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id
|
':accountid' => $account_id
|
||||||
@ -536,7 +551,8 @@ class HangController extends BaseAuthedController {
|
|||||||
$val = $addreward->getVipVal($account_id, 8);
|
$val = $addreward->getVipVal($account_id, 8);
|
||||||
$max_time = $p_time_limit['value'] + $val;
|
$max_time = $p_time_limit['value'] + $val;
|
||||||
$num = floor((phpcommon\getNowTime() - $row['hang_time']) / $p_val['value'] * $p_num['value']);
|
$num = floor((phpcommon\getNowTime() - $row['hang_time']) / $p_val['value'] * $p_num['value']);
|
||||||
if ((phpcommon\getNowTime() - $row['hang_time']) >= $max_time) {
|
if ((phpcommon\getNowTime() - $row['hang_time']) >= $max_time ||
|
||||||
|
$isnew == 1) {
|
||||||
$num = floor($max_time / $p_val['value'] * $p_num['value']);
|
$num = floor($max_time / $p_val['value'] * $p_num['value']);
|
||||||
}
|
}
|
||||||
$val2 = $addreward->getVipVal($account_id, 6);
|
$val2 = $addreward->getVipVal($account_id, 6);
|
||||||
|
@ -9,7 +9,7 @@ require_once 'metatable/parameter.php';
|
|||||||
require_once 'metatable/activityplus.php';
|
require_once 'metatable/activityplus.php';
|
||||||
require_once 'metatable/parameter.php';
|
require_once 'metatable/parameter.php';
|
||||||
|
|
||||||
class PayActivityController extends BaseAuthedController {
|
class NewPayActivityController extends BaseAuthedController {
|
||||||
|
|
||||||
private $data = null;
|
private $data = null;
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
'rmb_lot_ticket'
|
'rmb_lot_ticket'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'accontid' => $this->getAccountId()
|
'accountid' => $this->getAccountId()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
@ -365,7 +365,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$isUp = false;
|
$isUp = false;
|
||||||
$addreward = new classes\AddReward();
|
$addreward = new classes\AddReward();
|
||||||
$new_lv = $addreward->getVipLevel($account_id);
|
$new_lv = $addreward->getVipLevel($this->getAccountId());
|
||||||
$item_list = $this->getActRewardList($type, $id, $idx, $draw_type);
|
$item_list = $this->getActRewardList($type, $id, $idx, $draw_type);
|
||||||
if (!$item_list || empty($item_list)) {
|
if (!$item_list || empty($item_list)) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励');
|
phpcommon\sendError(ERR_USER_BASE + 3, '没有这个奖励');
|
||||||
@ -373,7 +373,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$all_item_list = array();
|
$all_item_list = array();
|
||||||
foreach ($item_list as $item) {
|
foreach ($item_list as $item) {
|
||||||
$items = $addreward->addReward($item['item_id'], $item['item_num'], $account_id, $item['time'], 0);
|
$items = $addreward->addReward($item['item_id'], $item['item_num'], $this->getAccountId(), $item['time'], 0);
|
||||||
foreach($items as $i) {
|
foreach($items as $i) {
|
||||||
array_push($all_item_list, array(
|
array_push($all_item_list, array(
|
||||||
'item_id' => $i['item_id'],
|
'item_id' => $i['item_id'],
|
||||||
@ -382,13 +382,19 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$coin_num = $addreward->getCoinNum($account_id);
|
$coin_num = $addreward->getCoinNum($this->getAccountId());
|
||||||
$rmb_num = $addreward->getRmbNum($account_id);
|
$rmb_num = $addreward->getRmbNum($this->getAccountId());
|
||||||
$rmb_ticket = $addreward->getRmbTicketNum($account_id);
|
$rmb_ticket = $addreward->getRmbTicketNum($this->getAccountId());
|
||||||
$row = $conn->execQueryOne('SELECT free_box FROM user WHERE accountid=:accountid;',
|
$row = phpcommon\SqlHelper::selectOne
|
||||||
array(
|
($this->getSelfMysql(),
|
||||||
':accountid' => $account_id,
|
'user',
|
||||||
));
|
array(
|
||||||
|
'free_box',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'accountid' => $this->getAccountId()
|
||||||
|
)
|
||||||
|
);
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg' => '',
|
'errmsg' => '',
|
||||||
@ -462,7 +468,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
$actdb = isset($this->data['daily_list'][$id]) ? $this->data['daily_list'][$id] : null;
|
$actdb = isset($this->data['daily_list'][$id]) ? $this->data['daily_list'][$id] : null;
|
||||||
if ($actdb == null) {
|
if ($actdb == null) {
|
||||||
$actdb = array();
|
$actdb = array();
|
||||||
$cond_conf = explode('|', $act['condition']);
|
$cond_conf = explode('|', $actMeta['condition']);
|
||||||
foreach ($cond_conf as $c) {
|
foreach ($cond_conf as $c) {
|
||||||
$actdb[$c] = array(
|
$actdb[$c] = array(
|
||||||
'act_cond' => $c, //活动目标条件
|
'act_cond' => $c, //活动目标条件
|
||||||
@ -487,7 +493,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
//计算价格
|
//计算价格
|
||||||
$decPrice = 0;
|
$decPrice = 0;
|
||||||
foreach ($actdb as $c) {
|
foreach ($actdb as $c) {
|
||||||
if ($this->calcDailyActCondRemainDay($actdb) > 0 && $c['act_cond'] < $cond) {
|
if ($this->calcDailyActRemainDay($actdb) > 0 && $c['act_cond'] < $cond) {
|
||||||
$decPrice += $c['act_cond'];
|
$decPrice += $c['act_cond'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -495,7 +501,7 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
//计算剩余天数
|
//计算剩余天数
|
||||||
$new_remain_day = $this->getDailyActCondRemainDay($actdb) + $cond;
|
$new_remain_day = $this->calcDailyActRemainDay($actdb) + $cond;
|
||||||
$actdb['remain_day'] = $new_remain_day;
|
$actdb['remain_day'] = $new_remain_day;
|
||||||
$actdb['last_buytime'] = $this->getNowTime();
|
$actdb['last_buytime'] = $this->getNowTime();
|
||||||
$cond_actdb['last_buytime'] = $this->getNowTime();
|
$cond_actdb['last_buytime'] = $this->getNowTime();
|
||||||
@ -507,6 +513,15 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$item_list = metatable\getDropListById($item_conf['fuctionindex']);
|
$item_list = metatable\getDropListById($item_conf['fuctionindex']);
|
||||||
|
$item_str = $item_conf['buy_reward'];
|
||||||
|
$it_arr = $this->getExplode($item_str);
|
||||||
|
foreach ($it_arr as $it) {
|
||||||
|
array_push($item_list, array(
|
||||||
|
'item_id' => $it[0],
|
||||||
|
'item_num' => $it[1],
|
||||||
|
'time' => $it[2],
|
||||||
|
));
|
||||||
|
}
|
||||||
for ($i = 1; $i < $cond_idx + 1; $i++) {
|
for ($i = 1; $i < $cond_idx + 1; $i++) {
|
||||||
$addreward->addReward($i + 19000, 1, $this->getAccountId(), 0, 0);
|
$addreward->addReward($i + 19000, 1, $this->getAccountId(), 0, 0);
|
||||||
}
|
}
|
||||||
@ -1039,4 +1054,3 @@ class PayActivityController extends BaseAuthedController {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
@ -279,7 +279,7 @@ class RoleController extends BaseAuthedController {
|
|||||||
// }
|
// }
|
||||||
// if ($avatar_url != $row['avatar_url']) {
|
// if ($avatar_url != $row['avatar_url']) {
|
||||||
// $ret = $conn->execScript('UPDATE user SET avatar_url=:avatar_url, modify_time=:modify_time ' .
|
// $ret = $conn->execScript('UPDATE user SET avatar_url=:avatar_url, modify_time=:modify_time ' .
|
||||||
// ' WHERE accountid=:accountid;',
|
// ' WHERE accountid=:accountid;',
|
||||||
// array(
|
// array(
|
||||||
// ':accountid' => $account_id,
|
// ':accountid' => $account_id,
|
||||||
// ':avatar_url' => $avatar_url,
|
// ':avatar_url' => $avatar_url,
|
||||||
@ -799,7 +799,7 @@ class RoleController extends BaseAuthedController {
|
|||||||
public function oldBattleReport()
|
public function oldBattleReport()
|
||||||
{
|
{
|
||||||
$account_id = $_REQUEST['account_id']; //账号
|
$account_id = $_REQUEST['account_id']; //账号
|
||||||
$conn = $this->getMysql($account_id);
|
$conn = $this->getMysql($account_id);
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
@ -977,7 +977,6 @@ class RoleController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$game_times2++;
|
$game_times2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, kills=:kills, harm=:harm, add_HP=:add_HP, alive_time=:alive_time, kill_his=:kill_his, alive_time_his=:alive_time_his, harm_his=:harm_his, add_HP_his=:add_HP_his, coin_num=:coin_num, modify_time=:modify_time, first_fight=1, box_num=:box_num, score=:score, daily_time=:daily_time, season_games=:season_games, sea_max_kill=:sea_max_kill, sea_max_hart=:sea_max_hart, sea_avg_kill=:sea_avg_kill, newhand=:newhand, newhand2=:newhand2, game_times2=:game_times2 ' .
|
$ret = $conn->execScript('UPDATE user SET game_times=:game_times, kills=:kills, harm=:harm, add_HP=:add_HP, alive_time=:alive_time, kill_his=:kill_his, alive_time_his=:alive_time_his, harm_his=:harm_his, add_HP_his=:add_HP_his, coin_num=:coin_num, modify_time=:modify_time, first_fight=1, box_num=:box_num, score=:score, daily_time=:daily_time, season_games=:season_games, sea_max_kill=:sea_max_kill, sea_max_hart=:sea_max_hart, sea_avg_kill=:sea_avg_kill, newhand=:newhand, newhand2=:newhand2, game_times2=:game_times2 ' .
|
||||||
'WHERE accountid=:accountid;',
|
'WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
@ -1483,7 +1482,6 @@ class RoleController extends BaseAuthedController {
|
|||||||
protected function createSessionId($accountid, $registertime, $session_key)
|
protected function createSessionId($accountid, $registertime, $session_key)
|
||||||
{
|
{
|
||||||
$nowtime = phpcommon\getNowTime();
|
$nowtime = phpcommon\getNowTime();
|
||||||
// error_log($accountid . 'f3a6a9a5-217a-4079-ab99-b5d69b8212be' . $registertime . $nowtime);
|
|
||||||
$session_id = $nowtime
|
$session_id = $nowtime
|
||||||
. '_'
|
. '_'
|
||||||
. $registertime
|
. $registertime
|
||||||
@ -1567,7 +1565,6 @@ class RoleController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
//$coin_num = $_REQUEST['num'];
|
//$coin_num = $_REQUEST['num'];
|
||||||
//$coin_num = round($num * pow($val, $coin_times));
|
//$coin_num = round($num * pow($val, $coin_times));
|
||||||
//error_log($coin_num);
|
|
||||||
$ret = $conn->execScript('UPDATE user SET coin_times=:coin_times, coin_num=:coin_num, modify_time=:modify_time ' .
|
$ret = $conn->execScript('UPDATE user SET coin_times=:coin_times, coin_num=:coin_num, modify_time=:modify_time ' .
|
||||||
' WHERE accountid=:accountid;',
|
' WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user