From 91bc73461220cd02afe2743d71ddbcae0ac3e9c8 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Tue, 10 May 2022 01:59:10 +0900 Subject: [PATCH] =?UTF-8?q?feat:=201,=207=EC=9B=94=EB=A7=88=EB=8B=A4=20?= =?UTF-8?q?=EC=9C=A0=EC=82=B0=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20rank=5Fdata?= =?UTF-8?q?=20=ED=86=B5=EA=B3=84=EB=A5=BC=20=EB=83=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_time_event.php | 19 +++++++++++++++++++ hwe/sammo/TurnExecutionHelper.php | 2 ++ 2 files changed, 21 insertions(+) diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index d11a9e34..d25c055d 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -1,10 +1,29 @@ update( + 'UPDATE `rank_data` D SET `value` = (SELECT SUM(`value`) FROM `rank_data` S WHERE S.general_id = D.general_id AND S.`type` IN %ls) WHERE D.`type` = %s', + [RankColumn::inherit_point_earned_by_action->value, RankColumn::inherit_point_earned_by_merge->value], + RankColumn::inherit_point_earned->value + ); + + $db->update( + 'UPDATE `rank_data` D SET `value` = (SELECT `value` FROM `rank_data` S WHERE S.general_id = D.general_id AND S.`type` = %s) WHERE D.`type` = %s', + RankColumn::inherit_point_spent_dynamic->value, + RankColumn::inherit_point_spent->value + ); +} + //1월마다 실행 function processSpring() { $db = DB::db(); diff --git a/hwe/sammo/TurnExecutionHelper.php b/hwe/sammo/TurnExecutionHelper.php index d6029d83..0c9cb2ec 100644 --- a/hwe/sammo/TurnExecutionHelper.php +++ b/hwe/sammo/TurnExecutionHelper.php @@ -411,6 +411,7 @@ class TurnExecutionHelper // 분기계산. 장수들 턴보다 먼저 있다면 먼저처리 if ($gameStor->month == 1) { + processSumInheritPointRank(); processSpring(); processGoldIncome(); updateYearly(); @@ -425,6 +426,7 @@ class TurnExecutionHelper updateQuaterly(); disaster(); } elseif ($gameStor->month == 7) { + processSumInheritPointRank(); processFall(); processRiceIncome(); updateQuaterly();