fix: 천통 후에도 rank var 등이 갱신되는 것 처럼 보이는 문제 수정
This commit is contained in:
@@ -58,7 +58,7 @@ class General implements iAction{
|
||||
'snipe_combat'=>[true, 10, '병종 상성 우위 횟수'],
|
||||
'combat'=>[['rank', 'warnum'], 5, '전투 횟수'],
|
||||
'sabotage'=>[['rank', 'firenum'], 20, '계략 성공 횟수'],
|
||||
'unifier'=>[true, 1, '천통 수뇌'],
|
||||
'unifier'=>[true, 1, '천통 기여'],
|
||||
'dex'=>[false, 0.001, '숙련도'],
|
||||
'tournament'=>[true, 1, '토너먼트'],
|
||||
'betting'=>[false, 10, '베팅 당첨'],
|
||||
@@ -1167,7 +1167,7 @@ class General implements iAction{
|
||||
/**
|
||||
* @return int|float
|
||||
*/
|
||||
public function getInheritancePoint(string $key, &$aux=null){
|
||||
public function getInheritancePoint(string $key, &$aux=null, bool $forceCalc=false){
|
||||
$inheritType = static::INHERITANCE_KEY[$key]??null;
|
||||
if($inheritType === null){
|
||||
throw new \OutOfRangeException("{$key}는 유산 타입이 아님");
|
||||
@@ -1184,7 +1184,8 @@ class General implements iAction{
|
||||
|
||||
[$storeType, $multiplier, ] = $inheritType;
|
||||
|
||||
if($storeType === true){
|
||||
$gameStor = KVStorage::getStorage(DB::db(), 'game_env');
|
||||
if($storeType === true || ($gameStor->isunited != 0 && !$forceCalc)){
|
||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$ownerID}");
|
||||
[$value, $aux] = $inheritStor->getValue($key);
|
||||
return $value;
|
||||
@@ -1329,11 +1330,12 @@ class General implements iAction{
|
||||
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$ownerID}");
|
||||
$inheritStor->cacheAll();
|
||||
foreach(static::INHERITANCE_KEY as $key=>[$storType, ,]){
|
||||
$point = $this->getInheritancePoint($key);
|
||||
$aux = null;
|
||||
$point = $this->getInheritancePoint($key, $aux, true);
|
||||
if($storType === true){
|
||||
continue;
|
||||
}
|
||||
$inheritStor->setValue($key, $point);
|
||||
$inheritStor->setValue($key, [$point, $aux]);
|
||||
}
|
||||
|
||||
$oldInheritStor = KVStorage::getStorage(DB::db(), "inheritance_result");
|
||||
|
||||
Reference in New Issue
Block a user