fix: 은퇴 시 숙련 포인트를 지나치게 많이 받는 문제 수정
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user