/** * @Purpose: * 获取传承后的翅膀装备 * @Param &$inherit_equipment 传承装备 * @Param &$be_inherit_equipment 继承装备 */ private function get_inherit_wing_equip(&$inherit_equipment, &$be_inherit_equipment) { $is_inherit = $this->is_inherit($inherit_equipment, $be_inherit_equipment); if ($is_inherit !== true) { $this->throw_error($is_inherit); } if ($inherit_equipment['intensive_level'] <= $be_inherit_equipment['intensive_level'] && $inherit_equipment['we_swallow_info']['swallow_exp'] <= $be_inherit_equipment['we_swallow_info']['swallow_exp']) { $this->throw_error('80506'); #没有可传承的属性 } #强化传承 if ($inherit_equipment['intensive_level'] > $be_inherit_equipment['intensive_level']) { #继承装备强化属性计算 $be_inherit_equipment['intensive_level'] = $inherit_equipment['intensive_level']; $be_inherit_equipment['intensive_lose_times'] = 0; $update_field[$be_inherit_equipment['player_prop_id']]['intensive_level'] = $be_inherit_equipment['intensive_level']; $update_field[$be_inherit_equipment['player_prop_id']]['intensive_lose_times'] = $be_inherit_equipment['intensive_lose_times']; $intensify_table = Cache_WingEquipment::getInstance()->get_wing_equip_intensify_info(array('level' => $be_inherit_equipment['intensive_level'])); if (empty($intensify_table)) { $this->throw_error('10109'); #配置表读取错误 } $be_inherit_equipment['intensive_desc'] = $this->get_latest_intensive_desc($be_inherit_equipment, $intensify_table); $update_field[$be_inherit_equipment['player_prop_id']]['intensive_desc'] = $be_inherit_equipment['intensive_desc']; #传承装备强化属性还原 $inherit_equipment['intensive_level'] = 0; $inherit_equipment['intensive_desc'] = array(); $inherit_equipment['intensive_lose_times'] = 0; $update_field[$inherit_equipment['player_prop_id']]['intensive_level'] = $inherit_equipment['intensive_level']; $update_field[$inherit_equipment['player_prop_id']]['intensive_desc'] = $inherit_equipment['intensive_desc']; $update_field[$inherit_equipment['player_prop_id']]['intensive_lose_times'] = $inherit_equipment['intensive_lose_times']; } #吞噬传承 if ($inherit_equipment['we_swallow_info']['swallow_exp'] > $be_inherit_equipment['we_swallow_info']['swallow_exp']) { $be_inherit_equipment['we_swallow_info']['swallow_lv'] = $inherit_equipment['we_swallow_info']['swallow_lv']; $be_inherit_equipment['we_swallow_info']['swallow_exp'] = $inherit_equipment['we_swallow_info']['swallow_exp']; # 根据吞噬等级,计算吞噬加成附加属性 $we_swallow_revise_info = Cache_Forge::getInstance()->get_we_swallow_config_by_lv($be_inherit_equipment['we_swallow_info']['swallow_lv']); if (empty($we_swallow_revise_info)) { $this->throw_error('80047'); # 未找到翅膀装备吞噬配置信息 } foreach ($be_inherit_equipment['addition_attr'] as $attr_key => $attr_val) { $attr_val = ceil($attr_val * $we_swallow_revise_info['attr_revise_ratio'] / 10000) + $we_swallow_revise_info[$attr_key]; $be_inherit_equipment['we_swallow_info']['swallow_attr'][$attr_key] = $attr_val; } $update_field[$be_inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_lv'] = $be_inherit_equipment['we_swallow_info']['swallow_lv']; $update_field[$be_inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_exp'] = $be_inherit_equipment['we_swallow_info']['swallow_exp']; $update_field[$be_inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_attr'] = $be_inherit_equipment['we_swallow_info']['swallow_attr']; $inherit_equipment['we_swallow_info']['swallow_lv'] = 0; $inherit_equipment['we_swallow_info']['swallow_exp'] = 0; $inherit_equipment['we_swallow_info']['swallow_attr'] = array(); $update_field[$inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_lv'] = $inherit_equipment['we_swallow_info']['swallow_lv']; $update_field[$inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_exp'] = $inherit_equipment['we_swallow_info']['swallow_exp']; $update_field[$inherit_equipment['player_prop_id']]['we_swallow_info']['swallow_attr'] = $inherit_equipment['we_swallow_info']['swallow_attr']; } return $update_field; }
private function data_repair(&$prop_detail) { if (!empty($prop_detail) && Com_Array::is_good_arr($prop_detail) && $prop_detail['refine_version'] < 14 && $prop_detail['type'] == 6 && $prop_detail['intensive_level'] > 0) { $intensify_table = Cache_WingEquipment::getInstance()->get_wing_equip_intensify_info(array('level' => $prop_detail['intensive_level'])); if (!empty($intensify_table)) { $prop_detail['intensive_desc'] = $this->get_game('PlayerWing')->get_latest_intensive_desc($prop_detail, $intensify_table); } } }