fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정

This commit is contained in:
2021-09-06 02:30:00 +09:00
parent 9e68bc90c2
commit 3ef363a01e
2 changed files with 102 additions and 95 deletions
+9 -2
View File
@@ -1150,10 +1150,17 @@ function checkEmperior()
LogHistory(); LogHistory();
} }
function resetInheritanceUser(int $userID){ function resetInheritanceUser(int $userID, bool $isRebirth=false){
$rebirthDegraded = [
'dex'=>0.5,
];
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}"); $inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
$totalPoint = 0; $totalPoint = 0;
foreach($inheritStor->getAll() as [$value,]){ foreach($inheritStor->getAll() as $key=>[$value,]){
if(key_exists($key, $rebirthDegraded)){
$value *= $rebirthDegraded[$key];
}
$totalPoint += $value; $totalPoint += $value;
} }
$totalPoint = Util::toInt($totalPoint); $totalPoint = Util::toInt($totalPoint);
+1 -1
View File
@@ -611,7 +611,7 @@ class General implements iAction{
$ownerID = $this->getVar('owner'); $ownerID = $this->getVar('owner');
if($ownerID){ if($ownerID){
$this->mergeTotalInheritancePoint(); $this->mergeTotalInheritancePoint();
resetInheritanceUser($ownerID); resetInheritanceUser($ownerID, true);
} }
$this->multiplyVarWithLimit('leadership', 0.85, 10); $this->multiplyVarWithLimit('leadership', 0.85, 10);