diff --git a/doc/_common.py b/doc/_common.py index 5b437a44..f0c5d8f2 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -845,4 +845,6 @@ class BattleHistory(object): ['pve_rank_score', 0, 'pve冒险积分'], ['pve_kill_boss', 0, 'pve冒险是否击杀BOSS'], ['battle_foreign_key', 0, '结算外键'], + ['pve_instance_id', 0, 'pve副本难度id'], + ['pve_instance_mode', 0, 'pve副本mode'], ] \ No newline at end of file diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 33a46609..e32099db 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -672,6 +672,8 @@ CREATE TABLE `t_battle_history` ( `level_class_score_chg` int(11) NOT NULL DEFAULT '0' COMMENT '排位分改变', `pve_rank_score` int(11) NOT NULL DEFAULT '0' COMMENT 'pve冒险积分', `pve_kill_boss` int(11) NOT NULL DEFAULT '0' COMMENT 'pve冒险是否击杀BOSS', + `pve_instance_id` int(11) NOT NULL DEFAULT '0' COMMENT 'pve副本难度id', + `pve_instance_mode` int(11) NOT NULL DEFAULT '0' COMMENT 'pve副本mode', `battle_foreign_key` int(11) NOT NULL DEFAULT '0' COMMENT '结算外键', PRIMARY KEY (`idx`), UNIQUE KEY `account_id_battle_uniid` (`account_id`, `battle_uniid`) diff --git a/webapp/mt/RankSeason.php b/webapp/mt/RankSeason.php new file mode 100644 index 00000000..e42172ed --- /dev/null +++ b/webapp/mt/RankSeason.php @@ -0,0 +1,10 @@ + 0, // 排位分改变 "pve_rank_score" => getReqVal('pve_rank_score', 0), "pve_kill_boss" => getReqVal('pve_kill_boss', 0), + "pve_instance_id" => getReqVal('pve_instance_id', 0), + "pve_instance_mode" => getReqVal('pve_instance_mode', 0), ); BattleHistory::add($data); } @@ -433,6 +435,22 @@ class BattleDataService extends BaseService { } private function updatePvpData() + { + error_log('updateBattleData1'); + $this->rankActivityService->updateBattleData(); + error_log('updateBattleData2'); + $hisBattleData = Battle::getMyBattleData(); + if (!isset($hisBattleData)) { + $hisBattleData = array( + 'createtime' => myself()->_getNowTime(), + 'modifytime' => myself()->_getNowTime() + ); + } + $this->apply($hisBattleData); + Battle::add(json_encode($hisBattleData)); + } + + private function updateSeasonData() { error_log('updateBattleData1'); $this->rankActivityService->updateBattleData();