public bool CheckEquipArtifact(int slot, ArtifactData artifact) { if (artifact == null || this.mArtifacts == null || (slot < 0 || slot >= this.mArtifacts.Length) || this.Owner == null) { return(false); } int jobIndex = Array.IndexOf <JobData>(this.Owner.Jobs, this); if (jobIndex < 0 || !artifact.CheckEnableEquip(this.Owner, jobIndex)) { return(false); } if (artifact.ArtifactParam.type == JobData.ARTIFACT_SLOT_TYPES[slot]) { return(true); } DebugUtility.LogError("ArtifactSlot mismatch"); return(false); }