addError("物品不存在"); return false; } // 检查物品是否可分解 $dismantleConfig = ItemDismantleConfig::where('item_id', $itemId) ->where('is_active', true) ->first(); if (!$dismantleConfig) { $this->addError("该物品不可分解或分解配置已禁用"); return false; } // 将物品信息保存到验证对象中,供后续使用 $dismantleItemKey = $this->args[0] ?? null; if ($dismantleItemKey) { $this->validation->$dismantleItemKey = $item; } return true; } catch (\Exception $e) { $this->addError('验证分解物品时发生错误: ' . $e->getMessage()); return false; } } }