This commit is contained in:
wangwei01 2019-07-02 18:45:00 +08:00
parent 352c3bfcc6
commit cafaf7d3ec
2 changed files with 39 additions and 8 deletions

View File

@ -240,6 +240,25 @@ CREATE TABLE `history_record`(
UNIQUE KEY `history_record_uuid` (`accountid`, `room_uuid`) UNIQUE KEY `history_record_uuid` (`accountid`, `room_uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `share_achievement`
--
DROP TABLE IF EXISTS `share_achievement`;
/*!40101 SET @saved_cs_client = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `share_achievement` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`ach_id` int(11) NOT NULL COMMENT '分享邀请成就id',
`status` int(11) NOT NULL COMMENT '状态(0:未领取,1:已领取)',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_ach_id` (`accountid`, `ach_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;

View File

@ -98,12 +98,13 @@ class SignController{
array( array(
':accountid' => $account_id ':accountid' => $account_id
)); ));
$nowTime = phpcommon\getdayseconds(time());
//触发活动任务 //触发活动任务
$act = $this->getActivityRewardConfig(QUEST_ACTIVITY_LOGIN); /*$act = $this->getActivityRewardConfig(QUEST_ACTIVITY_LOGIN);
$array = $this->getExplode($act['start_end_time']); $array = $this->getExplode($act['start_end_time']);
$nowTime = phpcommon\getdayseconds(time()); $nowTime = phpcommon\getdayseconds(time());
$start_time = $array[0][0] * 3600 + $array[0][1] * 60 + $nowTime; $start_time = $array[0][0] * 3600 + $array[0][1] * 60 + $nowTime;
$end_time = $array[1][0] * 3600 + $array[1][1] * 60 + $nowTime; $end_time = $array[1][0] * 3600 + $array[1][1] * 60 + $nowTime;*/
if (!$row) { if (!$row) {
$ret = $conn->execScript('INSERT INTO sign(accountid, sign_days, sign_time, create_time, modify_time) ' . $ret = $conn->execScript('INSERT INTO sign(accountid, sign_days, sign_time, create_time, modify_time) ' .
' VALUES(:accountid, :sign_days, :sign_time, :create_time, :modify_time) ' . ' VALUES(:accountid, :sign_days, :sign_time, :create_time, :modify_time) ' .
@ -124,9 +125,9 @@ class SignController{
$quest = new classes\Quest(); $quest = new classes\Quest();
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id); $quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
$quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id); $quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id);
if (time() >= $start_time && time() < $end_time) { /*if (time() >= $start_time && time() < $end_time) {
$quest->triggerQuest(QUEST_ACTIVITY_LOGIN, 3, 1, $account_id); $quest->triggerQuest(QUEST_ACTIVITY_LOGIN, 3, 1, $account_id);
} }*/
} else { } else {
if ($nowTime - phpcommon\getdayseconds($row['sign_time']) > 0) { if ($nowTime - phpcommon\getdayseconds($row['sign_time']) > 0) {
$sign_days = $row['sign_days'] + 1; $sign_days = $row['sign_days'] + 1;
@ -158,8 +159,19 @@ class SignController{
$quest = new classes\Quest(); $quest = new classes\Quest();
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id); $quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
$quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id); $quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id);
//刷新战斗结算奖励次数
$battle_ret = $conn->execScript('UPDATE user SET battle_re_times=0, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
array(
':accountid' => $account_id,
':modify_time' => time()
));
if (!$battle_ret) {
die();
return;
}
//刷新活动皮肤碎片收集状态 //刷新活动皮肤碎片收集状态
$rowSkinCount = $conn->execQueryRowCount('SELECT * FROM skin WHERE accountid=:accountid AND skin_type=:skin_type;', /*$rowSkinCount = $conn->execQueryRowCount('SELECT * FROM skin WHERE accountid=:accountid AND skin_type=:skin_type;',
array( array(
':accountid' => $account_id, ':accountid' => $account_id,
':skin_type' => 2 ':skin_type' => 2
@ -178,14 +190,14 @@ class SignController{
return; return;
} }
} }
} }*/
} else { } else {
$sign_days = $row['sign_days']; $sign_days = $row['sign_days'];
$signable = 1; $signable = 1;
if (time() >= $start_time && time() < $end_time) { /*if (time() >= $start_time && time() < $end_time) {
$quest = new classes\Quest(); $quest = new classes\Quest();
$quest->triggerQuest(QUEST_ACTIVITY_LOGIN, 3, 1, $account_id); $quest->triggerQuest(QUEST_ACTIVITY_LOGIN, 3, 1, $account_id);
} }*/
} }
} }
echo json_encode(array( echo json_encode(array(