Пример #1
0
        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;
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
        public void ChangeOutfit_Internal_KSOX(KSOXHelper helper)
        {
            Dictionary <TexType, OverlayTexture> data = new Dictionary <TexType, OverlayTexture>();

            foreach (KeyValuePair <string, OverlayTexture> a in helper.KSOX)
            {
                try
                {
                    TexType key = (TexType)Enum.Parse(typeof(TexType), a.Key, true);

                    if (a.Value != null)
                    {
                        data[key] = a.Value;
                    }
                } catch { }
            }

            ksox.SetExtendedData(data.KSOXData());
        }