예제 #1
0
            internal static OutfitTriggerInfo UpgradeOutfitTriggerInfoV1(OutfitTriggerInfoV1 _oldOutfitTriggerInfo)
            {
                OutfitTriggerInfo _outfitTriggerInfo = new OutfitTriggerInfo(_oldOutfitTriggerInfo.Index);

                if (_oldOutfitTriggerInfo.Parts.Count() > 0)
                {
                    for (int j = 0; j < _oldOutfitTriggerInfo.Parts.Count(); j++)
                    {
                        AccTriggerInfo Itrigger = _oldOutfitTriggerInfo.Parts[j];
                        if (Itrigger.Kind > -1)
                        {
                            _outfitTriggerInfo.Parts[j] = new AccTriggerInfo(j);
                            CopySlotTriggerInfo(Itrigger, _outfitTriggerInfo.Parts[j]);
                        }
                    }
                }
                return(_outfitTriggerInfo);
            }
예제 #2
0
            internal static void ConvertOutfitPluginData(int _coordinate, PluginData _pluginData, ref List <TriggerProperty> _outputTriggerProperty, ref List <TriggerGroup> _outputTriggerGroup)
            {
                OutfitTriggerInfo _outfitTriggerInfo = null;
                Dictionary <string, VirtualGroupInfo> _outfitVirtualGroupInfo = new Dictionary <string, VirtualGroupInfo>();

                _pluginData.data.TryGetValue("OutfitTriggerInfo", out object _loadedOutfitTriggerInfo);
                if (_loadedOutfitTriggerInfo == null)
                {
                    return;
                }

                if (_pluginData.version < 2)
                {
                    OutfitTriggerInfoV1 _oldCharaTriggerInfo = MessagePackSerializer.Deserialize <OutfitTriggerInfoV1>((byte[])_loadedOutfitTriggerInfo);
                    _outfitTriggerInfo = UpgradeOutfitTriggerInfoV1(_oldCharaTriggerInfo);
                }
                else
                {
                    _outfitTriggerInfo = MessagePackSerializer.Deserialize <OutfitTriggerInfo>((byte[])_loadedOutfitTriggerInfo);
                }

                if (_outfitTriggerInfo == null)
                {
                    return;
                }

                if (_pluginData.version < 5)
                {
                    if (_pluginData.data.TryGetValue("OutfitVirtualGroupNames", out object _loadedOutfitVirtualGroupNames) && _loadedOutfitVirtualGroupNames != null)
                    {
                        Dictionary <string, string> _outfitVirtualGroupNames = MessagePackSerializer.Deserialize <Dictionary <string, string> >((byte[])_loadedOutfitVirtualGroupNames);
                        _outfitVirtualGroupInfo = UpgradeVirtualGroupNamesV2(_outfitVirtualGroupNames);
                    }
                }
                else
                {
                    if (_pluginData.data.TryGetValue("OutfitVirtualGroupInfo", out object _loadedOutfitVirtualGroupInfo) && _loadedOutfitVirtualGroupInfo != null)
                    {
                        _outfitVirtualGroupInfo = MessagePackSerializer.Deserialize <Dictionary <string, VirtualGroupInfo> >((byte[])_loadedOutfitVirtualGroupInfo);
                    }
                }

                Migrate(_coordinate, _outfitTriggerInfo, _outfitVirtualGroupInfo, ref _outputTriggerProperty, ref _outputTriggerGroup);
            }