1
This commit is contained in:
parent
2869661d78
commit
f2d0ea5bb0
@ -57,6 +57,12 @@ class HangController{
|
|||||||
if ($weight != 0) {
|
if ($weight != 0) {
|
||||||
$num = $num * 3;
|
$num = $num * 3;
|
||||||
}
|
}
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $num
|
||||||
|
));
|
||||||
}
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
|
@ -346,6 +346,14 @@ class QuestController{
|
|||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'item_num' => $item_num,
|
'item_num' => $item_num,
|
||||||
));
|
));
|
||||||
|
if ($item_id == 10001) {
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $item_num
|
||||||
|
));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$q = $this->getQuest($quest_id);
|
$q = $this->getQuest($quest_id);
|
||||||
if (!$q) {
|
if (!$q) {
|
||||||
@ -353,7 +361,12 @@ class QuestController{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$reward = $q['gold'];
|
$reward = $q['gold'];
|
||||||
error_log($reward);
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $reward
|
||||||
|
));
|
||||||
}
|
}
|
||||||
if ($row['quest_type'] == 1) {
|
if ($row['quest_type'] == 1) {
|
||||||
$active = $conn->execQueryOne('SELECT active_num, active_sum FROM active WHERE accountid=:accountid;',
|
$active = $conn->execQueryOne('SELECT active_num, active_sum FROM active WHERE accountid=:accountid;',
|
||||||
|
@ -89,6 +89,8 @@ class RoleController{
|
|||||||
$harm_his = $harm;
|
$harm_his = $harm;
|
||||||
$alive_time_his = $alive_time;
|
$alive_time_his = $alive_time;
|
||||||
$add_HP_his = $add_HP;
|
$add_HP_his = $add_HP;
|
||||||
|
$coin_num = $_REQUEST['coin_num'];
|
||||||
|
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
@ -150,6 +152,12 @@ class RoleController{
|
|||||||
die();
|
die();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $coin_num
|
||||||
|
));
|
||||||
//刷新任务
|
//刷新任务
|
||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(71003, 1, 1, $account_id);
|
$quest->triggerQuest(71003, 1, 1, $account_id);
|
||||||
|
@ -63,6 +63,12 @@ class SignController{
|
|||||||
$s = $this->getSign($sign_days + 90000);
|
$s = $this->getSign($sign_days + 90000);
|
||||||
$item_id = $s['item_id'];
|
$item_id = $s['item_id'];
|
||||||
$num = $s['num'];
|
$num = $s['num'];
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $num
|
||||||
|
));
|
||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(71001, 1, 1, $account_id);
|
$quest->triggerQuest(71001, 1, 1, $account_id);
|
||||||
$quest->triggerQuest(72001, 2, 1, $account_id);
|
$quest->triggerQuest(72001, 2, 1, $account_id);
|
||||||
@ -86,6 +92,12 @@ class SignController{
|
|||||||
$s = $this->getSign($sign_days % 7 + 90000);
|
$s = $this->getSign($sign_days % 7 + 90000);
|
||||||
$item_id = $s['item_id'];
|
$item_id = $s['item_id'];
|
||||||
$num = $s['num'];
|
$num = $s['num'];
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $num
|
||||||
|
));
|
||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(71001, 1, 1, $account_id);
|
$quest->triggerQuest(71001, 1, 1, $account_id);
|
||||||
$quest->triggerQuest(72001, 2, 1, $account_id);
|
$quest->triggerQuest(72001, 2, 1, $account_id);
|
||||||
|
@ -186,6 +186,14 @@ class SupplyBoxController{
|
|||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'item_num' => $item_num,
|
'item_num' => $item_num,
|
||||||
));
|
));
|
||||||
|
if ($item_id == 10001) {
|
||||||
|
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':coin_num' => $item_num
|
||||||
|
));
|
||||||
|
}
|
||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(71004, 1, 1, $account_id);
|
$quest->triggerQuest(71004, 1, 1, $account_id);
|
||||||
$quest->triggerQuest(72004, 2, 1, $account_id);
|
$quest->triggerQuest(72004, 2, 1, $account_id);
|
||||||
@ -237,13 +245,13 @@ class SupplyBoxController{
|
|||||||
} else {
|
} else {
|
||||||
if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['last_buy_time']) > 0) {
|
if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['last_buy_time']) > 0) {
|
||||||
$ret = $conn->execScript('UPDATE supplybox SET buy_times=:buy_times, last_buy_time=:time ' .
|
$ret = $conn->execScript('UPDATE supplybox SET buy_times=:buy_times, last_buy_time=:time ' .
|
||||||
' WHERE accountid=:accountid AND box_id=:box_id;',
|
' WHERE accountid=:accountid AND box_id=:box_id;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
':box_id' => $box_id,
|
':box_id' => $box_id,
|
||||||
':buy_times' => 0,
|
':buy_times' => 0,
|
||||||
':time' => time()
|
':time' => time()
|
||||||
));
|
));
|
||||||
if (!$ret) {
|
if (!$ret) {
|
||||||
die();
|
die();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user