From 4adc3539cddd69fc00f9f17fccc4fa7dd3ebea08 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 17 Sep 2022 15:07:09 +0800 Subject: [PATCH] 1 --- webapp/bootstrap/constant.php | 5 +++-- webapp/services/BattleDataService.php | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index 24d39613..9e56f8c2 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -32,8 +32,9 @@ define('TN_DAILY_RECHARGE_UPGRADE_TIMES', 9004); define('TN_DAILY_SHARE_GAMES', 9005); define('TN_DAILY_PVE_BATTLE_TIMES', 9006); define('TN_DAILY_PVE_GET_FRAGMENT_NUM', 9007); -define('TN_DAILY_PVP_GET_FRAGMENT_NUM', 9008); -define('TN_DAILY_END', 9008); +define('TN_DAILY_PVP_BATTLE_TIMES', 9008); +define('TN_DAILY_PVP_GET_FRAGMENT_NUM', 9009); +define('TN_DAILY_END', 9009); define('TN_WEEKLY_BEGIN', 10001); define('TN_WEEKLY_ACTIVE', 10002); diff --git a/webapp/services/BattleDataService.php b/webapp/services/BattleDataService.php index e0864b53..08ab7284 100644 --- a/webapp/services/BattleDataService.php +++ b/webapp/services/BattleDataService.php @@ -460,7 +460,16 @@ class BattleDataService extends BaseService { private function rewardFragmentPvp() { + $todayPvpBattleTimes = $this->_getDailyV(TN_DAILY_PVP_BATTLE_TIMES, 0); + $todayPveGetFragmentNum = $this->_getDailyV(TN_DAILY_PVE_GET_FRAGMENT_NUM, 0); + $todayPvpGetFragmentNum = $this->_getDailyV(TN_DAILY_PVP_GET_FRAGMENT_NUM, 0); + $this->_incDailyV(TN_DAILY_PVP_BATTLE_TIMES, 1); + if ($todayPveGetFragmentNum + $todayPvpGetFragmentNum > 2) { + return; + } + + $onlineNum = $this->getOnlineNumber(); } private function rewardFragmentPve()