public bool RevertMod(GmpManipulation m) { #if USE_GMP if (Manipulations.Remove(m)) { var def = ExpandedGmpFile.GetDefault(m.SetId); var manip = new GmpManipulation(def, m.SetId); return(manip.Apply(File !)); } #endif return(false); }
public bool RevertMod(RspManipulation m) { #if USE_CMP if (Manipulations.Remove(m)) { var def = CmpFile.GetDefault(m.SubRace, m.Attribute); var manip = new RspManipulation(m.SubRace, m.Attribute, def); return(manip.Apply(File !)); } #endif return(false); }
public bool RevertMod(EqdpManipulation m) { #if USE_EQDP if (Manipulations.Remove(m)) { var def = ExpandedEqdpFile.GetDefault(Names.CombinedRace(m.Gender, m.Race), m.Slot.IsAccessory(), m.SetId); var file = Files[Array.IndexOf(CharacterUtility.EqdpIndices, m.FileIndex())] !; var manip = new EqdpManipulation(def, m.Slot, m.Gender, m.Race, m.SetId); return(manip.Apply(file)); } #endif return(false); }
public bool RevertMod(EstManipulation m) { #if USE_EST if (Manipulations.Remove(m)) { var def = EstFile.GetDefault(m.Slot, Names.CombinedRace(m.Gender, m.Race), m.SetId); var manip = new EstManipulation(m.Gender, m.Race, m.Slot, m.SetId, def); var file = m.Slot switch { EstManipulation.EstType.Hair => HairFile !, EstManipulation.EstType.Face => FaceFile !, EstManipulation.EstType.Body => BodyFile !, EstManipulation.EstType.Head => HeadFile !, _ => throw new ArgumentOutOfRangeException(), }; return(manip.Apply(file)); } #endif return(false); }