public void ChangeOutfit_Internal(bool reset) { // Reset all before changing outfits. ChaFileControl chaFileCtrl = ChaCtrl.chaFile; ChaFileControl charFile = CharFile; string fullname = chaFileCtrl.parameter.fullname; chaFileCtrl.CopyCoordinate(charFile.coordinate); chaFileCtrl.CopyCustom(charFile.custom); KKABMXHelper kkabmxHelper = new KKABMXHelper(charFile); KCOXHelper kcoxHelper = new KCOXHelper(charFile); KSOXHelper ksoxHelper = new KSOXHelper(charFile); // Failing to roll will use original outfit instead. if (!reset && Controller.RollForOutfit(out List <Layer> layers, out List <Card> cards, fullname)) { for (int i = 0; i < layers.Count; i++) { Layer layer = layers[i]; Card card = cards[i]; layer.checkList.Apply(card.chaFileCtrl, chaFileCtrl); layer.checkList_KKABMX.Apply(card.KKABMX, kkabmxHelper); layer.checkList_KCOX.Apply(card.KCOX, kcoxHelper); layer.checkList_KSOX.Apply(card.KSOX, ksoxHelper); } } ChangeOutfit_Internal_KKABMX(kkabmxHelper); ChangeOutfit_Internal_KCOX(kcoxHelper); ChangeOutfit_Internal_KSOX(ksoxHelper); _reloadPending = 10; }
public void ChangeOutfit_Internal_KCOX(KCOXHelper helper) { Dictionary <ChaFileDefine.CoordinateType, Dictionary <string, ClothesTexData> > data = new Dictionary <ChaFileDefine.CoordinateType, Dictionary <string, ClothesTexData> >(); foreach (KeyValuePair <string, Dictionary <string, ClothesTexData> > a in helper.KCOX) { try { ChaFileDefine.CoordinateType key = (ChaFileDefine.CoordinateType)Enum.Parse( typeof(ChaFileDefine.CoordinateType), a.Key, true ); Dictionary <string, ClothesTexData> entry = data[key] = new Dictionary <string, ClothesTexData>(); foreach (KeyValuePair <string, ClothesTexData> b in a.Value) { if (b.Value != null) { entry[b.Key] = b.Value; } } } catch { } } kcox.SetExtendedData(data.KCOXData()); }
public Layer(string path = null) { cards = new HashSet <Card>(); checkList = new CheckList_Generic( Controller.dummyChaFileCtrl, Controller.dummyChaFileCtrl.GetType(), data: Load_CheckList(path, Strings.CHECK_LIST_BIN) ); KKABMXHelper bones = new KKABMXHelper(); checkList_KKABMX = new CheckList_Generic( bones, bones.GetType(), data: Load_CheckList(path, Strings.CHECK_LIST_KKABMX_BIN) ); KCOXHelper clothes = new KCOXHelper(); checkList_KCOX = new CheckList_Generic( clothes, clothes.GetType(), data: Load_CheckList(path, Strings.CHECK_LIST_KCOX_BIN) ); KSOXHelper skin = new KSOXHelper(); checkList_KSOX = new CheckList_Generic( skin, skin.GetType(), data: Load_CheckList(path, Strings.CHECK_LIST_KSOX_BIN) ); if (path != null) { Load(path); } }