1
This commit is contained in:
parent
b48af6a792
commit
90f97ad76c
@ -56,12 +56,14 @@ class Quest{
|
|||||||
if ($q['condition'] == 7 && $quest_type == 1) {
|
if ($q['condition'] == 7 && $quest_type == 1) {
|
||||||
if($quest_num <= $q['value']) {
|
if($quest_num <= $q['value']) {
|
||||||
$quest_state = 1;
|
$quest_state = 1;
|
||||||
|
$this->triggerQuest(71013, 1, 1, $account_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($row['quest_num'] + $quest_num >= $q['value']) {
|
if ($row['quest_num'] + $quest_num >= $q['value']) {
|
||||||
$quest_num = $q['value'];
|
$quest_num = $q['value'];
|
||||||
$quest_state = 1;
|
$quest_state = 1;
|
||||||
|
$this->triggerQuest(71013, 1, 1, $account_id);
|
||||||
} else {
|
} else {
|
||||||
$quest_num = $row['quest_num'] + $quest_num;
|
$quest_num = $row['quest_num'] + $quest_num;
|
||||||
$quest_state = 0;
|
$quest_state = 0;
|
||||||
@ -86,11 +88,13 @@ class Quest{
|
|||||||
if ($q['condition'] == 7 && $quest_type == 1) {
|
if ($q['condition'] == 7 && $quest_type == 1) {
|
||||||
if($quest_num <= $q['value']) {
|
if($quest_num <= $q['value']) {
|
||||||
$quest_state = 1;
|
$quest_state = 1;
|
||||||
|
$this->triggerQuest(71013, 1, 1, $account_id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($quest_num >= $q['value']) {
|
if ($quest_num >= $q['value']) {
|
||||||
$quest_num = $q['value'];
|
$quest_num = $q['value'];
|
||||||
$quest_state = 1;
|
$quest_state = 1;
|
||||||
|
$this->triggerQuest(71013, 1, 1, $account_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ret = $conn->execScript('INSERT INTO quest(accountid, quest_id, quest_num, quest_type, quest_state) ' .
|
$ret = $conn->execScript('INSERT INTO quest(accountid, quest_id, quest_num, quest_type, quest_state) ' .
|
||||||
|
@ -114,6 +114,10 @@ class EquipController{
|
|||||||
phpcommon\sendError(ERR_USER_BASE + 3, '金币不足');
|
phpcommon\sendError(ERR_USER_BASE + 3, '金币不足');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($e['equip_level'] >= 10) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 4, '装备已到满级');
|
||||||
|
return;
|
||||||
|
}
|
||||||
$row = $conn->execQueryOne('SELECT * FROM equip WHERE accountid=:account_id AND equip_id=:equip_id;',
|
$row = $conn->execQueryOne('SELECT * FROM equip WHERE accountid=:account_id AND equip_id=:equip_id;',
|
||||||
array(
|
array(
|
||||||
':account_id' => $account_id,
|
':account_id' => $account_id,
|
||||||
@ -148,6 +152,9 @@ class EquipController{
|
|||||||
}
|
}
|
||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(71005, 1, 1, $account_id);
|
$quest->triggerQuest(71005, 1, 1, $account_id);
|
||||||
|
if ($e['equip_nextlevel'] == 10) {
|
||||||
|
$quest->triggerQuest(72005, 2, 1, $account_id);
|
||||||
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg' => '',
|
'errmsg' => '',
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'classes/Quest.php';
|
||||||
|
|
||||||
class SignController{
|
class SignController{
|
||||||
|
|
||||||
protected function getMysql($account_id)
|
protected function getMysql($account_id)
|
||||||
@ -61,6 +63,9 @@ 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'];
|
||||||
|
$quest = new classes\Quest();
|
||||||
|
$quest->triggerQuest(71001, 1, 1, $account_id);
|
||||||
|
$quest->triggerQuest(72001, 2, 1, $account_id);
|
||||||
} else {
|
} else {
|
||||||
if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['sign_time']) > 0) {
|
if (phpcommon\getdayseconds(time()) - phpcommon\getdayseconds($row['sign_time']) > 0) {
|
||||||
$sign_days = $row['sign_days'] + 1;
|
$sign_days = $row['sign_days'] + 1;
|
||||||
@ -81,6 +86,9 @@ 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'];
|
||||||
|
$quest = new classes\Quest();
|
||||||
|
$quest->triggerQuest(71001, 1, 1, $account_id);
|
||||||
|
$quest->triggerQuest(72001, 2, 1, $account_id);
|
||||||
} else {
|
} else {
|
||||||
$sign_days = $row['sign_days'];
|
$sign_days = $row['sign_days'];
|
||||||
$signable = 1;
|
$signable = 1;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'classes/Quest.php';
|
||||||
|
|
||||||
class SupplyBoxController{
|
class SupplyBoxController{
|
||||||
|
|
||||||
protected function getMysql($account_id)
|
protected function getMysql($account_id)
|
||||||
@ -184,6 +186,9 @@ class SupplyBoxController{
|
|||||||
'item_id' => $item_id,
|
'item_id' => $item_id,
|
||||||
'item_num' => $item_num,
|
'item_num' => $item_num,
|
||||||
));
|
));
|
||||||
|
$quest = new classes\Quest();
|
||||||
|
$quest->triggerQuest(71004, 1, 1, $account_id);
|
||||||
|
$quest->triggerQuest(72004, 2, 1, $account_id);
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg' => '',
|
'errmsg' => '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user