1
This commit is contained in:
parent
db2b3d4b29
commit
066a7ea94f
@ -77,10 +77,10 @@ class QuestController{
|
||||
for ($i = 73001; $i < 73006; $i++) {
|
||||
$quest_id = $i;
|
||||
$row = $conn->execQueryOne('SELECT * FROM quest WHERE accountid=:accountid AND quest_id=:quest_id;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_id' => $quest_id
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_id' => $quest_id
|
||||
));
|
||||
$t = $this->getTaskReward($quest_id);
|
||||
if ($row['quest_state'] != 0 || $active_num < $t['value']) {
|
||||
continue;
|
||||
@ -145,11 +145,11 @@ class QuestController{
|
||||
}
|
||||
$ret = $conn->execScript('DELETE FROM quest ' .
|
||||
' WHERE accountid=:accountid AND quest_type=:quest_type AND quest_id<:quest_id;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_type' => 0,
|
||||
':quest_id' => $quest_id
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_type' => 0,
|
||||
':quest_id' => $quest_id
|
||||
));
|
||||
}
|
||||
|
||||
public function QuestInfo()
|
||||
@ -166,9 +166,9 @@ class QuestController{
|
||||
return;
|
||||
}
|
||||
$row = $conn->execQueryOne('SELECT active_sum, sum_time FROM active WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
));
|
||||
if ($row) {
|
||||
//每周更新活跃度
|
||||
if (phpcommon\getMondayseconds(time()) - phpcommon\getMondayseconds($row['sum_time']) > 0) {
|
||||
@ -178,9 +178,9 @@ class QuestController{
|
||||
}
|
||||
}
|
||||
$row = $conn->execQueryOne('SELECT active_num, num_time FROM active WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
));
|
||||
if ($row) {
|
||||
//每日更新活跃度
|
||||
if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['num_time']) > 0) {
|
||||
@ -266,11 +266,11 @@ class QuestController{
|
||||
return;
|
||||
}
|
||||
$row = $conn->execQueryOne('SELECT * FROM quest WHERE accountid=:accountid AND quest_id=:quest_id AND quest_type=:quest_type;',
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_id' => $quest_id,
|
||||
':quest_type' => $quest_type
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id,
|
||||
':quest_id' => $quest_id,
|
||||
':quest_type' => $quest_type
|
||||
));
|
||||
if (!$row) {
|
||||
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个任务');
|
||||
return;
|
||||
@ -295,9 +295,9 @@ class QuestController{
|
||||
|
||||
if ($row['quest_type'] == 1) {
|
||||
$active = $conn->execQueryOne('SELECT active_num, active_sum FROM active WHERE accountid=:accountid;',
|
||||
array(
|
||||
':accountid' => $account_id
|
||||
));
|
||||
array(
|
||||
':accountid' => $account_id
|
||||
));
|
||||
//增加活跃度
|
||||
if (!$active) {
|
||||
$this->insertActive($account_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user