addError("物品不存在"); return false; } // 检查种子是否有配置信息 $seedConfig = FarmSeed::where('item_id', $itemId)->first(); if (!$seedConfig) { $this->addError("种子没有配置信息"); return false; } // 将种子信息保存到验证对象中,供后续使用 $seedItemKey = $this->args[0] ?? null; if ($seedItemKey) { $this->validation->$seedItemKey = $item; } return true; } catch (\Exception $e) { $this->addError('验证种子物品时发生错误: ' . $e->getMessage()); return false; } } }