// Token: 0x0600010A RID: 266 RVA: 0x0000B6B0 File Offset: 0x000098B0 public void InitMaterials(string slotName, List <ACCMaterial> edited) { bool flag = false; for (int i = 0; i < edited.Count; i++) { TargetMaterial targetMaterial = this.GetMaterial(slotName, i); if (targetMaterial == null) { targetMaterial = new TargetMaterial(slotName, i, string.Empty) { onlyModel = true }; this.AddSlotMaterial(targetMaterial); TBody.SlotID key = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), slotName, false); Item item; this.itemSlots.TryGetValue(key, out item); } targetMaterial.Init(edited[i]); flag |= targetMaterial.shaderChanged; if (targetMaterial.onlyModel) { flag |= (targetMaterial.hasTexColorChanged | targetMaterial.hasTexFileChanged); } } foreach (Item item2 in this.addItems) { if (item2.slot == slotName) { item2.needUpdate = flag; } } }
public Material[] GetMaterials(TBody.SlotID slotID) { int slotNo = (int)slotID; return(slotNo >= currentMaid.body0.goSlot.Count ? EmptyList : GetMaterials(currentMaid.body0.GetSlot(slotNo))); }
// Token: 0x0600029D RID: 669 RVA: 0x00016394 File Offset: 0x00014594 public Renderer GetRenderer(TBody.SlotID slotID) { if (slotID < (TBody.SlotID) this.CurrentMaid.body0.goSlot.Count) { return(this.GetRenderer(this.CurrentMaid.body0.GetSlot((int)slotID))); } return(null); }
// Token: 0x0600029B RID: 667 RVA: 0x00016334 File Offset: 0x00014534 public Material[] GetMaterials(TBody.SlotID slotID) { if (slotID < (TBody.SlotID) this.CurrentMaid.body0.goSlot.Count) { return(this.GetMaterials(this.CurrentMaid.body0.GetSlot((int)slotID))); } return(this._emptyList); }
public Renderer GetRenderer(TBody.SlotID slotID) { int slotNo = (int)slotID; return(slotNo >= currentMaid.body0.goSlot.Count ? null : GetRenderer(currentMaid.body0.GetSlot(slotNo))); }
public void SetEditedMaterials(TBody.SlotID slot, List <ACCMaterial> edited) { LogUtil.DebugF("Set edited Materials. slot={0}, edited count={1}", slot, edited.Count); var slotName = slot.ToString(); trgtMenu.InitMaterials(slotName, edited); }
public SlotInfo(TBody.SlotID id, MPN mpn, string displayName, bool enable, bool maskable) { Id = id; Name = Id.ToString(); this.mpn = mpn; DisplayName = displayName; LongName = displayName + " [" + Name + "]"; no = -1; this.enable = enable; this.maskable = maskable; }
// Token: 0x0600017D RID: 381 RVA: 0x0000E578 File Offset: 0x0000C778 public SlotInfo(TBody.SlotID id, MPN mpn, string displayName, bool enable, bool maskable) { this.Id = id; this.Name = this.Id.ToString(); this.mpn = mpn; this.DisplayName = displayName; this.LongName = displayName + " [" + this.Name + "]"; this.no = -1; this.enable = enable; this.maskable = maskable; }
public static bool AddToObjectDictionary(GameObject gameobj, TBody.SlotID slotid) { #if (DEBUG) Debug.Log($"Saving new object to list!"); #endif if (bodyslot.Contains(slotid) && !ObjectDictionary.ContainsKey(gameobj)) { ObjectDictionary.Add(gameobj, Init.Body); return(true); } else if (headslot.Contains(slotid) && !ObjectDictionary.ContainsKey(gameobj)) { ObjectDictionary.Add(gameobj, Init.Head); return(true); } else if (hairslot.Contains(slotid) && !ObjectDictionary.ContainsKey(gameobj)) { ObjectDictionary.Add(gameobj, Init.Hair); return(true); } else if (clothesslot.Contains(slotid) && !ObjectDictionary.ContainsKey(gameobj)) { ObjectDictionary.Add(gameobj, Init.Clothes); return(true); } else if (accslot.Contains(slotid) && !ObjectDictionary.ContainsKey(gameobj)) { ObjectDictionary.Add(gameobj, Init.Acc); return(true); } #if (DEBUG) Debug.Log($"Returning False!"); #endif return(false); }
/// <summary> /// 157 임시조치용 /// </summary> /// <param name="t"></param> /// <param name="f_mpn"></param> /// <param name="f_slot"></param> /// <param name="tbskin"></param> // public void InitBoneMorphEdit(Transform t, MPN f_mpn, TBody.SlotID f_slot, TBodySkin tbskin) //[HarmonyPatch(typeof(BoneMorph_), "InitBoneMorphEdit",typeof(Transform),typeof(MPN),typeof(TBody.SlotID),typeof(TBodySkin)), HarmonyPrefix] public static void InitBoneMorphEdit(Transform t, MPN f_mpn, TBody.SlotID f_slot, TBodySkin tbskin) { MyLog.LogMessage( "InitBoneMorphEdit" // , t.name// 의미 없음 , f_mpn // MPN 가 SlotID 보다 많음 , f_slot , tbskin.obj_tr.name ); //tbskin.obj_tr = t; /* * if (this.IsCrcBody) * { * this.bonemorph = new TMorphBone(); * this.bonemorph.Init(); * } * else * { * this.bonemorph = new BoneMorph_(); * this.bonemorph.Init(); * } */ }
public CCSlot(TBody.SlotID id) { this.id = id; }
// Token: 0x0600017C RID: 380 RVA: 0x0000E569 File Offset: 0x0000C769 public SlotInfo(TBody.SlotID id, MPN mpn, string displayName, bool enable) : this(id, mpn, displayName, enable, true) { }
public CCSlot(string name) { this.id = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), name); }
private static void NotifyOfLoad(ref string __2, ref GameObject __result) { #if (DEBUG) Debug.Log("Picked up a mesh change"); #endif if (__result == null) { #if (DEBUG) Debug.Log("Gameobject was null!"); #endif return; } #if (DEBUG) Debug.Log("Result was not null..."); #endif if (__2 == null) { #if (DEBUG) Debug.Log("Slot name was null! Aborting...."); #endif return; } #if (DEBUG) Debug.Log("Slot name was not null"); #endif TBody.SlotID slotid = TBody.SlotID.end; try { slotid = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), __2.ToLower()); } catch { } if (slotid.Equals(TBody.SlotID.end)) { #if (DEBUG) Debug.Log("SlotID was found null so object will be treated as a game prop."); #endif AddToObjectDictionary(__result, Props); } else { #if (DEBUG) Debug.Log("Adding to dictionary."); #endif AddToObjectDictionary(__result, slotid); } #if (DEBUG) Debug.Log("Start coroutine..."); #endif @this.StartCoroutine(ModifySingle(__result)); }
// Token: 0x0600015D RID: 349 RVA: 0x0000CE04 File Offset: 0x0000B004 public Func <string, string[], string[]> ReplaceMenuFunc() { this.replaceFiles = new List <ReplacedInfo>(); return(delegate(string key, string[] param) { if (key != null) { if (!(key == "additem")) { if (!(key == "マテリアル変更")) { return param; } } else { if (param.Length < 2) { return param; } string text = param[1]; try { TBody.SlotID key2 = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text, false); Item item = this.menu.itemSlots[key2]; if (item.needUpdate) { string text2 = param[0]; string text3; if (item.filename == text2) { item.worksuffix = null; text3 = item.EditFileName(); } else { item.worksuffix = this.suffix; text3 = item.EditFileName(); this.replaceFiles.Add(new ReplacedInfo(text2, text3, this, item)); } param[0] = text3; } return param; } catch (Exception ex) { LogUtil.Debug(new object[] { "failed to parse SlotID:", text, ex }); return param; } } string slot = param[0]; int matNo = int.Parse(param[1]); string text4 = param[2]; TargetMaterial material = this.menu.GetMaterial(slot, matNo); material.worksuffix = null; if (material.filename == text4) { param[2] = material.EditFileName(); } else if (material.shaderChanged || material.hasParamChanged || material.hasTexFileChanged || material.hasTexColorChanged) { material.worksuffix = this.suffix; string text5 = material.EditFileName(); param[2] = text5; ReplacedInfo item2 = new ReplacedInfo(text4, text5, this, material); this.replaceFiles.Add(item2); } } return param; }); }
// Token: 0x06001C6B RID: 7275 RVA: 0x000D1DB0 File Offset: 0x000D01B0 public bool Deserialize(BinaryReader f_brRead) { bool result = true; //NDebug.Assert(f_brRead.ReadString() == "CM3D2_MPROP", "メイドプロパティのヘッダーが不正です。"); if (f_brRead.ReadString() != "CM3D2_MPROP") { MyLog.Log("メイドプロパティのヘッダーが不正です"); return(false); } int num = f_brRead.ReadInt32(); this.idx = f_brRead.ReadInt32(); if (num <= 110 && 10 <= this.idx) { this.idx += 2; } this.name = f_brRead.ReadString(); try { this.idx = (int)Enum.Parse(typeof(MPN), this.name, true); } catch (Exception e) { MyLog.Log("Enum.Parse1 error : " + e.ToString()); result = false; } this.type = f_brRead.ReadInt32(); this.value_Default = f_brRead.ReadInt32(); this.value = f_brRead.ReadInt32(); if (101 <= num) { this.temp_value = f_brRead.ReadInt32(); } this.value_LinkMAX = f_brRead.ReadInt32(); this.strFileName = f_brRead.ReadString().ToLower(); this.nFileNameRID = f_brRead.ReadInt32(); this.boDut = f_brRead.ReadBoolean(); this.max = f_brRead.ReadInt32(); this.min = f_brRead.ReadInt32(); if (this.listSubProp != null && this.listSubProp.Count != 0) { this.listSubProp = null; } if (200 <= num) { int num2 = f_brRead.ReadInt32(); if (num2 != 0) { this.listSubProp = new List <SubProp>(); } for (int i = 0; i < num2; i++) { bool flag = f_brRead.ReadBoolean(); if (flag) { SubProp subProp = new SubProp(); subProp.bDut = f_brRead.ReadBoolean(); subProp.strFileName = f_brRead.ReadString(); subProp.nFileNameRID = f_brRead.ReadInt32(); if (211 <= num) { subProp.fTexMulAlpha = f_brRead.ReadSingle(); } subProp.bDut = true; this.listSubProp.Add(subProp); } else { this.listSubProp.Add(null); } } } else if (this.type == 3 && (this.name == "acctatoo" || this.name == "hokuro") && !string.IsNullOrEmpty(this.strFileName) && !this.strFileName.Contains("_del")) { this.listSubProp = new List <SubProp>(); SubProp subProp2 = new SubProp(); subProp2.bDut = true; subProp2.strFileName = this.strFileName; subProp2.nFileNameRID = this.nFileNameRID; this.listSubProp.Add(subProp2); this.strFileName = CM3.dicDelItem[(MPN)Enum.Parse(typeof(MPN), this.name, true)].ToLower(); this.nFileNameRID = this.strFileName.GetHashCode(); } if (this.name == "eye_hi" && string.IsNullOrEmpty(this.strFileName)) { this.strFileName = "_I_SkinHi.menu".ToLower(); this.nFileNameRID = this.strFileName.GetHashCode(); } else if (this.name == "mayu" && string.IsNullOrEmpty(this.strFileName)) { this.strFileName = "_I_mayu_001_mugen.menu".ToLower(); this.nFileNameRID = this.strFileName.GetHashCode(); } if (num <= 208 && this.idx == 65 && this.strFileName.ToLower() == "_I_acctatoo_del.menu".ToLower()) { this.strFileName = CM3.dicDelItem[MPN.accnail].ToLower(); this.nFileNameRID = this.strFileName.GetHashCode(); } this.m_dicTBodySkinPos.Clear(); this.m_dicTBodyAttachPos.Clear(); this.m_dicMaterialProp.Clear(); this.m_dicBoneLength.Clear(); if (200 <= num) { int num3 = f_brRead.ReadInt32(); for (int j = 0; j < num3; j++) { TBody.SlotID key = (TBody.SlotID)f_brRead.ReadInt32(); int key2 = f_brRead.ReadInt32(); BoneAttachPos boneAttachPos = new BoneAttachPos(); boneAttachPos.bEnable = f_brRead.ReadBoolean(); boneAttachPos.pss.position.x = f_brRead.ReadSingle(); boneAttachPos.pss.position.y = f_brRead.ReadSingle(); boneAttachPos.pss.position.z = f_brRead.ReadSingle(); boneAttachPos.pss.rotation.x = f_brRead.ReadSingle(); boneAttachPos.pss.rotation.y = f_brRead.ReadSingle(); boneAttachPos.pss.rotation.z = f_brRead.ReadSingle(); boneAttachPos.pss.rotation.w = f_brRead.ReadSingle(); boneAttachPos.pss.scale.x = f_brRead.ReadSingle(); boneAttachPos.pss.scale.y = f_brRead.ReadSingle(); boneAttachPos.pss.scale.z = f_brRead.ReadSingle(); KeyValuePair <int, BoneAttachPos> keyValuePair = new KeyValuePair <int, BoneAttachPos>(key2, boneAttachPos); this.m_dicTBodySkinPos[key] = keyValuePair; } int num4 = f_brRead.ReadInt32(); for (int k = 0; k < num4; k++) { TBody.SlotID key3 = (TBody.SlotID)f_brRead.ReadInt32(); int num5 = f_brRead.ReadInt32(); Dictionary <string, KeyValuePair <int, VtxAttachPos> > dictionary = new Dictionary <string, KeyValuePair <int, VtxAttachPos> >(); for (int l = 0; l < num5; l++) { string key4 = f_brRead.ReadString(); int key5 = f_brRead.ReadInt32(); VtxAttachPos vtxAttachPos = new VtxAttachPos(); vtxAttachPos.bEnable = f_brRead.ReadBoolean(); vtxAttachPos.vtxcount = f_brRead.ReadInt32(); vtxAttachPos.vidx = f_brRead.ReadInt32(); vtxAttachPos.prs.position.x = f_brRead.ReadSingle(); vtxAttachPos.prs.position.y = f_brRead.ReadSingle(); vtxAttachPos.prs.position.z = f_brRead.ReadSingle(); vtxAttachPos.prs.rotation.x = f_brRead.ReadSingle(); vtxAttachPos.prs.rotation.y = f_brRead.ReadSingle(); vtxAttachPos.prs.rotation.z = f_brRead.ReadSingle(); vtxAttachPos.prs.rotation.w = f_brRead.ReadSingle(); vtxAttachPos.prs.scale.x = f_brRead.ReadSingle(); vtxAttachPos.prs.scale.y = f_brRead.ReadSingle(); vtxAttachPos.prs.scale.z = f_brRead.ReadSingle(); dictionary.Add(key4, new KeyValuePair <int, VtxAttachPos>(key5, vtxAttachPos)); } this.m_dicTBodyAttachPos.Add(key3, dictionary); } int num6 = f_brRead.ReadInt32(); for (int m = 0; m < num6; m++) { TBody.SlotID slotID = (TBody.SlotID)f_brRead.ReadInt32(); int key6 = f_brRead.ReadInt32(); MatPropSave matPropSave = new MatPropSave(); matPropSave.nMatNo = f_brRead.ReadInt32(); matPropSave.strPropName = f_brRead.ReadString(); matPropSave.strTypeName = f_brRead.ReadString(); matPropSave.strValue = f_brRead.ReadString(); if (num < 204 && slotID == TBody.SlotID.head && matPropSave.nMatNo == 3 && (matPropSave.strPropName == "_ZTest" || matPropSave.strPropName == "ZTest")) { matPropSave.strPropName = "_ZTest2"; matPropSave.strValue = ((!(matPropSave.strValue == "8")) ? "1" : "7"); } this.m_dicMaterialProp.Add(slotID, new KeyValuePair <int, MatPropSave>(key6, matPropSave)); } if (213 <= num) { int num7 = f_brRead.ReadInt32(); for (int n = 0; n < num7; n++) { TBody.SlotID key7 = (TBody.SlotID)f_brRead.ReadInt32(); int key8 = f_brRead.ReadInt32(); int num8 = f_brRead.ReadInt32(); Dictionary <string, float> dictionary2 = new Dictionary <string, float>(); for (int num9 = 0; num9 < num8; num9++) { string key9 = f_brRead.ReadString(); float num10 = f_brRead.ReadSingle(); dictionary2.Add(key9, num10); } this.m_dicBoneLength[key7] = new KeyValuePair <int, Dictionary <string, float> >(key8, dictionary2); } } } if (num < 200 && this.idx == 58 && Path.GetFileNameWithoutExtension(this.strFileName.ToLower()) == "hair_r095_i_") { this.strFileName = "hair_r110_i_.menu".ToLower(); this.nFileNameRID = this.strFileName.GetHashCode(); } this.boDut = true; this.boTempDut = false; this.strTempFileName = string.Empty; this.nTempFileNameRID = 0; return(result); }
public CCSlot(string name) { this.id = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), name); }
public CCSlot(TBody.SlotID id) { this.id = id; }
private static IEnumerator exportAllHairMenus(string[] fileNames, bool isModList, int num) { run[num] = true; UnityEngine.Debug.Log("Exporting Menus Start" + fileNames.Length); Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0); if (maid != null) { for (int i = 0; i < fileNames.Length; i++) { string fileNameFullPath = fileNames[i]; bool isMod = isModList || fileNameFullPath.IndexOf("mod_") == 0; if (((isMod && includeMods) || (!isMod && !onlyMods)) && (fileNameFullPath.Contains("hairf") || fileNameFullPath.Contains("hairr") || fileNameFullPath.Contains("hairs") || fileNameFullPath.Contains("hairt"))) { string[] filePathSplit = fileNameFullPath.Split('\\'); string fileName = filePathSplit[filePathSplit.Length - 1]; if (!File.Exists(Path.Combine(newMenuPath, fileName)) || overwriteExisting) { MenuObj menu = getMenu(fileNameFullPath); //Only process the file if it is a hair if (new string[] { "hairf", "hairr", "hairs", "hairt" }.Contains(menu.category.ToLower())) { TBody.SlotID slotID = TBody.SlotID.hairAho; MPN mpnID = MPN.hairaho; switch (menu.category.ToLower()) { case "hairf": slotID = TBody.SlotID.hairF; mpnID = MPN.hairf; break; case "hairr": slotID = TBody.SlotID.hairR; mpnID = MPN.hairr; break; case "hairs": slotID = TBody.SlotID.hairS; mpnID = MPN.hairs; break; case "hairt": slotID = TBody.SlotID.hairT; mpnID = MPN.hairt; break; } //Cache the current selection string oldFileName = maid.GetProp(mpnID).strFileName; //Set the hair to the file Menu.ProcScript(maid, fileNameFullPath, false); //Export the hair if (everyBone && maid.body0.goSlot[(int)slotID] != null && maid.body0.goSlot[(int)slotID].morph != null && maid.body0.goSlot[(int)slotID].morph.BoneNames != null && maid.body0.goSlot[(int)slotID].morph.BoneNames.Count > 0) { UnityEngine.Debug.Log("Creating Menu for all bones"); List <HairLengthTargetObj> listTarget = new List <HairLengthTargetObj>(); for (int j = 0; j < maid.body0.goSlot[(int)slotID].morph.BoneNames.Count; j++) { string boneName = maid.body0.goSlot[(int)slotID].morph.BoneNames[j]; if (boneName.Contains("yure")) { HairLengthTargetObj target = new HairLengthTargetObj(); target.trTarget = boneName; target.vScaleMin = new Vector3(0.3f, 1f, 1f); target.vScaleMax = new Vector3(2f, 1f, 1f); listTarget.Add(target); } } this1.StartCoroutine(createNewHairMenu(fileName, listTarget, menu, false)); } else { if (slotID != TBody.SlotID.hairAho && maid.body0.goSlot[(int)slotID] != null && maid.body0.goSlot[(int)slotID].m_HairLengthCtrl != null && maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList != null && maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList.ContainsKey("AutoConv") && maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList["AutoConv"].listTarget != null && maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList["AutoConv"].listTarget.Count != 0) { //CM UnityEngine.Debug.Log("Createing Menu for AutoConv"); List <HairLengthTargetObj> listTarget = new List <HairLengthTargetObj>(); for (int j = 0; j < maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList["AutoConv"].listTarget.Count; j++) { TBodySkin.HairLengthCtrl.HairLengthTarget orig = maid.body0.goSlot[(int)slotID].m_HairLengthCtrl.HairLengthGroupList["AutoConv"].listTarget[j]; HairLengthTargetObj target = new HairLengthTargetObj(); target.trTarget = orig.trTarget.name; target.vScaleMin = orig.vScaleMin; target.vScaleMax = orig.vScaleMax; listTarget.Add(target); } this1.StartCoroutine(createNewHairMenu(fileName, listTarget, menu, true)); } else { //COM //UnityEngine.Debug.Log("Creating Menu for standard"); this1.StartCoroutine(createNewHairMenu(fileName, null, menu, true)); } } //Revert to the old selection Menu.ProcScript(maid, oldFileName, false); } } } } } UnityEngine.Debug.Log("Exporting Menus End" + fileNames.Length); run[num] = false; yield return(null); }
// Token: 0x06000113 RID: 275 RVA: 0x0000BF84 File Offset: 0x0000A184 private static void Load(BinaryReader reader, string filename, ACCMenu menu) { menu.version = reader.ReadInt32(); menu.txtpath = reader.ReadString(); reader.ReadString(); reader.ReadString(); reader.ReadString().Replace(FileConst.RET, "\n"); reader.ReadInt32(); for (;;) { int num = (int)reader.ReadByte(); if (num == 0) { break; } string text = reader.ReadString(); string[] array = new string[num - 1]; for (int i = 0; i < num - 1; i++) { array[i] = reader.ReadString(); } // 뭔 스위치가 이따위로 디컴파일 되냐;; switch (text) { case "category": menu.category = array[0]; continue; case "属性追加": case "color_set": continue; case "priority": menu.priority = array[0]; continue; case "name": menu.name = array[0]; continue; case "setumei": menu.desc = array[0].Replace(FileConst.RET, "\n"); continue; case "icon": case "icons": menu.icon = array[0]; menu.editicon = Path.GetFileNameWithoutExtension(menu.icon); continue; case "アイテムパラメータ": if (array.Length == 3) { menu.itemParam = array; continue; } continue; case "アイテム": menu.items.Add(Path.GetFileNameWithoutExtension(array[0])); continue; case "additem": { if (array.Length < 1) { continue; } Item item = new Item(array); if (!menu.itemFiles.TryGetValue(item.filename, out item.link)) { menu.itemFiles[item.filename] = item; } menu.addItems.Add(item); try { if (item.slot != null) { TBody.SlotID key2 = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), item.slot, true); menu.itemSlots[key2] = item; } continue; } catch (Exception ex) { LogUtil.Debug(new object[] { "failed to parse additem slot", item.slot, ex }); continue; } break; } case "maskitem": break; case "delitem": { string item2 = menu.category; if (array.Length >= 1) { item2 = array[0]; } menu.delItems.Add(item2); continue; } case "マテリアル変更": { string slot = array[0]; int matNo = int.Parse(array[1]); string filename2 = array[2]; menu.AddSlotMaterial(new TargetMaterial(slot, matNo, filename2)); continue; } case "node消去": menu.delNodes.Add(array[0]); continue; case "node表示": menu.showNodes.Add(array[0]); continue; case "パーツnode消去": menu.delPartsNodes.Add(array); continue; case "パーツnode表示": menu.showPartsNodes.Add(array); continue; case "リソース参照": { ResourceRef resourceRef = new ResourceRef(array[0], array[1]); resourceRef.menu = menu; menu.resources.Add(resourceRef); if (!menu.resFiles.TryGetValue(resourceRef.filename, out resourceRef.link)) { menu.resFiles[resourceRef.filename] = resourceRef; continue; } continue; } case "半脱ぎ": { ResourceRef resourceRef2 = new ResourceRef(text, array[0]); resourceRef2.menu = menu; menu.resources.Add(resourceRef2); if (!menu.resFiles.TryGetValue(resourceRef2.filename, out resourceRef2.link)) { menu.resFiles[resourceRef2.filename] = resourceRef2; continue; } continue; } default: continue; } if (array.Length >= 1) { menu.maskItems.Add(array[0]); } } }
private static XElement GetSlotData(Maid maid, int slotID) { bool flag = slotID == -1; TBodySkin tbodySkin; GameObject gameObject; if (flag) { tbodySkin = maid.body0.goSlot[0]; gameObject = maid.body0.m_Bones.gameObject; } else { tbodySkin = maid.body0.GetSlot(slotID); gameObject = tbodySkin.obj; } bool flag2 = !gameObject; XElement result; if (flag2) { result = null; } else { BackUpSlotData orNullMaidSlotData = BackUpData.GetOrNullMaidSlotData(maid, slotID); bool flag3 = orNullMaidSlotData == null; if (flag3) { result = null; } else { bool flag4 = !orNullMaidSlotData.objectDataDic.ContainsKey(gameObject); if (flag4) { result = null; } else { XElement xelement = new XElement("Slot"); XElement xelement2 = new XElement("Category"); bool flag5 = slotID == -1; if (flag5) { xelement2.Add("base"); } else { XContainer xcontainer = xelement2; TBody.SlotID slotID2 = (TBody.SlotID)slotID; xcontainer.Add(slotID2.ToString()); } xelement.Add(xelement2); XElement xelement3 = new XElement("ModelFileName"); xelement3.Add(tbodySkin.m_strModelFileName); xelement.Add(xelement3); XElement maidObjectData = SceneDataManager.GetMaidObjectData(maid, slotID); xelement.Add(maidObjectData); result = xelement; } } } return(result); }