public bool ApplyMod(EqdpManipulation m, IMod mod) { #if USE_EQDP Manipulations[m] = mod; var file = Files[Array.IndexOf(CharacterUtility.EqdpIndices, m.FileIndex())] ??= new ExpandedEqdpFile(Names.CombinedRace(m.Gender, m.Race), m.Slot.IsAccessory()); // TODO: female Hrothgar return(m.Apply(file)); #else return(false); #endif }
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); }