Squashed commit of the following:
commit3ef363a01eAuthor: hide_d <hided62@gmail.com> Date: Mon Sep 6 02:30:00 2021 +0900 fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정 commit9e68bc90c2Author: hide_d <hided62@gmail.com> Date: Mon Sep 6 02:17:56 2021 +0900 재야에서 도시보기 warning commitd2590607c2Author: hide_d <hided62@gmail.com> Date: Sun Sep 5 23:05:06 2021 +0900 fix: div 0 commit2bce6e4f02Author: hide_d <hided62@gmail.com> Date: Sun Sep 5 23:02:52 2021 +0900 warning 메시지 수정 commite64812da72Author: hide_d <hided62@gmail.com> Date: Sat Sep 4 03:42:09 2021 +0900 fix: m장, 의병장 숙련이 설정되지 않는 버그 수정 commit7cd40fca03Author: hide_d <hided62@gmail.com> Date: Sat Aug 21 16:04:03 2021 +0900 fix: 모병/징병에서 조건 검사부 통솔 계산값 commitd1568a3b2cAuthor: hide_d <hided62@gmail.com> Date: Sat Aug 21 02:50:54 2021 +0900 허보에 수몰이 같이 들어간 버그 수정 commite7dcc84afcAuthor: hide_d <hided62@gmail.com> Date: Thu Aug 19 14:51:50 2021 +0900 REAMDME.md 버전 수정 commit8eaa940d4eAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:40:37 2021 +0900 Revert "fix: 7.2에서 오동작 버그 수정" This reverts commit9997675b1d. commit9997675b1dAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:32:47 2021 +0900 fix: 7.2에서 오동작 버그 수정 commit9ef566f11fAuthor: hide_d <hided62@gmail.com> Date: Wed Aug 18 20:26:31 2021 +0900 fix: 아이템중 WarActivateSkill 관련 중첩 해제 버그 수정
This commit is contained in:
+15
-8
@@ -654,7 +654,7 @@ function updateNationState()
|
||||
}
|
||||
|
||||
$score *= $trialCnt;
|
||||
|
||||
|
||||
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
|
||||
}
|
||||
|
||||
@@ -745,7 +745,7 @@ function checkStatistic()
|
||||
];
|
||||
|
||||
$avgGeneral = $db->queryFirstRow(
|
||||
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
|
||||
'SELECT avg(gold) as avggold, avg(rice) as avgrice, avg(dex1+dex2+dex3+dex4) as avgdex,
|
||||
max(dex1+dex2+dex3+dex4) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded
|
||||
FROM general'
|
||||
);
|
||||
@@ -1022,8 +1022,8 @@ function checkEmperior()
|
||||
$nation['generals'] = $nationGenerals;
|
||||
|
||||
$tigers = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
|
||||
$nationID
|
||||
); // 오호장군
|
||||
@@ -1034,8 +1034,8 @@ function checkEmperior()
|
||||
}, $tigers));
|
||||
|
||||
$eagles = $db->query(
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
'SELECT value, name
|
||||
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
|
||||
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
|
||||
$nationID
|
||||
); // 건안칠자
|
||||
@@ -1150,10 +1150,17 @@ function checkEmperior()
|
||||
LogHistory();
|
||||
}
|
||||
|
||||
function resetInheritanceUser(int $userID){
|
||||
function resetInheritanceUser(int $userID, bool $isRebirth=false){
|
||||
$rebirthDegraded = [
|
||||
'dex'=>0.5,
|
||||
];
|
||||
|
||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
||||
$totalPoint = 0;
|
||||
foreach($inheritStor->getAll() as [$value,]){
|
||||
foreach($inheritStor->getAll() as $key=>[$value,]){
|
||||
if(key_exists($key, $rebirthDegraded)){
|
||||
$value *= $rebirthDegraded[$key];
|
||||
}
|
||||
$totalPoint += $value;
|
||||
}
|
||||
$totalPoint = Util::toInt($totalPoint);
|
||||
|
||||
Reference in New Issue
Block a user