setReadOnly(); $userID = Session::getUserID(); $generalID = $session->generalID; $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); $me = General::createGeneralObjFromDB($generalID); $items = []; foreach (array_keys(General::INHERITANCE_KEY) as $key) { $items[$key] = $me->getInheritancePoint($key) ?? 0; } $currentInheritBuff = []; foreach ($me->getAuxVar('inheritBuff') as $buff => $buffLevel) { if (!key_exists($buff, TriggerInheritBuff::BUFF_KEY_TEXT)) { continue; } $currentInheritBuff[$buff] = $buffLevel; } function calcResetAttrPoint($level) { while (count(GameConst::$inheritResetAttrPointBase) <= $level) { $baseLen = count(GameConst::$inheritResetAttrPointBase); GameConst::$inheritResetAttrPointBase[] = GameConst::$inheritResetAttrPointBase[$baseLen - 1] + GameConst::$inheritResetAttrPointBase[$baseLen - 2]; } return GameConst::$inheritResetAttrPointBase[$level]; } $resetTurnTimeLevel = $me->getAuxVar('inheritResetTurnTime')??0; $resetSpecialWarLevel = $me->getAuxVar('inheritResetSpecialWar')??0; ?>