ghorsington 5 rokov pred
rodič
commit
673fe738a1
102 zmenil súbory, kde vykonal 4710 pridanie a 367 odobranie
  1. 5 5
      Assembly-CSharp.sln
  2. 35 1
      Assembly-CSharp/AVProVideoPlayer.cs
  3. 38 16
      Assembly-CSharp/Assembly-CSharp.csproj
  4. 31 1
      Assembly-CSharp/BaseKagManager.cs
  5. 12 0
      Assembly-CSharp/BasePanelMgr.cs
  6. 1 1
      Assembly-CSharp/BasePhotoCustomObject.cs
  7. 1 1
      Assembly-CSharp/BasePhotoWindowManager.cs
  8. 4 4
      Assembly-CSharp/CMSystem.cs
  9. 4 4
      Assembly-CSharp/CharacterMgr.cs
  10. 2 2
      Assembly-CSharp/CharacterSelectMain.cs
  11. 2 2
      Assembly-CSharp/ControllerShortcutSettingData.cs
  12. 3 1
      Assembly-CSharp/DailyCtrl.cs
  13. 3 0
      Assembly-CSharp/DailyMgr.cs
  14. 1 1
      Assembly-CSharp/Dance/UndressItem.cs
  15. 19 20
      Assembly-CSharp/DanceBattle_Mgr.cs
  16. 2 0
      Assembly-CSharp/DanceData.cs
  17. 4 3
      Assembly-CSharp/DanceMain.cs
  18. 101 53
      Assembly-CSharp/DanceSelect.cs
  19. 1 1
      Assembly-CSharp/DeskManager.cs
  20. 3 3
      Assembly-CSharp/DynamicBone.cs
  21. 1 1
      Assembly-CSharp/DynamicSkirtBone.cs
  22. 1 1
      Assembly-CSharp/EditMod.cs
  23. 58 14
      Assembly-CSharp/ElbowKneeIKData.cs
  24. 12 4
      Assembly-CSharp/EmpireLifeModeAPI.cs
  25. 37 3
      Assembly-CSharp/EmpireLifeModeData.cs
  26. 1 1
      Assembly-CSharp/EmpireLifeModeManager.cs
  27. 1 1
      Assembly-CSharp/FacilityManager.cs
  28. 4 0
      Assembly-CSharp/FreeModeItemLifeMode.cs
  29. 44 8
      Assembly-CSharp/FreeSkillSelect.cs
  30. 19 5
      Assembly-CSharp/FullBodyIKCtrl.cs
  31. 12 5
      Assembly-CSharp/GameMain.cs
  32. 1 1
      Assembly-CSharp/GameModeManager.cs
  33. 2 2
      Assembly-CSharp/GameUty.cs
  34. 40 22
      Assembly-CSharp/HandFootIKData.cs
  35. 2 2
      Assembly-CSharp/HandSignShortcut.cs
  36. 43 25
      Assembly-CSharp/IKCtrlData.cs
  37. 6 0
      Assembly-CSharp/KaraokeDataManager.cs
  38. 1 1
      Assembly-CSharp/Kasizuki/KasizukiManager.cs
  39. 24 1
      Assembly-CSharp/LimbIKData.cs
  40. 3 3
      Assembly-CSharp/Maid.cs
  41. 1 1
      Assembly-CSharp/MaidParts.cs
  42. 189 0
      Assembly-CSharp/MaidPartsCollider.cs
  43. 1 1
      Assembly-CSharp/MaidProp.cs
  44. 32 2
      Assembly-CSharp/MaidStatus/EnumConvert.cs
  45. 13 2
      Assembly-CSharp/MaidStatus/Personal.cs
  46. 10 0
      Assembly-CSharp/MaidStatus/SpecialRelation.cs
  47. 21 4
      Assembly-CSharp/MaidStatus/Status.cs
  48. 1 1
      Assembly-CSharp/Menu.cs
  49. 1 1
      Assembly-CSharp/Misc.cs
  50. 1 1
      Assembly-CSharp/ModCompile.cs
  51. 2 2
      Assembly-CSharp/OvrIK.cs
  52. 75 0
      Assembly-CSharp/PartColliderData.cs
  53. 1 1
      Assembly-CSharp/PhotoModeSaveAndLoad.cs
  54. 1 1
      Assembly-CSharp/PlayerStatus/Status.cs
  55. 82 0
      Assembly-CSharp/PrivateCharaSelectMove.cs
  56. 163 0
      Assembly-CSharp/PrivateEventManager.cs
  57. 541 0
      Assembly-CSharp/PrivateMaidMode/DataBase.cs
  58. 532 0
      Assembly-CSharp/PrivateMaidMode/PrivateCharaSelectMain.cs
  59. 92 0
      Assembly-CSharp/PrivateMaidMode/PrivateMaid.cs
  60. 190 0
      Assembly-CSharp/PrivateMaidMode/PrivateModeMgr.cs
  61. 55 0
      Assembly-CSharp/PrivateMaidMode/PrivateSettingManager.cs
  62. 225 0
      Assembly-CSharp/PrivateMaidMode/TouchDataBase.cs
  63. 122 0
      Assembly-CSharp/PrivateMaidTouchKagManager.cs
  64. 337 0
      Assembly-CSharp/PrivateMaidTouchManager.cs
  65. 132 0
      Assembly-CSharp/PrivateMaidTouchParamBasicBar.cs
  66. 109 0
      Assembly-CSharp/PrivateMaidTouchTouchPointViewer.cs
  67. 41 0
      Assembly-CSharp/PrivateModeEventObject.cs
  68. 8 0
      Assembly-CSharp/Product.cs
  69. 3 3
      Assembly-CSharp/ProfileCtrl.cs
  70. 10 2
      Assembly-CSharp/RhythmAction_Mgr.cs
  71. 1 0
      Assembly-CSharp/SaveAndLoadCtrl.cs
  72. 1 0
      Assembly-CSharp/SaveAndLoadMgr.cs
  73. 19 6
      Assembly-CSharp/ScenarioData.cs
  74. 1 1
      Assembly-CSharp/SceneCharacterSelect.cs
  75. 4 0
      Assembly-CSharp/SceneFreeModeSelectManager.cs
  76. 1 1
      Assembly-CSharp/SceneNPCEdit/SaveData.cs
  77. 75 0
      Assembly-CSharp/ScenePrivateEventModeAwake.cs
  78. 23 6
      Assembly-CSharp/Schedule/ScheduleAPI.cs
  79. 11 2
      Assembly-CSharp/Schedule/ScheduleCSVData.cs
  80. 26 1
      Assembly-CSharp/ScriptManager.cs
  81. 10 5
      Assembly-CSharp/ShootCutInTex.cs
  82. 2 4
      Assembly-CSharp/ShoulderThighIKData.cs
  83. 2 2
      Assembly-CSharp/StatusMgr.cs
  84. 1 1
      Assembly-CSharp/StatusViewer.cs
  85. 1 1
      Assembly-CSharp/SubtitleDisplayManager.cs
  86. 14 11
      Assembly-CSharp/UndressDance_Mgr.cs
  87. 60 4
      Assembly-CSharp/VsDanceDataMgr.cs
  88. 1 1
      Assembly-CSharp/WindowPartsFingerPreset.cs
  89. 42 17
      Assembly-CSharp/YotogiKagManager.cs
  90. 1 1
      Assembly-CSharp/YotogiManager.cs
  91. 1 1
      Assembly-CSharp/YotogiParameterViewer.cs
  92. 117 53
      Assembly-CSharp/YotogiPlayManager.cs
  93. 52 0
      Assembly-CSharp/YotogiStage.cs
  94. 1 1
      Assembly-CSharp/YotogiStageSelectManager.cs
  95. 24 5
      Assembly-CSharp/Yotogis/Skill.cs
  96. 10 0
      Assembly-CSharp/Yotogis/SkillAcquisitionCondition.cs
  97. 60 2
      Assembly-CSharp/com/workman/cm3d2/scene/dailyEtc/DailyAPI.cs
  98. 191 0
      Assembly-CSharp/uGUICharacterSelectManager.cs
  99. 77 0
      Assembly-CSharp/uGUIMaidPlate.cs
  100. 36 0
      Assembly-CSharp/uGUIPanel.cs
  101. 128 0
      Assembly-CSharp/uGUITabButton.cs
  102. 142 0
      Assembly-CSharp/uGUITabPanel.cs

+ 5 - 5
Assembly-CSharp.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
 VisualStudioVersion = 15.0.26228.4
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{92E7D061-D452-4BFD-83CB-5838230D7209}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{2FCA663B-1824-417F-8365-5CA65BAC6B14}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{92E7D061-D452-4BFD-83CB-5838230D7209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{92E7D061-D452-4BFD-83CB-5838230D7209}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{92E7D061-D452-4BFD-83CB-5838230D7209}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{92E7D061-D452-4BFD-83CB-5838230D7209}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2FCA663B-1824-417F-8365-5CA65BAC6B14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2FCA663B-1824-417F-8365-5CA65BAC6B14}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2FCA663B-1824-417F-8365-5CA65BAC6B14}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2FCA663B-1824-417F-8365-5CA65BAC6B14}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 35 - 1
Assembly-CSharp/AVProVideoPlayer.cs

@@ -10,7 +10,41 @@ public class AVProVideoPlayer : MonoBehaviour
 		this.m_player = base.GetComponent<MediaPlayer>();
 		NDebug.Assert(this.m_player != null, "MediaPlayer コンポーネントが付いてないといけません。");
 		this.m_player.m_VideoLocation = MediaPlayer.FileLocation.AbsolutePathOrURL;
-		this.m_player.m_VideoPath = UTY.gameProjectPath + "\\GameData\\" + this.m_player.m_VideoPath;
+		if (this.m_player.m_VideoPath.Replace("\\", "/").Contains("/"))
+		{
+			this.m_player.m_VideoPath = UTY.gameProjectPath + "\\GameData\\" + this.m_player.m_VideoPath;
+		}
+		else
+		{
+			string path = UTY.gameProjectPath + "\\GameData\\";
+			string[] directories = Directory.GetDirectories(path, "movie*", SearchOption.TopDirectoryOnly);
+			bool flag = false;
+			foreach (string path2 in directories)
+			{
+				foreach (string text in Directory.GetFiles(path2))
+				{
+					string fileName = Path.GetFileName(text);
+					if (this.m_player.m_VideoPath == fileName)
+					{
+						flag = true;
+						this.m_player.m_VideoPath = text;
+						break;
+					}
+				}
+				if (flag)
+				{
+					break;
+				}
+			}
+			if (!flag)
+			{
+				Debug.LogErrorFormat("{0}がGameDataフォルダから見つかりませんでした", new object[]
+				{
+					this.m_player.m_VideoPath
+				});
+				return;
+			}
+		}
 		string dshowFilter = GameMain.Instance.CMSystem.SConfig.DShowFilter;
 		MediaPlayer.OptionsWindows platformOptionsWindows = this.m_player.PlatformOptionsWindows;
 		if (!string.IsNullOrEmpty(dshowFilter))

+ 38 - 16
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{92E7D061-D452-4BFD-83CB-5838230D7209}</ProjectGuid>
+    <ProjectGuid>{2FCA663B-1824-417F-8365-5CA65BAC6B14}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -34,49 +34,49 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp-firstpass">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="Assembly-UnityScript-firstpass">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="FoveUnityPlugin">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
     </Reference>
     <Reference Include="Ionic.Zlib">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
     </Reference>
     <Reference Include="JsonFx.Json">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
     </Reference>
     <Reference Include="LeapCSharp.NET3.5">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
     </Reference>
     <Reference Include="System">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.dll</HintPath>
     </Reference>
     <Reference Include="System.Core">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
     </Reference>
     <Reference Include="System.Drawing">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine.UI">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
     </Reference>
     <Reference Include="zxing.unity">
-      <HintPath>..\..\..\gam\com3d2\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
+      <HintPath>..\..\..\..\..\com3d2_up135\data\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -696,6 +696,7 @@
     <Compile Include="MaidManagement.cs" />
     <Compile Include="MaidManagementMain.cs" />
     <Compile Include="MaidParts.cs" />
+    <Compile Include="MaidPartsCollider.cs" />
     <Compile Include="MaidPlate.cs" />
     <Compile Include="MaidProp.cs" />
     <Compile Include="MaidRandomName.cs" />
@@ -726,6 +727,7 @@
     <Compile Include="MaidStatus\Propensity.cs" />
     <Compile Include="MaidStatus\Relation.cs" />
     <Compile Include="MaidStatus\Seikeiken.cs" />
+    <Compile Include="MaidStatus\SpecialRelation.cs" />
     <Compile Include="MaidStatus\Status.cs" />
     <Compile Include="MaidStatus\SubMaid.cs" />
     <Compile Include="MaidStatus\Title.cs" />
@@ -882,6 +884,7 @@
     <Compile Include="PanWithMouse.cs" />
     <Compile Include="PaperAirplaneManager.cs" />
     <Compile Include="PaperAirplaneTarget.cs" />
+    <Compile Include="PartColliderData.cs" />
     <Compile Include="PartsMgrBase.cs" />
     <Compile Include="PhotoAlignmentPreset.cs" />
     <Compile Include="PhotoBGData.cs" />
@@ -936,6 +939,19 @@
     <Compile Include="PresetCtrl.cs" />
     <Compile Include="PresetMgr.cs" />
     <Compile Include="PresetServer.cs" />
+    <Compile Include="PrivateCharaSelectMove.cs" />
+    <Compile Include="PrivateEventManager.cs" />
+    <Compile Include="PrivateMaidMode\DataBase.cs" />
+    <Compile Include="PrivateMaidMode\PrivateCharaSelectMain.cs" />
+    <Compile Include="PrivateMaidMode\PrivateMaid.cs" />
+    <Compile Include="PrivateMaidMode\PrivateModeMgr.cs" />
+    <Compile Include="PrivateMaidMode\PrivateSettingManager.cs" />
+    <Compile Include="PrivateMaidMode\TouchDataBase.cs" />
+    <Compile Include="PrivateMaidTouchKagManager.cs" />
+    <Compile Include="PrivateMaidTouchManager.cs" />
+    <Compile Include="PrivateMaidTouchParamBasicBar.cs" />
+    <Compile Include="PrivateMaidTouchTouchPointViewer.cs" />
+    <Compile Include="PrivateModeEventObject.cs" />
     <Compile Include="Product.cs" />
     <Compile Include="ProductParse.cs" />
     <Compile Include="Product_Mgr.cs" />
@@ -1071,6 +1087,7 @@
     <Compile Include="SceneNPCEdit\NPCEditStatus.cs" />
     <Compile Include="SceneNPCEdit\SaveData.cs" />
     <Compile Include="ScenePresetWindow.cs" />
+    <Compile Include="ScenePrivateEventModeAwake.cs" />
     <Compile Include="SceneScenarioSelect.cs" />
     <Compile Include="SceneSingleEffect.cs" />
     <Compile Include="SceneToTitle.cs" />
@@ -1309,12 +1326,17 @@
     <Compile Include="uGUIButtonSE.cs" />
     <Compile Include="uGUICanvas.cs" />
     <Compile Include="uGUICanvasFade.cs" />
+    <Compile Include="uGUICharacterSelectManager.cs" />
     <Compile Include="uGUIDraggingObject.cs" />
     <Compile Include="uGUIKaraokeSelect.cs" />
     <Compile Include="uGUIListViewer.cs" />
+    <Compile Include="uGUIMaidPlate.cs" />
+    <Compile Include="uGUIPanel.cs" />
     <Compile Include="UGuiRule.cs" />
     <Compile Include="uGUISelectableAnimation.cs" />
     <Compile Include="uGUISelectableSound.cs" />
+    <Compile Include="uGUITabButton.cs" />
+    <Compile Include="uGUITabPanel.cs" />
     <Compile Include="uGUITextUpdater.cs" />
     <Compile Include="uGUITutorialPanel.cs" />
     <Compile Include="uGUIUtility.cs" />

+ 31 - 1
Assembly-CSharp/BaseKagManager.cs

@@ -61,6 +61,7 @@ public class BaseKagManager : IDisposable
 		this.kag_.AddTagCallBack("ikattachbonenext", new KagScript.KagTagCallBack(this.TagIKAttachBoneNext));
 		this.kag_.AddTagCallBack("ikattachodogunext", new KagScript.KagTagCallBack(this.TagIKAttachOdoguNext));
 		this.kag_.AddTagCallBack("ikattachikbonenext", new KagScript.KagTagCallBack(this.TagIKAttachIKBoneNext));
+		this.kag_.AddTagCallBack("iksetpelvispull", new KagScript.KagTagCallBack(this.TagIKSetPelvisPull));
 		this.kag_.AddTagCallBack("allpos", new KagScript.KagTagCallBack(this.TagAllPos));
 		this.kag_.AddTagCallBack("alloffset", new KagScript.KagTagCallBack(this.TagAllOffSet));
 		this.kag_.AddTagCallBack("addalloffset", new KagScript.KagTagCallBack(this.TagAddAllOffset));
@@ -179,6 +180,7 @@ public class BaseKagManager : IDisposable
 		this.kag_.AddTagCallBack("subtitledisplayforplayvoice", new KagScript.KagTagCallBack(this.TagSubtitleDisplayForPlayVoice));
 		this.kag_.AddTagCallBack("subtitledisplay", new KagScript.KagTagCallBack(this.TagSubtitleDisplay));
 		this.kag_.AddTagCallBack("kupa", new KagScript.KagTagCallBack(this.TagKupa));
+		this.kag_.AddTagCallBack("starttouchmode", new KagScript.KagTagCallBack(this.TagStartTouchMode));
 	}
 
 	public virtual void Update()
@@ -2037,6 +2039,22 @@ public class BaseKagManager : IDisposable
 		return false;
 	}
 
+	public bool TagIKSetPelvisPull(KagTagSupport tag_data)
+	{
+		this.CheckAbsolutelyNecessaryTag(tag_data, "iksetpelvispull", new string[]
+		{
+			"src"
+		});
+		Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
+		if (!maidAndMan)
+		{
+			return false;
+		}
+		bool pelvisPull = tag_data.IsValid("on");
+		maidAndMan.body0.IKCtrl.SetPelvisPull(pelvisPull);
+		return false;
+	}
+
 	public bool TagAllPos(KagTagSupport tag_data)
 	{
 		bool flag = false;
@@ -5176,6 +5194,18 @@ public class BaseKagManager : IDisposable
 		return false;
 	}
 
+	protected bool TagStartTouchMode(KagTagSupport tag_data)
+	{
+		if (PrivateMaidTouchManager.instance == null)
+		{
+			return false;
+		}
+		int nMaidNo = (!tag_data.IsValid("maid")) ? 0 : tag_data.GetTagProperty("maid").AsInteger();
+		int id = (!tag_data.IsValid("id")) ? 0 : tag_data.GetTagProperty("id").AsInteger();
+		PrivateMaidTouchManager.instance.CallTouchMode(GameMain.Instance.CharacterMgr.GetMaid(nMaidNo), id);
+		return false;
+	}
+
 	protected virtual void PlayMaidMotion(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
 	{
 		if (!GameMain.Instance.ScriptMgr.is_motion_blend)
@@ -5468,7 +5498,7 @@ public class BaseKagManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_KAG");
-		binary.Write(1330);
+		binary.Write(1350);
 		byte[] array = this.kag_.Serialize();
 		int value = array.Length;
 		binary.Write(value);

+ 12 - 0
Assembly-CSharp/BasePanelMgr.cs

@@ -88,6 +88,7 @@ public abstract class BasePanelMgr : MonoBehaviour
 	public void BaseOpenPanel()
 	{
 		this.BeforeOpen();
+		BasePanelMgr.isOpen = true;
 		this.OpenPanel();
 		this.FadeInPanel();
 	}
@@ -95,6 +96,7 @@ public abstract class BasePanelMgr : MonoBehaviour
 	public void BaseOpenPanel(string openType)
 	{
 		this.BeforeOpen();
+		BasePanelMgr.isOpen = true;
 		this.OpenPanel(openType);
 		this.FadeInPanel();
 	}
@@ -102,6 +104,7 @@ public abstract class BasePanelMgr : MonoBehaviour
 	public void BaseClosePanel()
 	{
 		this.BeforeClose();
+		BasePanelMgr.isOpen = false;
 		this.ClosePanel();
 		this.FadeOutPanel();
 	}
@@ -109,6 +112,7 @@ public abstract class BasePanelMgr : MonoBehaviour
 	public void BaseClosePanel(Action OnFinished)
 	{
 		this.BeforeClose();
+		BasePanelMgr.isOpen = false;
 		this.ClosePanel();
 		this.FadeOutPanel(OnFinished);
 	}
@@ -116,6 +120,7 @@ public abstract class BasePanelMgr : MonoBehaviour
 	public void BaseClosePanel<T>(Action<T> OnFinished, T param)
 	{
 		this.BeforeClose();
+		BasePanelMgr.isOpen = false;
 		this.ClosePanel();
 		this.FadeOutPanel<T>(OnFinished, param);
 	}
@@ -286,6 +291,11 @@ public abstract class BasePanelMgr : MonoBehaviour
 	{
 	}
 
+	public static bool IsOpen()
+	{
+		return BasePanelMgr.isOpen;
+	}
+
 	protected GameObject fadeTargetPanel;
 
 	protected SceneMgr sceneMgr;
@@ -300,6 +310,8 @@ public abstract class BasePanelMgr : MonoBehaviour
 
 	private const float DURATION_TO_FADE = 0.25f;
 
+	protected static bool isOpen;
+
 	public enum FadeState
 	{
 		None,

+ 1 - 1
Assembly-CSharp/BasePhotoCustomObject.cs

@@ -173,7 +173,7 @@ public abstract class BasePhotoCustomObject : MonoBehaviour, IComparable<BasePho
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write("COM3D2_PHOTO_CUSTOM_OBJECT");
-				binaryWriter.Write(1330);
+				binaryWriter.Write(1350);
 				binaryWriter.Write(this.type.ToString());
 				binaryWriter.Write(this.scale_);
 				binaryWriter.Write(this.enabledTextureColor_);

+ 1 - 1
Assembly-CSharp/BasePhotoWindowManager.cs

@@ -153,7 +153,7 @@ public abstract class BasePhotoWindowManager : MonoBehaviour
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write(this.save_header_uidata);
-				binaryWriter.Write(1330);
+				binaryWriter.Write(1350);
 				binaryWriter.Write(this.save_data_.Count);
 				foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair3 in this.save_data_)
 				{

+ 4 - 4
Assembly-CSharp/CMSystem.cs

@@ -855,7 +855,7 @@ public class CMSystem
 	{
 		XElement xelement = new XElement("Config", new object[]
 		{
-			new XAttribute("Version", 1330),
+			new XAttribute("Version", 1350),
 			new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
 			new XElement("Screen", new object[]
 			{
@@ -1203,7 +1203,7 @@ public class CMSystem
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_SYSTEM2");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		binaryWriter.Write(this.m_dicEditColorPresetData.Count);
 		foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
 		{
@@ -1837,7 +1837,7 @@ public class CMSystem
 
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1330;
+			this.m_nVersion = 1350;
 		}
 
 		public void OnAfterDeserialize()
@@ -1845,7 +1845,7 @@ public class CMSystem
 		}
 
 		[SerializeField]
-		private int m_nVersion = 1330;
+		private int m_nVersion = 1350;
 
 		[SerializeField]
 		private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";

+ 4 - 4
Assembly-CSharp/CharacterMgr.cs

@@ -991,7 +991,7 @@ public class CharacterMgr : MonoBehaviour
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		string result = string.Empty;
 		binaryWriter.Write("CM3D2_PRESET_S");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		binaryWriter.Write((char)presset_type);
 		maid.SerializePropLowCapacity(binaryWriter);
 		maid.SerializeMultiColor(binaryWriter);
@@ -1008,7 +1008,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1054,7 +1054,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1318,7 +1318,7 @@ public class CharacterMgr : MonoBehaviour
 	public bool Serialize(BinaryWriter bwWrite)
 	{
 		bwWrite.Write("CM3D2_CHR_MGR");
-		bwWrite.Write(1330);
+		bwWrite.Write(1350);
 		this.m_PlayerStatus.Serialize(bwWrite);
 		bwWrite.Write(this.m_listStockMan.Count);
 		for (int i = 0; i < this.m_listStockMan.Count; i++)

+ 2 - 2
Assembly-CSharp/CharacterSelectMain.cs

@@ -162,12 +162,12 @@ public class CharacterSelectMain : WfScreenChildren
 						}
 						else
 						{
-							explanatoryLabel = "ハーレムのペアとなるメイドを選択してください。";
+							explanatoryLabel = "ペアとなるメイドを選択してください。";
 						}
 					}
 					else
 					{
-						explanatoryLabel = "GP01夜伽を行うメイドを選択してください。";
+						explanatoryLabel = "夜伽を行うメイドを選択してください。";
 					}
 				}
 				else

+ 2 - 2
Assembly-CSharp/ControllerShortcutSettingData.cs

@@ -33,7 +33,7 @@ public static class ControllerShortcutSettingData
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1330;
+			this.m_nVersion = 1350;
 		}
 
 		public void OnAfterDeserialize()
@@ -261,7 +261,7 @@ public static class ControllerShortcutSettingData
 		private const string CONF_NAME = "OvrControllerShortcutConfig.json";
 
 		[SerializeField]
-		private int m_nVersion = 1330;
+		private int m_nVersion = 1350;
 
 		[SerializeField]
 		private bool IsDirectShortcutMode = true;

+ 3 - 1
Assembly-CSharp/DailyCtrl.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using com.workman.cm3d2.button;
 using PlayerStatus;
+using PrivateMaidMode;
 using Schedule;
 using UnityEngine;
 using wf;
@@ -138,6 +139,7 @@ public class DailyCtrl : MonoBehaviour
 				this.GetMenuButton(DailyCtrl.ButtonType.LegacyMode).active = false;
 			}
 		}
+		this.GetMenuButton(DailyCtrl.ButtonType.DeskCustomize).button.isEnabled = (PrivateModeMgr.Instance.PrivateMaid == null);
 		foreach (UITable table in this.m_goPanel.GetComponentsInChildren<UITable>())
 		{
 			Utility.ResetNGUI(table);
@@ -149,7 +151,7 @@ public class DailyCtrl : MonoBehaviour
 		StatusViewer component = UTY.GetChildObject(this.m_goPanel, "StatusViewer", false).GetComponent<StatusViewer>();
 		component.isEnabledClubNameChangeButton = true;
 		component.isEnabledMainBusinessChangeButton = false;
-		if (PluginData.IsEnabled("GP001") && daily == DailyMgr.Daily.Daytime && !DailyMgr.IsLegacy)
+		if (daily == DailyMgr.Daily.Daytime && !DailyMgr.IsLegacy && (PluginData.IsEnabled("GP001") || PluginData.IsEnabled("GP002")))
 		{
 			component.isEnabledGameModeChangeButton = true;
 		}

+ 3 - 0
Assembly-CSharp/DailyMgr.cs

@@ -71,6 +71,7 @@ public class DailyMgr : BaseCreatePanel
 
 	private void DisplayDaytimePanel()
 	{
+		BasePanelMgr.isOpen = false;
 		this.currentDaily = DailyMgr.Daily.Daytime;
 		Debug.Log("昼パートメインをオープンしました。");
 		GameMain.Instance.TutorialPanel.SetImage(TutorialPanel.ImageSet.MainMenu, false);
@@ -88,6 +89,7 @@ public class DailyMgr : BaseCreatePanel
 
 	private void DisplayNightPanel()
 	{
+		BasePanelMgr.isOpen = false;
 		this.currentDaily = DailyMgr.Daily.Night;
 		Debug.Log("夜パートメインをオープンしました。");
 		this.m_ctrl.DisplayViewer(DailyMgr.Daily.Night);
@@ -152,6 +154,7 @@ public class DailyMgr : BaseCreatePanel
 			dictionary.Add(DailyCtrl.ButtonType.MyRoomCustom, "label_myroom");
 			dictionary.Add(DailyCtrl.ButtonType.ManEdit, "label_useredit");
 			dictionary.Add(DailyCtrl.ButtonType.NPCEdit, "label_npcedit");
+			dictionary.Add(DailyCtrl.ButtonType.PrivateMaidModeSetting, "label_privatemaidmodesetting");
 			dictionary.Add(DailyCtrl.ButtonType.LegacyMode, "label_legacymode");
 			dictionary.Add(DailyCtrl.ButtonType.Karaoke, "label_karaoke");
 			dictionary.Add(DailyCtrl.ButtonType.Credit, "label_credit");

+ 1 - 1
Assembly-CSharp/Dance/UndressItem.cs

@@ -41,7 +41,7 @@ namespace Dance
 
 		public void AddMaidData(Maid maid)
 		{
-			if (this.m_MaidPartsiconPair.ContainsKey(maid))
+			if (!maid || this.m_MaidPartsiconPair.ContainsKey(maid))
 			{
 				return;
 			}

+ 19 - 20
Assembly-CSharp/DanceBattle_Mgr.cs

@@ -212,37 +212,36 @@ public class DanceBattle_Mgr : PartsMgrBase
 
 	public override void EndAction()
 	{
+		bool flag;
+		if (!VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState)
+		{
+			flag = (this.IsWin() && RhythmAction_Mgr.Instance.IsTakeEnd);
+		}
+		else
+		{
+			flag = (VsDanceDataMgr.Instance.CurrentSetting.specifyVictoryState == VsDanceDataMgr.ForcedVictory.ForceWin);
+		}
+		if (flag)
+		{
+			Result_Display.SetResultData("BattleResult", "WIN", Result_Display.ResultType.Image);
+			GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 1);
+		}
+		else
+		{
+			Result_Display.SetResultData("BattleResult", "LOSE", Result_Display.ResultType.Image);
+			GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 0);
+		}
 		RhythmAction_Mgr.DanceState nowState = RhythmAction_Mgr.NowState;
 		if (nowState != RhythmAction_Mgr.DanceState.Dance_First)
 		{
 			if (nowState == RhythmAction_Mgr.DanceState.Dance_Second)
 			{
 				Result_Display.SetResultData("BattleCount", "2nd", Result_Display.ResultType.Image);
-				if (this.IsWin() && RhythmAction_Mgr.Instance.IsTakeEnd)
-				{
-					Result_Display.SetResultData("BattleResult", "WIN", Result_Display.ResultType.Image);
-					GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 1);
-				}
-				else
-				{
-					Result_Display.SetResultData("BattleResult", "LOSE", Result_Display.ResultType.Image);
-					GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 0);
-				}
 			}
 		}
 		else
 		{
 			Result_Display.SetResultData("BattleCount", "1st", Result_Display.ResultType.Image);
-			if (this.IsWin() && RhythmAction_Mgr.Instance.IsTakeEnd)
-			{
-				Result_Display.SetResultData("BattleResult", "WIN", Result_Display.ResultType.Image);
-				GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 1);
-			}
-			else
-			{
-				Result_Display.SetResultData("BattleResult", "LOSE", Result_Display.ResultType.Image);
-				GameMain.Instance.CharacterMgr.status.SetFlag("ダンス勝敗", 0);
-			}
 		}
 	}
 

+ 2 - 0
Assembly-CSharp/DanceData.cs

@@ -68,6 +68,8 @@ public class DanceData
 
 	public string SubtitleSheetName = string.Empty;
 
+	public bool isShowSelectScene = true;
+
 	public enum BgType
 	{
 		LiveStage,

+ 4 - 3
Assembly-CSharp/DanceMain.cs

@@ -211,7 +211,7 @@ public class DanceMain : MonoBehaviour
 				RhythmAction_Mgr.Instance.FactOrderList.Add(GameMain.Instance.CharacterMgr.GetMaid(num));
 			}
 		}
-		if (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.BenchMark && DanceMain.SelectDanceData != null && DanceMain.SelectDanceData.maid_order.Count > 0)
+		if (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.BenchMark && DanceMain.SelectDanceData != null && DanceMain.SelectDanceData.maid_order.Count > 0 && (!RhythmAction_Mgr.IsVSDance || !VsDanceDataMgr.Instance.CurrentSetting.isFixedMaidOrder))
 		{
 			List<Maid> list = new List<Maid>();
 			for (int num2 = 0; num2 < DanceMain.SelectDanceData.maid_order.Count; num2++)
@@ -234,7 +234,7 @@ public class DanceMain : MonoBehaviour
 		{
 			if (!RhythmAction_Mgr.Instance.FactOrderList.Any((Maid e) => !e) && DanceMain.SelectDanceData != null)
 			{
-				goto IL_97D;
+				goto IL_99B;
 			}
 		}
 		for (int num4 = 0; num4 < this.m_listTestPreset.Count; num4++)
@@ -272,7 +272,7 @@ public class DanceMain : MonoBehaviour
 				}
 			}
 		}
-		IL_97D:
+		IL_99B:
 		if (this.m_PresetCopyToDummyChara != null)
 		{
 			NDebug.Assert(this.m_PresetCopyToDummyChara.Length <= this.m_listDummyAnimChara.Count<GameObject>(), "PresetCopyToDummyChara は listDummyAnimChara の数以下である必要があります。");
@@ -506,6 +506,7 @@ public class DanceMain : MonoBehaviour
 				this.m_listMaid[i].StopKuchipakuPattern();
 				this.m_listMaid[i].EyeToCamera(Maid.EyeMoveType.目と顔を向ける, 0f);
 				this.m_listMaid[i].AllIKDetach(0f);
+				this.m_listMaid[i].body0.IKCtrl.SetPelvisPull(false);
 				this.m_listMaid[i].SetAutoTwist(Maid.AutoTwist.WristL, true);
 				this.m_listMaid[i].SetAutoTwist(Maid.AutoTwist.WristR, true);
 				Transform[] componentsInChildren = this.m_listMaid[i].gameObject.GetComponentsInChildren<Transform>(true);

+ 101 - 53
Assembly-CSharp/DanceSelect.cs

@@ -139,6 +139,7 @@ public class DanceSelect : WfScreenChildren
 							danceData.IsPlayable = danceData.InitialPlayable;
 							danceData.RhythmGameCorrespond = (csvParser.GetCellAsString(num++, j) == "◯");
 							danceData.SubtitleSheetName = csvParser.GetCellAsString(num++, j);
+							danceData.isShowSelectScene = (csvParser.GetCellAsString(num++, j) == "◯");
 							DanceSelect.dance_data_list_.Add(danceData);
 						}
 					}
@@ -275,59 +276,54 @@ public class DanceSelect : WfScreenChildren
 		}
 		gameObject.transform.DetachChildren();
 		int musicReleaseFlag = RhythmAction_Mgr.MusicReleaseFlag;
-		this.m_SecondDanceData = null;
 		UIWFTabButton uiwftabButton = null;
-		int j = 0;
-		while (j < DanceSelect.dance_data_list_.Count)
+		for (int j = 0; j < DanceSelect.dance_data_list_.Count; j++)
 		{
-			if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
+			if (DanceSelect.dance_data_list_[j].isShowSelectScene)
 			{
-				break;
-			}
-			if (RhythmAction_Mgr.IsVSDance)
-			{
-				if (this.m_SecondDanceData == null && RhythmAction_Mgr.NowState == RhythmAction_Mgr.DanceState.Dance_First && VsDanceDataMgr.Instance.CurrentSetting.Music2ndID == DanceSelect.dance_data_list_[j].ID)
+				if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge)
 				{
-					this.m_SecondDanceData = DanceSelect.dance_data_list_[j];
+					break;
 				}
-				if (DanceSelect.dance_data_list_[j].Term != DanceData.DanceTerm.VS外 && !((!this.m_ForceTheater) ? (DanceSelect.dance_data_list_[j].bgType == DanceData.BgType.Theater) : (DanceSelect.dance_data_list_[j].bgType != DanceData.BgType.Theater)))
+				if (RhythmAction_Mgr.IsVSDance)
 				{
-					if (!this.m_ExistOnlyRelease || DanceSelect.dance_data_list_[j].scenario_progress == this.m_OnlyRelease)
+					if (DanceSelect.dance_data_list_[j].Term == DanceData.DanceTerm.VS外 || ((!this.m_ForceTheater) ? (DanceSelect.dance_data_list_[j].bgType == DanceData.BgType.Theater) : (DanceSelect.dance_data_list_[j].bgType != DanceData.BgType.Theater)))
 					{
-						if (this.m_ExistOnlyRelease || DanceSelect.dance_data_list_[j].IsPlayable)
-						{
-							goto IL_20A;
-						}
+						goto IL_337;
+					}
+					if (this.m_ExistOnlyRelease && DanceSelect.dance_data_list_[j].scenario_progress != this.m_OnlyRelease)
+					{
+						goto IL_337;
+					}
+					if (!this.m_ExistOnlyRelease && !DanceSelect.dance_data_list_[j].IsPlayable)
+					{
+						goto IL_337;
 					}
 				}
+				else if (!this.m_AllRelease && !DanceSelect.dance_data_list_[j].IsPlayable)
+				{
+					goto IL_337;
+				}
+				GameObject gameObject2 = Utility.CreatePrefab(gameObject, "SceneDanceSelect/Prefab/SongPlate", true);
+				UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().fontSize = DanceSelect.dance_data_list_[j].title_font_size;
+				UTY.GetChildObject(gameObject2, "title", false).transform.localPosition = new Vector3(0f, (float)DanceSelect.dance_data_list_[j].title_offset_y, 0f);
+				UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().text = DanceSelect.dance_data_list_[j].title;
+				UTY.GetChildObject(gameObject2, "title", false).GetComponent<Localize>().SetTerm(DanceSelect.dance_data_list_[j].titleTerm);
+				gameObject2.name = DanceSelect.dance_data_list_[j].title;
+				UIWFTabButton componentInChildren = gameObject2.GetComponentInChildren<UIWFTabButton>();
+				if (!uiwftabButton)
+				{
+					uiwftabButton = componentInChildren;
+				}
+				if (RhythmAction_Mgr.IsVSDance && DanceSelect.dance_data_list_[j].select_chara_num > GameMain.Instance.CharacterMgr.GetStockMaidCount())
+				{
+					componentInChildren.isEnabled = false;
+					this.m_NotSelectDance.Add(componentInChildren);
+				}
+				this.m_SongPlatelUIPair.Add(DanceSelect.dance_data_list_[j], componentInChildren);
+				EventDelegate.Add(componentInChildren.onSelect, new EventDelegate.Callback(this.OnSelectSong));
 			}
-			else if (this.m_AllRelease || DanceSelect.dance_data_list_[j].IsPlayable)
-			{
-				goto IL_20A;
-			}
-			IL_36F:
-			j++;
-			continue;
-			IL_20A:
-			GameObject gameObject2 = Utility.CreatePrefab(gameObject, "SceneDanceSelect/Prefab/SongPlate", true);
-			UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().fontSize = DanceSelect.dance_data_list_[j].title_font_size;
-			UTY.GetChildObject(gameObject2, "title", false).transform.localPosition = new Vector3(0f, (float)DanceSelect.dance_data_list_[j].title_offset_y, 0f);
-			UTY.GetChildObject(gameObject2, "title", false).GetComponent<UILabel>().text = DanceSelect.dance_data_list_[j].title;
-			UTY.GetChildObject(gameObject2, "title", false).GetComponent<Localize>().SetTerm(DanceSelect.dance_data_list_[j].titleTerm);
-			gameObject2.name = DanceSelect.dance_data_list_[j].title;
-			UIWFTabButton componentInChildren = gameObject2.GetComponentInChildren<UIWFTabButton>();
-			if (!uiwftabButton)
-			{
-				uiwftabButton = componentInChildren;
-			}
-			if (RhythmAction_Mgr.IsVSDance && DanceSelect.dance_data_list_[j].select_chara_num > GameMain.Instance.CharacterMgr.GetStockMaidCount())
-			{
-				componentInChildren.isEnabled = false;
-				this.m_NotSelectDance.Add(componentInChildren);
-			}
-			this.m_SongPlatelUIPair.Add(DanceSelect.dance_data_list_[j], componentInChildren);
-			EventDelegate.Add(componentInChildren.onSelect, new EventDelegate.Callback(this.OnSelectSong));
-			goto IL_36F;
+			IL_337:;
 		}
 		gameObject.GetComponent<UIGrid>().repositionNow = true;
 		this.MusicSelectPanel.ContentsPanel.GetComponent<UIScrollView>().ResetPosition();
@@ -443,9 +439,12 @@ public class DanceSelect : WfScreenChildren
 		{
 			this.CallDanceModeSelect();
 		}
-		else if (RhythmAction_Mgr.IsVSDance && DanceSelect.m_SelectedDance.Count > 0)
+		else if (RhythmAction_Mgr.IsVSDance)
 		{
-			this.CallCharaSelect();
+			if (VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState || DanceSelect.m_SelectedDance.Count > 0)
+			{
+				this.CallCharaSelect();
+			}
 		}
 		else
 		{
@@ -631,13 +630,21 @@ public class DanceSelect : WfScreenChildren
 		}
 		this.status_ = DanceSelect.Status.CaharaSelect;
 		DanceSelect.m_SelectedMaid.Clear();
-		if (DanceSelect.m_SelectedDance.Count > 0)
+		if (RhythmAction_Mgr.IsVSDance && VsDanceDataMgr.Instance.CurrentSetting.specifyDanceData != null)
 		{
-			int select_chara_num = DanceSelect.m_SelectedDance.First<DanceData>().select_chara_num;
-			if (RhythmAction_Mgr.IsVSDance && this.m_SecondDanceData != null)
+			DanceData specifyDanceData = VsDanceDataMgr.Instance.CurrentSetting.specifyDanceData;
+			if (RhythmAction_Mgr.IsVSDanceFirst)
 			{
-				DanceSelect.m_SelectedDance.Add(this.m_SecondDanceData);
+				DanceSelect.m_SelectedDance.Add(specifyDanceData);
 			}
+			if (VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState)
+			{
+				this.music_info_.SetDanceData(specifyDanceData);
+			}
+		}
+		if (DanceSelect.m_SelectedDance.Count > 0)
+		{
+			int select_chara_num = DanceSelect.m_SelectedDance.First<DanceData>().select_chara_num;
 			if (!Product.supportMultiLanguage && (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Challenge || RhythmAction_Mgr.IsVSDance))
 			{
 				this.m_CharaSelectLabel.text = "ダンスを行うメイドを" + select_chara_num + "人選択してください。";
@@ -655,9 +662,9 @@ public class DanceSelect : WfScreenChildren
 				CharacterSelectManager.CallBackOnMultiSelect callBackOnMultiSelect = delegate(Maid[] maid_array)
 				{
 					DanceSelect.m_SelectedMaid.Clear();
-					for (int j = 0; j < maid_array.Length; j++)
+					for (int l = 0; l < maid_array.Length; l++)
 					{
-						DanceSelect.m_SelectedMaid.Add(maid_array[j]);
+						DanceSelect.m_SelectedMaid.Add(maid_array[l]);
 					}
 					if (RhythmAction_Mgr.IsVSDance)
 					{
@@ -695,6 +702,25 @@ public class DanceSelect : WfScreenChildren
 						this.chara_select_mgr_.RemoveMaidPlate(stockMaid);
 					}
 				}
+				if (select_chara_num > 1 && VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState)
+				{
+					foreach (string b in VsDanceDataMgr.Instance.CurrentSetting.fixedMaidOrder)
+					{
+						for (int k = 0; k < GameMain.Instance.CharacterMgr.GetStockMaidCount(); k++)
+						{
+							Maid stockMaid2 = GameMain.Instance.CharacterMgr.GetStockMaid(k);
+							if (VsDanceDataMgr.Instance.CurrentSetting.IsCanBattleParticipate(stockMaid2))
+							{
+								if (stockMaid2.status.personal.uniqueName == b)
+								{
+									this.chara_select_mgr_.SetSelectStateMaid(stockMaid2, true);
+									break;
+								}
+							}
+						}
+					}
+					base.StartCoroutine(this.ColiderOff());
+				}
 			}
 		}
 		if (this.CharaSelectPanel.ParentPanel.alpha != 1f)
@@ -732,6 +758,17 @@ public class DanceSelect : WfScreenChildren
 		}
 	}
 
+	private IEnumerator ColiderOff()
+	{
+		yield return null;
+		List<Transform> maid_plates = this.chara_select_mgr_.MaidPlateParentGrid.GetChildList();
+		foreach (Transform transform in maid_plates)
+		{
+			transform.GetComponentInChildren<BoxCollider>().enabled = false;
+		}
+		yield break;
+	}
+
 	private void CallDanceModeSelect()
 	{
 		this.status_ = DanceSelect.Status.DanceModeSelect;
@@ -1057,6 +1094,19 @@ public class DanceSelect : WfScreenChildren
 		return DanceSelect.dance_data_list_;
 	}
 
+	public static DanceData GetDanceData(int id)
+	{
+		DanceSelect.CreateDanceData();
+		foreach (DanceData danceData in DanceSelect.dance_data_list_)
+		{
+			if (danceData.ID == id)
+			{
+				return danceData;
+			}
+		}
+		return null;
+	}
+
 	public static List<Maid> SelectedMaid
 	{
 		get
@@ -1179,8 +1229,6 @@ public class DanceSelect : WfScreenChildren
 
 	private static List<Maid> m_SelectedMaid = new List<Maid>();
 
-	private DanceData m_SecondDanceData;
-
 	private static DanceData m_ChallengeDanceData = null;
 
 	public static int ChallengeDay = 0;

+ 1 - 1
Assembly-CSharp/DeskManager.cs

@@ -143,7 +143,7 @@ internal class DeskManager
 	public static void SerializeSingleSaveData(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_DeskCustomize");
-		binary.Write(1330);
+		binary.Write(1350);
 		binary.Write(DeskManager.item_inst_data_.Count);
 		for (int i = 0; i < DeskManager.item_inst_data_.Count; i++)
 		{

+ 3 - 3
Assembly-CSharp/DynamicBone.cs

@@ -30,7 +30,7 @@ public class DynamicBone : MonoBehaviour
 			return false;
 		};
 		f_bw.Write("CM3D21_PHY");
-		f_bw.Write(1330);
+		f_bw.Write(1350);
 		if (this.m_Root == null)
 		{
 			NDebug.MessageBox("エラー", "×物理ルートボーンが設定されていません。");
@@ -94,7 +94,7 @@ public class DynamicBone : MonoBehaviour
 	public bool SerializeWriteCollider(BinaryWriter f_bw, string f_strFileName)
 	{
 		f_bw.Write("CM3D21_COL");
-		f_bw.Write(1330);
+		f_bw.Write(1350);
 		if (this.m_Colliders == null || this.m_Colliders.Count == 0)
 		{
 			NDebug.MessageBox("エラー", "×物理Collidersは空です。");
@@ -110,7 +110,7 @@ public class DynamicBone : MonoBehaviour
 			else
 			{
 				f_bw.Write(this.m_Colliders[i].TypeName);
-				this.m_Colliders[i].Serialize(f_bw, 1330);
+				this.m_Colliders[i].Serialize(f_bw, 1350);
 			}
 		}
 		this.m_ColliderFileName = f_strFileName;

+ 1 - 1
Assembly-CSharp/DynamicSkirtBone.cs

@@ -18,7 +18,7 @@ public class DynamicSkirtBone : MonoBehaviour
 	public bool SerializeWrite(BinaryWriter f_bw)
 	{
 		f_bw.Write("CM3D21_PSK");
-		f_bw.Write(1330);
+		f_bw.Write(1350);
 		f_bw.Write(this.m_fPanierRadius);
 		this.SerializeWriteAnimationCurve(f_bw, this.m_PanierRadiusDistrib);
 		int num = (this.m_PanierRadiusDistribGroup == null) ? 0 : this.m_PanierRadiusDistribGroup.Length;

+ 1 - 1
Assembly-CSharp/EditMod.cs

@@ -303,7 +303,7 @@ public class EditMod : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MOD");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		binaryWriter.Write(value);
 		binaryWriter.Write(text2.ToLower());
 		binaryWriter.Write(value2);

+ 58 - 14
Assembly-CSharp/ElbowKneeIKData.cs

@@ -5,11 +5,20 @@ using UnityEngine;
 [Serializable]
 public class ElbowKneeIKData : LimbIKData
 {
-	public ElbowKneeIKData(FBIKChain chain, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, tgt_bone, false)
+	public ElbowKneeIKData(FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, ik_mapping, tgt_bone, false)
 	{
 		this.Chain.bendConstraint.bendGoal = base.IKTarget;
 		this.PositionWeight = 0f;
+		this.m_IsUpperBody = (this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.Forearm_L) || this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.Forearm_R));
 		this.m_ForceIKEnable = true;
+		this.m_FABRIK = ik_ctrl.IKTgtRoot.gameObject.AddComponent<FABRIK>();
+		this.m_FABRIK.solver.SetChain(new Transform[]
+		{
+			base.ChainBones[0],
+			base.ChainBones[1]
+		}, base.ChainBones[0]);
+		this.m_FABRIK.solver.target = base.IKTarget;
+		this.m_FABRIK.enabled = false;
 	}
 
 	public override float PositionWeight
@@ -42,26 +51,34 @@ public class ElbowKneeIKData : LimbIKData
 		}
 	}
 
+	public override void ApplyIKSetting()
+	{
+		this.m_TargetBoneLocalRot = this.TargetBone.localRotation;
+		this.m_HandFootLocalRot = this.HandFootData.TargetBone.localRotation;
+		base.ApplyIKSetting();
+	}
+
 	protected override void SetTargetTransform(IKCtrlData.IKSettingData data, Vector3 pos, Quaternion rot)
 	{
 		base.SetTargetTransform(data, pos, rot);
-		Vector3 position = this.m_ShoulderThighData.TargetBone.InverseTransformPoint(this.TargetBone.position);
-		Vector3 vector = this.TargetBone.InverseTransformPoint(this.m_HandFootData.TargetBone.position);
-		Transform iktarget = this.m_HandFootData.IKTarget;
-		Transform iktarget2 = this.m_ShoulderThighData.IKTarget;
+		Transform iktarget = this.m_ShoulderThighData.IKTarget;
 		if (data.IsPointAttach)
 		{
-			if (!this.m_ShoulderThighData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
-			{
-				this.m_ShoulderThighData.PositionWeight = this.PositionWeight;
-				Vector3 b = base.IKTarget.position - iktarget2.TransformPoint(position);
-				iktarget2.position += b;
-			}
-			if (!this.m_ShoulderThighData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
+			iktarget.rotation = Quaternion.FromToRotation(this.TargetBone.position - iktarget.position, base.IKTarget.position - iktarget.position) * iktarget.rotation;
+		}
+		else
+		{
+			Vector3 axis = base.IKTarget.position - iktarget.position;
+			Quaternion rotation = base.IKTarget.rotation;
+			Vector3 lhs = rotation * Vector3.forward;
+			Vector3 rhs = this.TargetBone.rotation * Vector3.forward;
+			float f = Vector3.Dot(lhs, rhs);
+			float num = Mathf.Acos(f) * 57.29578f;
+			if (float.IsNaN(num))
 			{
-				this.m_ShoulderThighData.RotationWeight = this.PositionWeight;
-				iktarget2.rotation = Quaternion.FromToRotation(this.TargetBone.position - this.ShoulderThighData.TargetBone.position, base.IKTarget.position - iktarget2.position) * iktarget2.rotation;
+				num = 0f;
 			}
+			iktarget.rotation = Quaternion.AngleAxis(num, axis) * iktarget.rotation;
 		}
 	}
 
@@ -71,7 +88,34 @@ public class ElbowKneeIKData : LimbIKData
 		this.m_ShoulderThighData = shoulderthigh_data;
 	}
 
+	public override void Update()
+	{
+		if (this.HandFootData.IsIKExecTruth)
+		{
+			return;
+		}
+		if (base.RotateIK.IsIKExec)
+		{
+			this.ShoulderThighData.TargetBone.rotation = Quaternion.Slerp(this.ShoulderThighData.TargetBone.rotation, this.ShoulderThighData.IKTarget.rotation, this.RotationWeight);
+			this.TargetBone.localRotation = this.m_TargetBoneLocalRot;
+			this.HandFootData.TargetBone.localRotation = this.m_HandFootLocalRot;
+		}
+		Quaternion rotation = this.TargetBone.rotation;
+		if (base.PointIK.IsIKExec)
+		{
+			this.m_FABRIK.solver.IKPositionWeight = this.PositionWeight;
+			this.m_FABRIK.solver.Update();
+			this.TargetBone.rotation = rotation;
+		}
+	}
+
 	private ShoulderThighIKData m_ShoulderThighData;
 
 	private HandFootIKData m_HandFootData;
+
+	private FABRIK m_FABRIK;
+
+	private Quaternion m_HandFootLocalRot = Quaternion.identity;
+
+	private Quaternion m_TargetBoneLocalRot = Quaternion.identity;
 }

+ 12 - 4
Assembly-CSharp/EmpireLifeModeAPI.cs

@@ -66,11 +66,14 @@ public static class EmpireLifeModeAPI
 			EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList = new List<string>();
 			foreach (EmpireLifeModeData.Data data in EmpireLifeModeData.GetAllDatas(true))
 			{
-				foreach (string item in data.dataFacilityUniqueNameArray)
+				if (data.IsCorrectPersonalGP002())
 				{
-					if (!EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Contains(item))
+					foreach (string item in data.dataFacilityUniqueNameArray)
 					{
-						EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Add(item);
+						if (!EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Contains(item))
+						{
+							EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Add(item);
+						}
 					}
 				}
 			}
@@ -207,7 +210,7 @@ public static class EmpireLifeModeAPI
 
 	public static bool IsCorrectUniqueComparisonObject(this EmpireLifeModeData.Data data)
 	{
-		return data.IsCorrectNTRBlock() && data.IsCorrectTimeZone() && data.IsCorrectPlayerFlag() && data.IsCorrectScenarioAnyNumberPlay();
+		return data.IsCorrectNTRBlock() && data.IsCorrectTimeZone() && data.IsCorrectPlayerFlag() && data.IsCorrectScenarioAnyNumberPlay() && data.IsCorrectPersonalGP002();
 	}
 
 	public static bool IsCorrectScenarioType(this EmpireLifeModeData.Data data, EmpireLifeModeData.ScenarioType scenarioType)
@@ -281,6 +284,11 @@ public static class EmpireLifeModeAPI
 		return true;
 	}
 
+	public static bool IsCorrectPersonalGP002(this EmpireLifeModeData.Data data)
+	{
+		return data.IsEnableGP002PersonalCheck;
+	}
+
 	public static bool IsCorrectMaidFlag(this EmpireLifeModeData.Data data, Maid maid)
 	{
 		if (data.dataFlagMaid == null)

+ 37 - 3
Assembly-CSharp/EmpireLifeModeData.cs

@@ -185,6 +185,7 @@ public static class EmpireLifeModeData
 					this.rawDataMaidSeikeikenYesNo = csv.GetCellAsString(num++, i);
 					this.rawDataMaidSeikeikenNoYes = csv.GetCellAsString(num++, i);
 					this.rawDataMaidSeikeikenYesYes = csv.GetCellAsString(num++, i);
+					this.rawDataGP002PersonalCheck = csv.GetCellAsString(num++, i);
 					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioType), "エンパイアライフモード.csv\n項目「種類」が指定されていません。\n\n表:" + text);
 					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioAnyNumberPlay), "エンパイアライフモード.csv\n項目「何度でも再生できるか」が指定されていません。\n\n表:" + text);
 					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioFileName), "エンパイアライフモード.csv\n項目「シナリオファイル」が指定されていません。\n\n表:" + text);
@@ -432,11 +433,35 @@ public static class EmpireLifeModeData
 						list.Add(Seikeiken.Yes_Yes);
 					}
 					this.dataMaidSeikeiken = list.ToArray();
+					this.dataGP002PersonalCheck = (this.rawDataGP002PersonalCheck == "○" || this.rawDataGP002PersonalCheck == "◯");
 					break;
 				}
 			}
 		}
 
+		public bool IsEnableGP002PersonalCheck
+		{
+			get
+			{
+				if (this.m_IsEnableGP002PersonalCheck == null)
+				{
+					this.m_IsEnableGP002PersonalCheck = new bool?(true);
+					if (this.dataGP002PersonalCheck)
+					{
+						foreach (KeyValuePair<int, string> keyValuePair in this.dataMaidPersonalUniqueNameAndActiveSlotDic)
+						{
+							if (!PluginData.IsEnabledForGP002Personal(keyValuePair.Value))
+							{
+								this.m_IsEnableGP002PersonalCheck = new bool?(false);
+								break;
+							}
+						}
+					}
+				}
+				return this.m_IsEnableGP002PersonalCheck.Value;
+			}
+		}
+
 		private static Dictionary<string, string> personalUniqueNameDic
 		{
 			get
@@ -528,11 +553,14 @@ public static class EmpireLifeModeData
 					{
 						using (Dictionary<int, string>.ValueCollection.Enumerator enumerator = allDatas[i].dataMaidPersonalUniqueNameAndActiveSlotDic.Values.GetEnumerator())
 						{
-							while (enumerator.MoveNext())
+							if (allDatas[i].IsCorrectPersonalGP002())
 							{
-								if (!EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Contains(enumerator.Current))
+								while (enumerator.MoveNext())
 								{
-									EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Add(enumerator.Current);
+									if (!EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Contains(enumerator.Current))
+									{
+										EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Add(enumerator.Current);
+									}
 								}
 							}
 						}
@@ -588,6 +616,8 @@ public static class EmpireLifeModeData
 
 		public readonly string rawDataMaidSeikeikenYesYes;
 
+		public readonly string rawDataGP002PersonalCheck;
+
 		public readonly EmpireLifeModeData.ScenarioType dataScenarioType;
 
 		public readonly bool dataScenarioAnyNumberPlay;
@@ -620,6 +650,10 @@ public static class EmpireLifeModeData
 
 		public readonly Seikeiken[] dataMaidSeikeiken;
 
+		public readonly bool dataGP002PersonalCheck;
+
+		private bool? m_IsEnableGP002PersonalCheck;
+
 		private static Dictionary<string, string> m_PersonalUniqueNameDic;
 
 		private static Dictionary<string, Contract> m_ContractTypeDic;

+ 1 - 1
Assembly-CSharp/EmpireLifeModeManager.cs

@@ -477,7 +477,7 @@ public class EmpireLifeModeManager : MonoBehaviour
 	public bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_LIFE_MODE_MGR");
-		brWrite.Write(1330);
+		brWrite.Write(1350);
 		brWrite.Write("2");
 		DataArray<int, byte> saveDataScenarioExecuteCountArray = this.m_SaveDataScenarioExecuteCountArray;
 		if (EmpireLifeModeManager.<>f__mg$cache1 == null)

+ 1 - 1
Assembly-CSharp/FacilityManager.cs

@@ -657,7 +657,7 @@ public class FacilityManager : MonoBehaviour
 		Stopwatch stopwatch = new Stopwatch();
 		stopwatch.Start();
 		brWrite.Write("CM3D21_FACILITY_MGR");
-		brWrite.Write(1330);
+		brWrite.Write(1350);
 		brWrite.Write("5");
 		int num = 0;
 		for (int i = 0; i < this.m_FacilityArray.Count; i++)

+ 4 - 0
Assembly-CSharp/FreeModeItemLifeMode.cs

@@ -29,6 +29,10 @@ public class FreeModeItemLifeMode : AbstractFreeModeItem
 				break;
 			}
 		}
+		if (this.m_IsAllEnabledPersonal && !this.m_LifeModeData.IsCorrectPersonalGP002())
+		{
+			this.m_IsAllEnabledPersonal = false;
+		}
 	}
 
 	public static List<FreeModeItemLifeMode> CreateItemList(bool displayableOnly = true)

+ 44 - 8
Assembly-CSharp/FreeSkillSelect.cs

@@ -86,7 +86,7 @@ public class FreeSkillSelect : MonoBehaviour
 		allDatas.Sort();
 		foreach (YotogiStage.Data data in allDatas)
 		{
-			if (data.isYotogiPlayable(clubGrade, false))
+			if (data.isYotogiPlayable(this.maid_, clubGrade, false))
 			{
 				string a = string.Empty;
 				for (int i = 0; i < 2; i++)
@@ -455,7 +455,7 @@ public class FreeSkillSelect : MonoBehaviour
 		this.CreateStage(skill_data.skill_data);
 		FreeSkillSelect.ButtonData buttonData = (skill_data.parent == null) ? null : ((skill_data.parent.parent == null) ? null : skill_data.parent.parent);
 		FreeSkillSelect.RootType rootType = (buttonData == null) ? FreeSkillSelect.RootType.Null : buttonData.root_type;
-		if (rootType == FreeSkillSelect.RootType.GP01Harem || rootType == FreeSkillSelect.RootType.GP01Swapping || rootType == FreeSkillSelect.RootType.GP01NTR || rootType == FreeSkillSelect.RootType.GP01NTRReport)
+		if (FreeSkillSelect.RootType.GP01Harem <= rootType && rootType <= FreeSkillSelect.RootType.GP02Yuri)
 		{
 			List<Transform> childList = this.update_obj_dic_["レベル"].ui_grid.GetChildList();
 			bool flag = true;
@@ -518,6 +518,11 @@ public class FreeSkillSelect : MonoBehaviour
 		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP01Swapping, "GP-01スワッピング"));
 		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP01NTR, "GP-01寝取らせ"));
 		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP01NTRReport, "GP-01寝取らせ報告"));
+		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP02Harem, "GP-02ハーレム"));
+		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP02Swapping, "GP-02スワッピング"));
+		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP02NTR, "GP-02寝取らせ"));
+		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP02NTRReport, "GP-02寝取らせ報告"));
+		list2.Add(new KeyValuePair<FreeSkillSelect.RootType, string>(FreeSkillSelect.RootType.GP02Yuri, "GP-02百合"));
 		for (int i = 0; i < list2.Count; i++)
 		{
 			FreeSkillSelect.ButtonData buttonData = new FreeSkillSelect.ButtonData();
@@ -612,12 +617,8 @@ public class FreeSkillSelect : MonoBehaviour
 				{
 					key = (FreeSkillSelect.RootType)data2.specialConditionType;
 				}
-				else
+				else if (data2.specialConditionType == Skill.Data.SpecialConditionType.GP01Recollect)
 				{
-					if (data2.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect)
-					{
-						continue;
-					}
 					if (data2.category == Yotogi.Category.ハ\u30FCレム)
 					{
 						key = FreeSkillSelect.RootType.GP01Harem;
@@ -635,6 +636,36 @@ public class FreeSkillSelect : MonoBehaviour
 						}
 					}
 				}
+				else
+				{
+					if (data2.specialConditionType != Skill.Data.SpecialConditionType.GP02Recollect)
+					{
+						continue;
+					}
+					if (data2.category == Yotogi.Category.ハ\u30FCレム)
+					{
+						if (data2.name.Contains("百合"))
+						{
+							key = FreeSkillSelect.RootType.GP02Yuri;
+						}
+						else
+						{
+							key = FreeSkillSelect.RootType.GP02Harem;
+						}
+					}
+					else
+					{
+						key = FreeSkillSelect.RootType.GP02Swapping;
+						if (data2.name.Contains("報告"))
+						{
+							key = FreeSkillSelect.RootType.GP02NTRReport;
+						}
+						else if (data2.name.Contains("寝取り"))
+						{
+							key = FreeSkillSelect.RootType.GP02NTR;
+						}
+					}
+				}
 				FreeSkillSelect.ButtonData buttonData5 = type_data_dic[key].Value[data2.category.ToString()];
 				if (buttonData5 != null)
 				{
@@ -735,7 +766,12 @@ public class FreeSkillSelect : MonoBehaviour
 		GP01Harem,
 		GP01Swapping,
 		GP01NTR,
-		GP01NTRReport
+		GP01NTRReport,
+		GP02Harem,
+		GP02Swapping,
+		GP02NTR,
+		GP02NTRReport,
+		GP02Yuri
 	}
 
 	private class ButtonData

+ 19 - 5
Assembly-CSharp/FullBodyIKCtrl.cs

@@ -166,12 +166,12 @@ public class FullBodyIKCtrl : MonoBehaviour
 			fbikchain.bendConstraint.weight = 0f;
 		}
 		this.m_BodyCtrlData = this.SafeAddBodyCtrlData("体全体");
+		this.FullbodyIK.solver.GetChain(FullBodyBipedChain.LeftLeg).pull = 0f;
+		this.FullbodyIK.solver.GetChain(FullBodyBipedChain.RightLeg).pull = 0f;
 		this.AddLimbIKData(FullBodyIKCtrl.IKBoneType.Hand_L, FullBodyIKCtrl.IKBoneType.Forearm_L, FullBodyIKCtrl.IKBoneType.UpperArm_L, FullBodyBipedEffector.LeftHand, FullBodyBipedEffector.LeftShoulder, true);
 		this.AddLimbIKData(FullBodyIKCtrl.IKBoneType.Hand_R, FullBodyIKCtrl.IKBoneType.Forearm_R, FullBodyIKCtrl.IKBoneType.UpperArm_R, FullBodyBipedEffector.RightHand, FullBodyBipedEffector.RightShoulder, true);
 		this.AddLimbIKData(FullBodyIKCtrl.IKBoneType.Foot_L, FullBodyIKCtrl.IKBoneType.Calf_L, FullBodyIKCtrl.IKBoneType.Thigh_L, FullBodyBipedEffector.LeftFoot, FullBodyBipedEffector.LeftThigh, false);
 		this.AddLimbIKData(FullBodyIKCtrl.IKBoneType.Foot_R, FullBodyIKCtrl.IKBoneType.Calf_R, FullBodyIKCtrl.IKBoneType.Thigh_R, FullBodyBipedEffector.RightFoot, FullBodyBipedEffector.RightThigh, false);
-		this.GetIKData<HandFootIKData>(FullBodyIKCtrl.IKBoneType.Foot_L).Chain.pull = 0f;
-		this.GetIKData<HandFootIKData>(FullBodyIKCtrl.IKBoneType.Foot_R).Chain.pull = 0f;
 		if (!this.BodyTarget)
 		{
 			Transform transform = this.m_IKTgtRoot.Find(this.BodyEffector.bone.name);
@@ -210,7 +210,7 @@ public class FullBodyIKCtrl : MonoBehaviour
 		FBIKChain chain = solver.GetChain(handfoot_effector);
 		ShoulderThighIKData shoulderThighIKData = new ShoulderThighIKData(solver.GetEffector(shoulderthigh_effector), chain, limbMapping, this, this.GetIKBone(shoulder_thigh));
 		this.m_StrIKDataPair[FullBodyIKCtrl.IKBoneTypeStrDic[shoulder_thigh]] = shoulderThighIKData;
-		ElbowKneeIKData elbowKneeIKData = new ElbowKneeIKData(chain, this, this.GetIKBone(elbow_knee));
+		ElbowKneeIKData elbowKneeIKData = new ElbowKneeIKData(chain, limbMapping, this, this.GetIKBone(elbow_knee));
 		this.m_StrIKDataPair[FullBodyIKCtrl.IKBoneTypeStrDic[elbow_knee]] = elbowKneeIKData;
 		HandFootIKData handFootIKData = new HandFootIKData(solver.GetEffector(handfoot_effector), chain, limbMapping, this, this.GetIKBone(hand_foot), use_old);
 		this.m_StrIKDataPair[FullBodyIKCtrl.IKBoneTypeStrDic[hand_foot]] = handFootIKData;
@@ -244,7 +244,14 @@ public class FullBodyIKCtrl : MonoBehaviour
 
 	public void IKUpdate()
 	{
-		this.BodyEffector.positionWeight = 1f;
+		if (!this.m_IsPelvisPull)
+		{
+			this.BodyEffector.positionWeight = 1f;
+		}
+		else
+		{
+			this.BodyEffector.positionWeight = 0f;
+		}
 		this.BodyTarget.position = this.BodyEffector.bone.position;
 		this.IsUpdateLate = false;
 		foreach (IKCtrlData ikctrlData in this.m_StrIKDataPair.Values)
@@ -328,7 +335,7 @@ public class FullBodyIKCtrl : MonoBehaviour
 				this.m_FullbodyIK.references.spine[1].localPosition = localPosition;
 				foreach (IKCtrlData ikctrlData2 in this.m_StrIKDataPair.Values)
 				{
-					if (!(ikctrlData2 is BodyCtrlData) && !(ikctrlData2 is LimbIKData))
+					if (!(ikctrlData2 is BodyCtrlData))
 					{
 						if (ikctrlData2.IsIKExec)
 						{
@@ -543,6 +550,11 @@ public class FullBodyIKCtrl : MonoBehaviour
 		return false;
 	}
 
+	public void SetPelvisPull(bool pull_on)
+	{
+		this.m_IsPelvisPull = pull_on;
+	}
+
 	public static Dictionary<FullBodyIKCtrl.IKBoneType, Transform> GetAllIKBoneDic(Maid chara)
 	{
 		if (chara == null)
@@ -680,6 +692,8 @@ public class FullBodyIKCtrl : MonoBehaviour
 
 	public float BlendTime = 0.5f;
 
+	private bool m_IsPelvisPull;
+
 	public enum IKBoneType
 	{
 		TopFixed,

+ 12 - 5
Assembly-CSharp/GameMain.cs

@@ -8,6 +8,7 @@ using System.Linq;
 using System.Threading;
 using Kasizuki;
 using MaidStatus;
+using PrivateMaidMode;
 using SceneNPCEdit;
 using Schedule;
 using UnityEngine;
@@ -678,7 +679,7 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.strComment = f_strComment;
 		serializeHeader.productTypeID = (int)Product.type;
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		this.SerializeWriteHeader(binaryWriter, serializeHeader);
 		binaryWriter.Write("bookmark_kk_01");
 		GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryWriter);
@@ -717,7 +718,8 @@ public class GameMain : MonoSingleton<GameMain>
 		CasinoDataMgr.Instance.Serialize(binaryWriter);
 		VsDanceDataMgr.Instance.Serialize(binaryWriter);
 		SaveData.Serialize(binaryWriter);
-		binaryWriter.Write(1000);
+		binaryWriter.Write(1001);
+		PrivateModeMgr.Instance.Serialize(binaryWriter);
 		string path = this.MakeSavePathFileName(f_nSaveNo);
 		File.WriteAllBytes(path, memoryStream.ToArray());
 		memoryStream.Close();
@@ -797,7 +799,7 @@ public class GameMain : MonoSingleton<GameMain>
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		this.SerializeWriteHeader(binaryWriter, saveDataHeader);
 		binaryWriter.Write(array, (int)saveDataHeader.lHeaderSize, (int)((long)array.Length - saveDataHeader.lHeaderSize));
 		File.WriteAllBytes(path, memoryStream.ToArray());
@@ -1095,9 +1097,14 @@ public class GameMain : MonoSingleton<GameMain>
 			CasinoDataMgr.Instance.Deserialize(binaryReader, num);
 			VsDanceDataMgr.Instance.Deserialize(binaryReader, num);
 			SaveData.Deserialize(binaryReader, num);
+			int num3 = 0;
 			if (num >= 1330)
 			{
-				int num3 = binaryReader.ReadInt32();
+				num3 = binaryReader.ReadInt32();
+			}
+			if (num3 >= 1001)
+			{
+				PrivateModeMgr.Instance.Deserialize(binaryReader, num);
 			}
 			binaryReader.Close();
 			binaryReader = null;
@@ -1380,7 +1387,7 @@ public class GameMain : MonoSingleton<GameMain>
 		Product.OnApplicationQuit();
 	}
 
-	private const int SaveDataVersion = 1000;
+	private const int SaveDataVersion = 1001;
 
 	private static GameMain m_objInstance;
 

+ 1 - 1
Assembly-CSharp/GameModeManager.cs

@@ -31,7 +31,7 @@ public static class GameModeManager
 	public static bool Serialize(BinaryWriter brWrite)
 	{
 		brWrite.Write("CM3D21_GAME_MODE_MGR");
-		brWrite.Write(1330);
+		brWrite.Write(1350);
 		brWrite.Write(1);
 		brWrite.Write((int)GameModeManager.m_NowGameModeType);
 		return true;

+ 2 - 2
Assembly-CSharp/GameUty.cs

@@ -1404,14 +1404,14 @@ public class GameUty
 
 	public static string GetBuildVersionText()
 	{
-		int num = 1330;
+		int num = 1350;
 		return (num >= 1000) ? ((float)num / 1000f).ToString("F2") : ((float)num / 100f).ToString("F2");
 	}
 
 	public static string GetGameVersionText()
 	{
 		string text = "COM3D2x64.exe";
-		int num = 1330;
+		int num = 1350;
 		string path = UTY.gameProjectPath + "\\update.lst";
 		string[] array = new string[0];
 		if (File.Exists(path))

+ 40 - 22
Assembly-CSharp/HandFootIKData.cs

@@ -5,11 +5,11 @@ using UnityEngine;
 [Serializable]
 public class HandFootIKData : LimbIKData
 {
-	public HandFootIKData(IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, chain, tgt_bone, use_old)
+	public HandFootIKData(IKEffector effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, chain, ik_mapping, tgt_bone, use_old)
 	{
 		this.Effector = effector;
 		this.Effector.target = base.IKTarget;
-		this.IKMapping = ik_mapping;
+		this.m_IsUpperBody = (this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.Hand_L) || this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.Hand_R));
 		this.m_ForceIKEnable = true;
 		this.ToCorrectBone = this.TargetBone;
 	}
@@ -95,24 +95,26 @@ public class HandFootIKData : LimbIKData
 		}
 		Transform iktarget = this.m_ShoulderThighData.IKTarget;
 		Transform iktarget2 = this.m_ElbowKneeData.IKTarget;
-		Vector3 vector = this.m_ElbowKneeData.TargetBone.position - this.TargetBone.position;
-		Vector3 vector2 = this.m_ShoulderThighData.TargetBone.position - this.m_ElbowKneeData.TargetBone.position;
-		if (this.ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.NewPoint).IsIKExec)
-		{
-			return;
-		}
-		float f = Vector3.Dot(vector.normalized, vector2.normalized);
-		float num = Mathf.Acos(f) * 57.29578f;
-		float num2 = Mathf.Clamp01(num / this.m_BendFadeBorder);
-		this.ElbowKneeData.PositionWeight = num2 * this.PositionWeight;
-		Vector3 position = this.TargetBone.InverseTransformPoint(this.m_ElbowKneeData.TargetBone.position);
-		Vector3 position2 = base.IKTarget.TransformPoint(position);
-		iktarget2.position = position2;
-		if (this.ElbowKneeData.GetIKSettingData(IKCtrlData.IKAttachType.Rotate).IsIKExec)
-		{
-			this.ElbowKneeData.RotationWeight = this.PositionWeight;
-			iktarget2.rotation = Quaternion.FromToRotation(this.TargetBone.position - this.ElbowKneeData.TargetBone.position, base.IKTarget.position - iktarget2.position) * iktarget2.rotation;
-		}
+		if (!this.ElbowKneeData.GetIKExecTruth(IKCtrlData.IKAttachType.NewPoint))
+		{
+			Vector3 position = this.TargetBone.InverseTransformPoint(this.m_ElbowKneeData.TargetBone.position);
+			Vector3 vector = base.IKTarget.TransformPoint(position);
+			Vector3 vector2 = base.IKTarget.position - vector;
+			Vector3 vector3 = vector - iktarget.position;
+			float f = Mathf.Clamp(Vector3.Dot(vector2.normalized, vector3.normalized), -1f, 1f);
+			float num = Mathf.Abs(Mathf.Acos(f) * 57.29578f);
+			float t = Mathf.Clamp01(num / this.m_BendFadeBorder);
+			Vector3 vector4 = base.IKTarget.position - iktarget.position;
+			float d = Vector3.Dot(vector - iktarget.position, vector4.normalized);
+			Vector3 vector5 = iktarget.position + vector4.normalized * d;
+			Vector3 a = iktarget2.rotation * Vector3.up * 0.01f;
+			Vector3 b = (vector - vector5) * this.m_BendStlength;
+			Vector3 b2 = Vector3.Slerp(a, b, t);
+			iktarget2.position = vector5 + b2;
+			this.ElbowKneeData.PositionWeight = this.PositionWeight;
+		}
+		this.ElbowKneeData.RotationWeight = this.PositionWeight;
+		iktarget2.rotation = Quaternion.FromToRotation(this.TargetBone.position - this.ElbowKneeData.TargetBone.position, base.IKTarget.position - iktarget2.position) * iktarget2.rotation;
 	}
 
 	public override void ApplyIKSetting()
@@ -122,6 +124,20 @@ public class HandFootIKData : LimbIKData
 			base.ForceIK = true;
 		}
 		base.ApplyIKSetting();
+		if (!base.IsIKExecTruth)
+		{
+			if (this.ElbowKneeData.RotationWeight > 0f)
+			{
+				this.PositionWeight = this.ElbowKneeData.RotationWeight;
+				this.RotationWeight = this.ElbowKneeData.RotationWeight;
+				base.IKTarget.position = this.ElbowKneeData.IKTarget.TransformPoint(this.TargetBone.localPosition);
+			}
+			else
+			{
+				this.PositionWeight = this.ElbowKneeData.PositionWeight;
+				base.IKTarget.position += this.ElbowKneeData.IKTarget.position - this.ElbowKneeData.TargetBone.position;
+			}
+		}
 		this.CheckBorder(this.WallCorrect);
 		this.CheckBorder(this.FloorCorrect);
 	}
@@ -155,9 +171,11 @@ public class HandFootIKData : LimbIKData
 	[Range(1f, 90f)]
 	private float m_BendFadeBorder = 30f;
 
-	public readonly IKEffector Effector;
+	[SerializeField]
+	[Range(1f, 2f)]
+	private float m_BendStlength = 1.01f;
 
-	public readonly IKMappingLimb IKMapping;
+	public readonly IKEffector Effector;
 
 	private ShoulderThighIKData m_ShoulderThighData;
 

+ 2 - 2
Assembly-CSharp/HandSignShortcut.cs

@@ -506,7 +506,7 @@ public class HandSignShortcut : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1330;
+			this.m_nVersion = 1350;
 		}
 
 		public void OnAfterDeserialize()
@@ -815,7 +815,7 @@ public class HandSignShortcut : MonoBehaviour
 		private const string CONF_NAME = "MaidFingerDataList.json";
 
 		[SerializeField]
-		private int m_nVersion = 1330;
+		private int m_nVersion = 1350;
 
 		[SerializeField]
 		private List<HandSignShortcut.MaidFingerData> MaidFingerDataList = new List<HandSignShortcut.MaidFingerData>();

+ 43 - 25
Assembly-CSharp/IKCtrlData.cs

@@ -86,7 +86,15 @@ public abstract class IKCtrlData
 	{
 		get
 		{
-			return this.IsIKExec && (this.PositionWeight > 0f || this.RotationWeight > 0f);
+			return this.GetIKExecTruth(IKCtrlData.IKAttachType.NewPoint) || this.GetIKExecTruth(IKCtrlData.IKAttachType.Rotate);
+		}
+	}
+
+	public bool IsWeightOver0
+	{
+		get
+		{
+			return this.PositionWeight * this.m_PosWeightBase > 0f || this.RotationWeight * this.m_RotWeightBase > 0f;
 		}
 	}
 
@@ -224,7 +232,7 @@ public abstract class IKCtrlData
 	{
 	}
 
-	public void TagetTransCpy()
+	public virtual void TagetTransCpy()
 	{
 		this.m_BoneTgtPair.Copy();
 		float num = 0f;
@@ -444,32 +452,28 @@ public abstract class IKCtrlData
 		{
 			setting_data.IsIKExec = false;
 		}
-		if (setting_data.IsIKExec)
+		if (setting_data.IsIKExec && include_offset)
 		{
-			pos = this.GetIKEnable(setting_data.MyType).GetEnable(this.TargetBone.position, pos, false);
-			if (include_offset)
+			if (setting_data.IsPointAttach)
 			{
-				if (setting_data.IsPointAttach)
-				{
-					Vector3 start = pos;
-					switch (this.posOffsetType)
-					{
-					case IKCtrlData.PosOffsetType.OffsetTarget:
-						pos += rot * tgt_data.TgtOffset;
-						break;
-					case IKCtrlData.PosOffsetType.OffsetWorld:
-						pos += tgt_data.TgtOffset;
-						break;
-					case IKCtrlData.PosOffsetType.OffsetBone:
-						pos -= this.TargetBone.rotation * tgt_data.TgtOffset;
-						break;
-					}
-					Debug.DrawLine(start, pos, Color.white);
-				}
-				else
+				Vector3 start = pos;
+				switch (this.posOffsetType)
 				{
-					rot *= Quaternion.Euler(this.GetIKEnable(setting_data.MyType).GetEnable(tgt_data.TgtOffset, false));
+				case IKCtrlData.PosOffsetType.OffsetTarget:
+					pos += rot * tgt_data.TgtOffset;
+					break;
+				case IKCtrlData.PosOffsetType.OffsetWorld:
+					pos += tgt_data.TgtOffset;
+					break;
+				case IKCtrlData.PosOffsetType.OffsetBone:
+					pos -= this.TargetBone.rotation * tgt_data.TgtOffset;
+					break;
 				}
+				Debug.DrawLine(start, pos, Color.white);
+			}
+			else
+			{
+				rot *= Quaternion.Euler(tgt_data.TgtOffset);
 			}
 		}
 	}
@@ -537,8 +541,9 @@ public abstract class IKCtrlData
 			rot *= this.m_AnimPosRotOffset.rot;
 			if (!data.DoSetOffset)
 			{
-				rot *= Quaternion.Euler(this.GetIKEnable(data.MyType).GetEnable(data.curTargetData.TgtOffset, false));
+				rot *= Quaternion.Euler(data.curTargetData.TgtOffset);
 			}
+			rot = Quaternion.Euler(this.GetIKEnable(data.MyType).GetEnable(this.TargetBone.eulerAngles, rot.eulerAngles, false));
 			this.m_IKTarget.rotation = rot;
 			if (data.BlendType == IKCtrlData.IKBlendType.IK_To_IK)
 			{
@@ -573,6 +578,7 @@ public abstract class IKCtrlData
 				}
 				Debug.DrawLine(start, pos, Color.white);
 			}
+			pos = this.GetIKEnable(data.MyType).GetEnable(this.TargetBone.position, pos, false);
 			this.m_IKTarget.position = pos;
 			if (data.BlendType == IKCtrlData.IKBlendType.IK_To_IK)
 			{
@@ -677,6 +683,18 @@ public abstract class IKCtrlData
 		return this.GetIKSettingData(attach_type).offsetEnable;
 	}
 
+	public bool GetIKExecTruth(IKCtrlData.IKAttachType attach_type)
+	{
+		IKCtrlData.IKSettingData iksettingData = (attach_type != IKCtrlData.IKAttachType.Rotate) ? this.PointIK : this.RotateIK;
+		float num = (attach_type != IKCtrlData.IKAttachType.Rotate) ? this.PositionWeight : this.RotationWeight;
+		bool flag = iksettingData.IsIKExec && num > 0f;
+		if (iksettingData.changeFlagData.IsEnable)
+		{
+			flag &= (iksettingData.changeFlagData.GetFlagValue() > 0f);
+		}
+		return flag;
+	}
+
 	[SerializeField]
 	[Header("位置IK")]
 	private IKCtrlData.IKSettingData m_PointIKData = new IKCtrlData.IKSettingData(IKCtrlData.IKAttachType.NewPoint);

+ 6 - 0
Assembly-CSharp/KaraokeDataManager.cs

@@ -297,6 +297,10 @@ public class KaraokeDataManager : MonoBehaviour
 		{
 			list.Add("Sister");
 		}
+		if (GameMain.Instance.CMSystem.GetTmpGenericFlag("Curtness_KARAOKE") == 1)
+		{
+			list.Add("Curtness");
+		}
 		List<Maid> list2 = new List<Maid>();
 		List<Maid> list3 = new List<Maid>();
 		CharacterSelectManager.DefaultMaidList(list3);
@@ -737,6 +741,8 @@ public class KaraokeDataManager : MonoBehaviour
 
 	public const string STR_PERSONAL_SISTER_ENABLED_FLAG = "Sister_KARAOKE";
 
+	public const string STR_PERSONAL_CURTNESS_ENABLED_FLAG = "Curtness_KARAOKE";
+
 	private Dictionary<int, KaraokeDataManager.MusicData> m_MusicDataArray = new Dictionary<int, KaraokeDataManager.MusicData>();
 
 	private Dictionary<int, KaraokeDataManager.BackgroundData> m_BackgroundDataArray = new Dictionary<int, KaraokeDataManager.BackgroundData>();

+ 1 - 1
Assembly-CSharp/Kasizuki/KasizukiManager.cs

@@ -864,7 +864,7 @@ namespace Kasizuki
 		public void Serialize(BinaryWriter bw)
 		{
 			bw.Write("COM3D2_KASIZUKI");
-			bw.Write(1330);
+			bw.Write(1350);
 			this.SerializeOriginHeader(bw);
 			foreach (KeyValuePair<int, KasizukiManager.SaveData> keyValuePair in this.m_SaveDataArray)
 			{

+ 24 - 1
Assembly-CSharp/LimbIKData.cs

@@ -5,9 +5,10 @@ using UnityEngine;
 
 public abstract class LimbIKData : IKCtrlData
 {
-	public LimbIKData(FullBodyIKCtrl ik_ctrl, FBIKChain chain, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, tgt_bone, use_old, false)
+	public LimbIKData(FullBodyIKCtrl ik_ctrl, FBIKChain chain, IKMappingLimb ik_mapping, Transform tgt_bone, bool use_old = false) : base(ik_ctrl, tgt_bone, use_old, false)
 	{
 		this.Chain = chain;
+		this.IKMapping = ik_mapping;
 		this.m_ChainBones = (from node in this.Chain.nodes
 		select node.transform).ToArray<Transform>();
 	}
@@ -28,7 +29,29 @@ public abstract class LimbIKData : IKCtrlData
 		}
 	}
 
+	public override void TagetTransCpy()
+	{
+		base.TagetTransCpy();
+		if (this.m_IsUpperBody)
+		{
+			this.IKMapping.weight = 0f;
+		}
+	}
+
+	public override void ApplyIKSetting()
+	{
+		base.ApplyIKSetting();
+		if (this.m_IsUpperBody)
+		{
+			this.IKMapping.weight = Mathf.Max(this.IKMapping.weight, Mathf.Max(this.PositionWeight, this.RotationWeight));
+		}
+	}
+
 	public readonly FBIKChain Chain;
 
+	public readonly IKMappingLimb IKMapping;
+
+	protected bool m_IsUpperBody;
+
 	protected float m_OrijinPull = -1f;
 }

+ 3 - 3
Assembly-CSharp/Maid.cs

@@ -1378,7 +1378,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeProp(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP_LIST");
-		f_bwWrite.Write(1330);
+		f_bwWrite.Write(1350);
 		f_bwWrite.Write(this.m_dicMaidProp.Count);
 		int num = 0;
 		foreach (KeyValuePair<string, MaidProp> keyValuePair in this.m_dicMaidProp)
@@ -1412,7 +1412,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeMisc(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_MISC");
-		f_bwWrite.Write(1330);
+		f_bwWrite.Write(1350);
 		f_bwWrite.Write(this.m_nActiveSlotNo);
 		if (this.m_texIcon != null)
 		{
@@ -1437,7 +1437,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeBody(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_BODY");
-		f_bwWrite.Write(1330);
+		f_bwWrite.Write(1350);
 		return true;
 	}
 

+ 1 - 1
Assembly-CSharp/MaidParts.cs

@@ -37,7 +37,7 @@ public class MaidParts : MonoBehaviour
 	public unsafe bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MULTI_COL");
-		f_bwWrite.Write(1330);
+		f_bwWrite.Write(1350);
 		f_bwWrite.Write(this.m_aryPartsColor.Length);
 		for (int i = 0; i < this.m_aryPartsColor.Length; i++)
 		{

+ 189 - 0
Assembly-CSharp/MaidPartsCollider.cs

@@ -0,0 +1,189 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using PrivateMaidMode;
+using UnityEngine;
+
+public class MaidPartsCollider : MonoBehaviour
+{
+	public string FilePath
+	{
+		get
+		{
+			return this.filePath;
+		}
+	}
+
+	public List<PartColliderData> GetColliderData()
+	{
+		return this.colliderArray;
+	}
+
+	public static MaidPartsCollider AddPartCollider(Maid maid)
+	{
+		if (maid == null)
+		{
+			NDebug.Assert("AddPartCollider:メイドがいません。", false);
+		}
+		if (maid.body0 == null || !maid.body0.isLoadedBody)
+		{
+			NDebug.Assert("AddPartCollider:メイドのBodyがありません。", false);
+		}
+		MaidPartsCollider maidPartsCollider = maid.gameObject.GetComponent<MaidPartsCollider>();
+		if (maidPartsCollider == null)
+		{
+			maidPartsCollider = maid.gameObject.AddComponent<MaidPartsCollider>();
+		}
+		return maidPartsCollider;
+	}
+
+	public List<PartColliderData> AddCollider()
+	{
+		this.RemoveCollider();
+		this.Read();
+		return this.colliderArray;
+	}
+
+	public void RemoveCollider()
+	{
+		if (this.colliderArray != null)
+		{
+			for (int i = 0; i < this.colliderArray.Count; i++)
+			{
+				if (this.colliderArray[i] != null && this.colliderArray[i].gameObject != null)
+				{
+					UnityEngine.Object.Destroy(this.colliderArray[i].gameObject);
+				}
+			}
+			this.colliderArray.Clear();
+		}
+	}
+
+	public void Read()
+	{
+		this.colliderArray = new List<PartColliderData>();
+		string path = Path.ChangeExtension(this.filePath, null);
+		TextAsset textAsset = (TextAsset)Resources.Load(path);
+		BinaryReader binaryReader = new BinaryReader(new MemoryStream(textAsset.bytes));
+		Maid component = base.GetComponent<Maid>();
+		Transform trBones = component.body0.m_trBones;
+		int num = binaryReader.ReadInt32();
+		for (int i = 0; i < num; i++)
+		{
+			string text = binaryReader.ReadString();
+			int count = text.IndexOf("Bip01");
+			text = text.Remove(0, count);
+			Transform transform = trBones.Find(text);
+			if (transform != null)
+			{
+				GameObject gameObject = new GameObject(this.addObjName + transform.name);
+				gameObject.layer = this.layerNum;
+				gameObject.transform.SetParent(transform, false);
+				PartColliderData partColliderData = this.ReadColliderData(binaryReader, gameObject);
+				if (partColliderData != null)
+				{
+					this.colliderArray.Add(partColliderData);
+				}
+			}
+		}
+		binaryReader.Close();
+		Resources.UnloadAsset(textAsset);
+	}
+
+	public void Write()
+	{
+		string path = Path.Combine(Application.dataPath, "Resources/" + this.filePath);
+		Dictionary<string, PartColliderData> dictionary = this.FindPartColliderData();
+		Dictionary<string, PartColliderData> dictionary2 = new Dictionary<string, PartColliderData>();
+		foreach (KeyValuePair<string, PartColliderData> keyValuePair in dictionary)
+		{
+			string key = keyValuePair.Key;
+			int num = keyValuePair.Key.IndexOf(this.addObjName);
+			if (num > 0)
+			{
+				key = keyValuePair.Key.Remove(num - 1);
+			}
+			dictionary2.Add(key, keyValuePair.Value);
+		}
+		MemoryStream memoryStream = new MemoryStream();
+		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
+		binaryWriter.Write(dictionary2.Count);
+		foreach (KeyValuePair<string, PartColliderData> keyValuePair2 in dictionary2)
+		{
+			binaryWriter.Write(keyValuePair2.Key);
+			this.WriteColliderData(binaryWriter, keyValuePair2.Value);
+		}
+		File.WriteAllBytes(path, memoryStream.ToArray());
+	}
+
+	private PartColliderData ReadColliderData(BinaryReader reader, GameObject addColliderObject)
+	{
+		PartColliderData partColliderData = null;
+		int value = reader.ReadInt32();
+		Vector3 zero = Vector3.zero;
+		zero.x = reader.ReadSingle();
+		zero.y = reader.ReadSingle();
+		zero.z = reader.ReadSingle();
+		int direction = reader.ReadInt32();
+		float height = reader.ReadSingle();
+		float radius = reader.ReadSingle();
+		if (addColliderObject != null && addColliderObject.GetComponent<PartColliderData>() == null)
+		{
+			partColliderData = addColliderObject.AddComponent<PartColliderData>();
+			CapsuleCollider capsuleCollider = partColliderData.capsuleCollider;
+			capsuleCollider.center = zero;
+			capsuleCollider.direction = direction;
+			capsuleCollider.height = height;
+			capsuleCollider.radius = radius;
+			capsuleCollider.isTrigger = true;
+			capsuleCollider.enabled = false;
+			capsuleCollider.enabled = true;
+			partColliderData.point = (TouchDataBase.TouchPoint)Enum.ToObject(typeof(TouchDataBase.TouchPoint), value);
+		}
+		return partColliderData;
+	}
+
+	private void WriteColliderData(BinaryWriter writer, PartColliderData colliderData)
+	{
+		writer.Write((int)colliderData.point);
+		CapsuleCollider capsuleCollider = colliderData.capsuleCollider;
+		writer.Write(capsuleCollider.center.x);
+		writer.Write(capsuleCollider.center.y);
+		writer.Write(capsuleCollider.center.z);
+		writer.Write(capsuleCollider.direction);
+		writer.Write(capsuleCollider.height);
+		writer.Write(capsuleCollider.radius);
+	}
+
+	private Dictionary<string, PartColliderData> FindPartColliderData()
+	{
+		Action<Transform, string, Dictionary<string, PartColliderData>> FindFunc = null;
+		FindFunc = delegate(Transform target, string path, Dictionary<string, PartColliderData> pathDic)
+		{
+			path += target.name;
+			PartColliderData component = target.GetComponent<PartColliderData>();
+			if (component != null)
+			{
+				pathDic.Add(path, component);
+			}
+			for (int j = 0; j < target.childCount; j++)
+			{
+				FindFunc(target.GetChild(j), path + "/", pathDic);
+			}
+		};
+		Dictionary<string, PartColliderData> dictionary = new Dictionary<string, PartColliderData>();
+		for (int i = 0; i < base.transform.childCount; i++)
+		{
+			FindFunc(base.transform.GetChild(i), string.Empty, dictionary);
+		}
+		return dictionary;
+	}
+
+	private string addObjName = "OvrPartsHit_";
+
+	private string filePath = "System/maid_part_collider.bytes";
+
+	private int layerNum = 17;
+
+	private List<PartColliderData> colliderArray = new List<PartColliderData>();
+}

+ 1 - 1
Assembly-CSharp/MaidProp.cs

@@ -8,7 +8,7 @@ public class MaidProp
 	public bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP");
-		f_bwWrite.Write(1330);
+		f_bwWrite.Write(1350);
 		f_bwWrite.Write(this.idx);
 		f_bwWrite.Write(this.name);
 		f_bwWrite.Write(this.type);

+ 32 - 2
Assembly-CSharp/MaidStatus/EnumConvert.cs

@@ -25,8 +25,17 @@ namespace MaidStatus
 			return "MaidStatus/関係タイプ/" + EnumConvert.GetString(relationEnhance);
 		}
 
-		public static string GetTerm(Relation relation, AdditionalRelation relationEnhance)
+		public static string GetTerm(SpecialRelation relationSpecial)
 		{
+			return "MaidStatus/関係タイプ/" + EnumConvert.GetString(relationSpecial);
+		}
+
+		public static string GetTerm(Relation relation, AdditionalRelation relationEnhance, SpecialRelation relationSpecial)
+		{
+			if (relationSpecial != SpecialRelation.Null)
+			{
+				return EnumConvert.GetTerm(relationSpecial);
+			}
 			return (relationEnhance != AdditionalRelation.Null) ? EnumConvert.GetTerm(relationEnhance) : EnumConvert.GetTerm(relation);
 		}
 
@@ -147,8 +156,29 @@ namespace MaidStatus
 			return result;
 		}
 
-		public static string GetString(Relation relation, AdditionalRelation relationEnhance)
+		public static string GetString(SpecialRelation relation)
 		{
+			string result = string.Empty;
+			if (relation != SpecialRelation.Married)
+			{
+				if (relation == SpecialRelation.Null)
+				{
+					result = "Null";
+				}
+			}
+			else
+			{
+				result = "嫁";
+			}
+			return result;
+		}
+
+		public static string GetString(Relation relation, AdditionalRelation relationEnhance, SpecialRelation relationSpecial)
+		{
+			if (relationSpecial != SpecialRelation.Null)
+			{
+				return EnumConvert.GetString(relationSpecial);
+			}
 			return (relationEnhance != AdditionalRelation.Null) ? EnumConvert.GetString(relationEnhance) : EnumConvert.GetString(relation);
 		}
 

+ 13 - 2
Assembly-CSharp/MaidStatus/Personal.cs

@@ -101,9 +101,11 @@ namespace MaidStatus
 				NDebug.Assert(condition, text + "\nopen failed.");
 				array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
 			}
+			HashSet<int> additionalRelationEnabledIdList = new HashSet<int>();
+			CsvCommonIdManager.ReadEnabledIdList(GameUty.FileSystem, GameUty.PathList, "maid_status_personal_additionalrelation_enabled_list", ref additionalRelationEnabledIdList);
 			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in Personal.commonIdManager.idMap)
 			{
-				Personal.basicDatas.Add(keyValuePair.Key, new Personal.Data(keyValuePair.Key, array2[0].Value, array2[1].Value));
+				Personal.basicDatas.Add(keyValuePair.Key, new Personal.Data(keyValuePair.Key, array2[0].Value, array2[1].Value, additionalRelationEnabledIdList));
 			}
 			foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
 			{
@@ -118,13 +120,15 @@ namespace MaidStatus
 
 		public const string termRootText = "MaidStatus/性格タイプ/";
 
+		public const string additionalRelationEnabledCsvName = "maid_status_personal_additionalrelation_enabled_list";
+
 		private static CsvCommonIdManager commonIdManager;
 
 		private static Dictionary<int, Personal.Data> basicDatas;
 
 		public class Data
 		{
-			public Data(int id, CsvParser basicCsv, CsvParser featureConditionsCsv)
+			public Data(int id, CsvParser basicCsv, CsvParser featureConditionsCsv, HashSet<int> additionalRelationEnabledIdList)
 			{
 				List<int> list = new List<int>();
 				for (int i = 0; i < basicCsv.max_cell_y; i++)
@@ -189,6 +193,11 @@ namespace MaidStatus
 							'/'
 						});
 						this.competitiveMotionFileDefeat = new KeyValuePair<string, string>(Path.ChangeExtension(array3[0], ".ks"), array3[1]);
+						this.enabledAdditionalRelation = additionalRelationEnabledIdList.Contains(id);
+						if (this.uniqueName == "Muku" || this.uniqueName == "Majime" || this.uniqueName == "Rindere")
+						{
+							this.enabledAdditionalRelation = true;
+						}
 						break;
 					}
 				}
@@ -232,6 +241,8 @@ namespace MaidStatus
 
 			public readonly bool single;
 
+			public readonly bool enabledAdditionalRelation;
+
 			public readonly KeyValuePair<string, string> competitiveMotionFileVictory;
 
 			public readonly KeyValuePair<string, string> competitiveMotionFileDefeat;

+ 10 - 0
Assembly-CSharp/MaidStatus/SpecialRelation.cs

@@ -0,0 +1,10 @@
+using System;
+
+namespace MaidStatus
+{
+	public enum SpecialRelation
+	{
+		Null,
+		Married
+	}
+}

+ 21 - 4
Assembly-CSharp/MaidStatus/Status.cs

@@ -241,9 +241,9 @@ namespace MaidStatus
 			}
 			set
 			{
-				if (Product.enabeldAdditionalRelation && (this.personal.uniqueName == "Muku" || this.personal.uniqueName == "Majime" || this.personal.uniqueName == "Rindere"))
+				if (Product.enabeldAdditionalRelation && this.personal.enabledAdditionalRelation)
 				{
-					this.additionalRelation_ = value;
+					this.additionalRelation_ = ((this.heroineType == HeroineType.Sub) ? AdditionalRelation.Null : value);
 				}
 				else
 				{
@@ -909,6 +909,7 @@ namespace MaidStatus
 			this.creationTimeNum = ulong.Parse(text);
 			this.employmentDay = GameMain.Instance.CharacterMgr.status.days;
 			this.additionalRelation = AdditionalRelation.Vigilance;
+			this.specialRelation = SpecialRelation.Null;
 			List<JobClass.Data> learnPossibleClassDatas = this.jobClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
 			foreach (JobClass.Data data in learnPossibleClassDatas)
 			{
@@ -1316,8 +1317,9 @@ namespace MaidStatus
 
 		public void Serialize(BinaryWriter binary)
 		{
+			this.SetFlag("__1330_specialrelation__", (int)this.specialRelation);
 			binary.Write("CM3D2_MAID_STATUS");
-			binary.Write(1330);
+			binary.Write(1350);
 			binary.Write(this.guid);
 			binary.Write(this.creationTime);
 			binary.Write((short)this.heroineType);
@@ -1656,6 +1658,10 @@ namespace MaidStatus
 			if (1270 <= num)
 			{
 				this.additionalRelation_ = (AdditionalRelation)binary.ReadInt16();
+				if (this.additionalRelation_ != AdditionalRelation.Null && this.heroineType == HeroineType.Sub)
+				{
+					this.additionalRelation_ = AdditionalRelation.Null;
+				}
 				this.nickName_ = binary.ReadString();
 				this.age = binary.ReadInt32();
 				if (this.additionalRelation_ == AdditionalRelation.Vigilance)
@@ -1677,6 +1683,15 @@ namespace MaidStatus
 					}
 				}
 			}
+			if (!PluginData.IsEnabled("GP002") || this.GetFlag("__1330_specialrelation__") == 0)
+			{
+				this.specialRelation = SpecialRelation.Null;
+			}
+			else
+			{
+				this.specialRelation = (SpecialRelation)this.GetFlag("__1330_specialrelation__");
+			}
+			this.RemoveFlag("__1330_specialrelation__");
 			uint num9 = binary.ReadUInt32();
 			NDebug.Assert(2177629204u == num9, "メイドパラメータのロードに失敗しました");
 			if (num <= 1050)
@@ -1703,7 +1718,7 @@ namespace MaidStatus
 			List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
 			foreach (Skill.Data data2 in learnPossibleSkills)
 			{
-				if (data2.specialConditionType == Skill.Data.SpecialConditionType.GP01Recollect)
+				if (data2.specialConditionType == Skill.Data.SpecialConditionType.GP01Recollect || data2.specialConditionType == Skill.Data.SpecialConditionType.GP02Recollect)
 				{
 					this.yotogiSkill.Add(data2);
 				}
@@ -1942,6 +1957,8 @@ namespace MaidStatus
 
 		public BodyData body;
 
+		public SpecialRelation specialRelation;
+
 		public int noonWorkId;
 
 		public int nightWorkId;

+ 1 - 1
Assembly-CSharp/Menu.cs

@@ -924,7 +924,7 @@ public class Menu : MonoBehaviour
 			Directory.CreateDirectory(text);
 		}
 		StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
-		streamWriter.WriteLine("出力バージョン\t" + 1330);
+		streamWriter.WriteLine("出力バージョン\t" + 1350);
 		streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
 		try
 		{

+ 1 - 1
Assembly-CSharp/Misc.cs

@@ -2,7 +2,7 @@
 
 public class Misc
 {
-	public const int GAME_VERSION = 1330;
+	public const int GAME_VERSION = 1350;
 
 	public const string GAME_DATA_PATH = "GameData";
 

+ 1 - 1
Assembly-CSharp/ModCompile.cs

@@ -604,7 +604,7 @@ public class ModCompile : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MESH");
-		binaryWriter.Write(1330);
+		binaryWriter.Write(1350);
 		string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(f_strMqoFile);
 		binaryWriter.Write(fileNameWithoutExtension);
 		binaryWriter.Write(exObjIn2.strName);

+ 2 - 2
Assembly-CSharp/OvrIK.cs

@@ -1568,7 +1568,7 @@ public class OvrIK : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1330;
+			this.m_nVersion = 1350;
 		}
 
 		public void OnAfterDeserialize()
@@ -1628,7 +1628,7 @@ public class OvrIK : MonoBehaviour
 		private const string CONF_NAME = "OvrIK.json";
 
 		[SerializeField]
-		private int m_nVersion = 1330;
+		private int m_nVersion = 1350;
 
 		[SerializeField]
 		private float solver_locomotion_weight = 1f;

+ 75 - 0
Assembly-CSharp/PartColliderData.cs

@@ -0,0 +1,75 @@
+using System;
+using PrivateMaidMode;
+using UnityEngine;
+
+[RequireComponent(typeof(CapsuleCollider))]
+public class PartColliderData : MonoBehaviour
+{
+	public CapsuleCollider capsuleCollider
+	{
+		get
+		{
+			return base.GetComponent<CapsuleCollider>();
+		}
+		set
+		{
+			CapsuleCollider component = base.GetComponent<CapsuleCollider>();
+		}
+	}
+
+	public static void SetDefaultCursor()
+	{
+		Cursor.SetCursor(null, Vector2.zero, CursorMode.ForceSoftware);
+	}
+
+	private void Awake()
+	{
+		this.cursorTexture = (Texture2D)Resources.Load("ScenePrivate/Textures/TouchCursor");
+	}
+
+	private void OnDestroy()
+	{
+		this.SetHandCursor(false);
+	}
+
+	public void SetHandCursor(bool visible)
+	{
+		if (visible)
+		{
+			Cursor.SetCursor(this.cursorTexture, new Vector2((float)(this.cursorTexture.width / 2), (float)(this.cursorTexture.height / 2)), CursorMode.ForceSoftware);
+		}
+		else
+		{
+			PartColliderData.SetDefaultCursor();
+		}
+	}
+
+	private void OnMouseEnter()
+	{
+		if (UICamera.Raycast(Input.mousePosition))
+		{
+			return;
+		}
+		if (this.canTouch)
+		{
+			this.SetHandCursor(true);
+			this.isEnter = true;
+		}
+	}
+
+	private void OnMouseExit()
+	{
+		if (this.isEnter)
+		{
+			this.SetHandCursor(false);
+		}
+	}
+
+	private Texture2D cursorTexture;
+
+	public bool canTouch;
+
+	private bool isEnter;
+
+	public TouchDataBase.TouchPoint point;
+}

+ 1 - 1
Assembly-CSharp/PhotoModeSaveAndLoad.cs

@@ -450,7 +450,7 @@ public class PhotoModeSaveAndLoad : MonoBehaviour
 	private XElement CreateCommonData(string title, string comment)
 	{
 		string value = DateTime.ParseExact(DateTime.Now.ToString("yyyyMMddHHmmss"), "yyyyMMddHHmmss", null).ToString("yyyy.MM.dd HH:mm");
-		XElement xelement = new XElement("GameVersion", 1330);
+		XElement xelement = new XElement("GameVersion", 1350);
 		XElement xelement2 = new XElement("SaveTime", value);
 		XElement xelement3 = new XElement("Title", title);
 		XElement xelement4 = new XElement("Comment", comment);

+ 1 - 1
Assembly-CSharp/PlayerStatus/Status.cs

@@ -831,7 +831,7 @@ namespace PlayerStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_PLAYER_STATUS");
-			binary.Write(1330);
+			binary.Write(1350);
 			binary.Write(this.playerName_);
 			binary.Write(this.days_);
 			binary.Write(this.totalPurchasePrice_);

+ 82 - 0
Assembly-CSharp/PrivateCharaSelectMove.cs

@@ -0,0 +1,82 @@
+using System;
+
+public class PrivateCharaSelectMove : WfScreenChildren
+{
+	public override void Awake()
+	{
+		base.Awake();
+		base.SetFadeTime(0f);
+	}
+
+	public void SetNextLabel(string label)
+	{
+		this.m_nextLabel = label;
+	}
+
+	public void SetBackupFile(string fileName)
+	{
+		this.m_backupFile = fileName;
+	}
+
+	protected override void OnCall()
+	{
+	}
+
+	public override void Update()
+	{
+		base.Update();
+		if (base.fade_status == WfScreenChildren.FadeStatus.Wait)
+		{
+			this.Finish();
+		}
+	}
+
+	protected override void OnFinish()
+	{
+		base.OnFinish();
+		if (!string.IsNullOrEmpty(this.m_nextLabel) && !string.IsNullOrEmpty(this.m_backupFile))
+		{
+			string nextLabel = this.m_nextLabel;
+			string backupFile = this.m_backupFile;
+			this.m_nextLabel = string.Empty;
+			this.m_backupFile = string.Empty;
+			GameMain.Instance.ScriptMgr.adv_kag.LoadScriptFile(backupFile, string.Empty);
+			GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(nextLabel);
+			GameMain.Instance.ScriptMgr.adv_kag.Exec();
+		}
+	}
+
+	protected override void FadeIn()
+	{
+		base.FadeIn();
+		if (base.fade_status == WfScreenChildren.FadeStatus.Wait)
+		{
+			this.Finish();
+		}
+	}
+
+	public bool IsExistNextFile()
+	{
+		return !string.IsNullOrEmpty(this.m_nextLabel) && !string.IsNullOrEmpty(this.m_backupFile);
+	}
+
+	public string NextLabel
+	{
+		get
+		{
+			return this.m_nextLabel;
+		}
+	}
+
+	public string BackupFile
+	{
+		get
+		{
+			return this.m_backupFile;
+		}
+	}
+
+	private string m_nextLabel;
+
+	private string m_backupFile;
+}

+ 163 - 0
Assembly-CSharp/PrivateEventManager.cs

@@ -0,0 +1,163 @@
+using System;
+using System.Collections;
+using PrivateMaidMode;
+using UnityEngine;
+
+public class PrivateEventManager : WfScreenChildren
+{
+	protected bool isNoon
+	{
+		get
+		{
+			return GameMain.Instance.CharacterMgr.status.isDaytime;
+		}
+	}
+
+	public override void Awake()
+	{
+		base.Awake();
+		if (this.eventHelpObject != null)
+		{
+			this.eventHelpObject.SetActive(false);
+		}
+	}
+
+	protected override void OnCall()
+	{
+		this.okButton.gameObject.SetActive(false);
+		if (ScenePrivateEventModeAwake.callEventId == -1)
+		{
+			if (this.eventHelpObject != null)
+			{
+				this.eventHelpObject.SetActive(true);
+			}
+			base.StartCoroutine(this.SetupPrivateMode());
+		}
+	}
+
+	protected IEnumerator SetupPrivateMode()
+	{
+		this.setupCompleted = false;
+		PrivateModeMgr privateModeData = PrivateModeMgr.Instance;
+		this.maid = privateModeData.PrivateMaid;
+		if (privateModeData.SelectBG == null)
+		{
+			NDebug.Assert("プライベートモードの設定が未設定で始まりました", false);
+			privateModeData.SetPrivateBG(DataBase.GetData(10).bgData);
+		}
+		if (this.maid == null)
+		{
+			this.maid = GameMain.Instance.CharacterMgr.GetMaid(0);
+		}
+		else
+		{
+			GameMain.Instance.CharacterMgr.SetActiveMaid(this.maid, 0);
+		}
+		this.maid.AllProcPropSeqStart();
+		this.maid.Visible = true;
+		while (this.maid.IsBusy)
+		{
+			yield return null;
+		}
+		MaidColliderCollect.SuspendColliderAll(this.maid, false);
+		privateModeData.SelectBG.Apply(this.isNoon);
+		this.bgEvent = privateModeData.SelectBG.GetEvent(this.isNoon);
+		if (this.bgEvent != null)
+		{
+			if (this.eventHelpObject != null && this.bgEvent.eventPointList.Length <= 0)
+			{
+				UILabel component = UTY.GetChildObject(this.eventHelpObject, "Text/Text", false).GetComponent<UILabel>();
+				if (component != null)
+				{
+					component.text = "イベントがありません";
+				}
+			}
+			if (this.eventHitObject != null)
+			{
+				UnityEngine.Object.DestroyImmediate(this.eventHitObject);
+			}
+			this.eventHitObject = this.bgEvent.InstantiateHitPrefab(this.bgHitPrefabParent.gameObject);
+			this.eventHitObject.SetActive(true);
+		}
+		PrivateModeEventObject.onClickObject = new Action<int>(this.OnClickEventObject);
+		privateModeData.LoadLocation();
+		yield return null;
+		this.okButton.gameObject.SetActive(true);
+		this.setupCompleted = true;
+		uGUITutorialPanel.OpenTutorial("ScenePrivateEventMode", null, false);
+		yield break;
+	}
+
+	protected override bool IsCallFadeIn()
+	{
+		return this.setupCompleted;
+	}
+
+	public void OnClickOK()
+	{
+		if (!this.setupCompleted)
+		{
+			return;
+		}
+		this.Finish();
+	}
+
+	protected override void OnFinish()
+	{
+		if (this.loadScriptAction != null)
+		{
+			this.loadScriptAction();
+			this.loadScriptAction = null;
+			return;
+		}
+		if (this.eventHitObject != null)
+		{
+			this.eventHitObject.SetActive(false);
+		}
+		PartColliderData.SetDefaultCursor();
+		string returnFile = ScenePrivateEventModeAwake.returnFile;
+		if (!string.IsNullOrEmpty(returnFile))
+		{
+			GameMain.Instance.ScriptMgr.adv_kag.LoadScriptFile(returnFile, string.Empty);
+		}
+		base.parent_mgr.CallScreen("Move");
+	}
+
+	protected void OnClickEventObject(int eventNo)
+	{
+		if (this.bgEvent == null || this.maid == null || GameMain.Instance.MainCamera.IsFadeProc())
+		{
+			return;
+		}
+		this.loadScriptAction = delegate()
+		{
+			bool flag = this.bgEvent.LoadScript(this.maid, eventNo);
+			if (!flag)
+			{
+				Debug.LogError("イベントNo" + eventNo + "のイベントは設定されていません");
+			}
+			return flag;
+		};
+		GameMain.Instance.SoundMgr.PlaySystem(SoundMgr.SeType.Click);
+		this.Finish();
+	}
+
+	[SerializeField]
+	private Transform bgHitPrefabParent;
+
+	[SerializeField]
+	private UIButton okButton;
+
+	[SerializeField]
+	private GameObject eventHelpObject;
+
+	protected bool setupCompleted;
+
+	protected Maid maid;
+
+	protected DataBase.BG.Event bgEvent;
+
+	protected GameObject eventHitObject;
+
+	protected Func<bool> loadScriptAction;
+}

+ 541 - 0
Assembly-CSharp/PrivateMaidMode/DataBase.cs

@@ -0,0 +1,541 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+using wf;
+
+namespace PrivateMaidMode
+{
+	public static class DataBase
+	{
+		public static int Count
+		{
+			get
+			{
+				DataBase.CreateData();
+				return DataBase.commonIdManager.idMap.Count;
+			}
+		}
+
+		public static bool Contains(int id)
+		{
+			return DataBase.commonIdManager.idMap.ContainsKey(id);
+		}
+
+		public static DataBase.Data GetData(int id)
+		{
+			DataBase.CreateData();
+			NDebug.Assert(DataBase.basicDatas.ContainsKey(id), "プライベートメイドモード\nID[" + id + "]のデータは存在しません");
+			return DataBase.basicDatas[id];
+		}
+
+		public static bool IsEnabled(int id)
+		{
+			DataBase.CreateData();
+			return DataBase.commonIdManager.enabledIdList.Contains(id);
+		}
+
+		public static List<DataBase.Data> GetAllDatas(bool onlyEnabled)
+		{
+			DataBase.CreateData();
+			List<DataBase.Data> list = new List<DataBase.Data>();
+			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in DataBase.commonIdManager.idMap)
+			{
+				if (!onlyEnabled || DataBase.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+				{
+					list.Add(DataBase.basicDatas[keyValuePair.Key]);
+				}
+			}
+			return list;
+		}
+
+		public static List<DataBase.BG> GetAllBGDatas()
+		{
+			DataBase.CreateData();
+			return new List<DataBase.BG>(DataBase.bgDatas.Values);
+		}
+
+		public static DataBase.BG GetBGData(string uniqueNameBG)
+		{
+			DataBase.CreateData();
+			foreach (KeyValuePair<string, DataBase.BG> keyValuePair in DataBase.bgDatas)
+			{
+				if (keyValuePair.Key == uniqueNameBG)
+				{
+					return keyValuePair.Value;
+				}
+			}
+			return null;
+		}
+
+		public static void CreateData()
+		{
+			if (DataBase.commonIdManager != null)
+			{
+				return;
+			}
+			DataBase.commonIdManager = new CsvCommonIdManager("private_maidmode_group", "プライベートメイドモード", CsvCommonIdManager.Type.IdOnly, null);
+			DataBase.basicDatas = new Dictionary<int, DataBase.Data>();
+			string[] array = new string[]
+			{
+				"list"
+			};
+			KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
+			for (int i = 0; i < array2.Length; i++)
+			{
+				string text = "private_maidmode_group_" + array[i] + ".nei";
+				AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
+				CsvParser csvParser = new CsvParser();
+				bool condition = csvParser.Open(afileBase);
+				NDebug.Assert(condition, text + "\nopen failed.");
+				array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
+			}
+			Dictionary<string, DataBase.BG.Event[]> dictionary = new Dictionary<string, DataBase.BG.Event[]>();
+			using (AFileBase afileBase2 = GameUty.FileSystem.FileOpen("private_maidmode_event_list.nei"))
+			{
+				using (CsvParser csvParser2 = new CsvParser())
+				{
+					csvParser2.Open(afileBase2);
+					NDebug.Assert(csvParser2.IsValid(), "private_maidmode_event_list.nei\nopen failed.");
+					for (int j = 1; j < csvParser2.max_cell_y; j++)
+					{
+						string key;
+						DataBase.BG.Event @event = new DataBase.BG.Event(j, csvParser2, ref key);
+						if (!dictionary.ContainsKey(key))
+						{
+							dictionary.Add(key, new DataBase.BG.Event[2]);
+						}
+						dictionary[key][(!@event.isNoon) ? 1 : 0] = @event;
+					}
+				}
+			}
+			Dictionary<string, List<DataBase.BG.Location>> dictionary2 = new Dictionary<string, List<DataBase.BG.Location>>();
+			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in DataBase.commonIdManager.idMap)
+			{
+				int key2 = keyValuePair.Key;
+				string key3;
+				DataBase.BG.Location item = new DataBase.BG.Location(key2, array2[0].Value, ref key3);
+				if (!dictionary2.ContainsKey(key3))
+				{
+					dictionary2.Add(key3, new List<DataBase.BG.Location>());
+				}
+				List<DataBase.BG.Location> list = dictionary2[key3];
+				list.Add(item);
+			}
+			Dictionary<string, DataBase.BG> dictionary3 = new Dictionary<string, DataBase.BG>();
+			using (AFileBase afileBase3 = GameUty.FileSystem.FileOpen("private_maidmode_bg_list.nei"))
+			{
+				using (CsvParser csvParser3 = new CsvParser())
+				{
+					csvParser3.Open(afileBase3);
+					NDebug.Assert(csvParser3.IsValid(), "private_maidmode_bg_list.nei\nopen failed.");
+					for (int k = 1; k < csvParser3.max_cell_y; k++)
+					{
+						DataBase.BG bg = new DataBase.BG(k, csvParser3, dictionary2, dictionary);
+						dictionary3.Add(bg.uniqueName, bg);
+					}
+				}
+			}
+			DataBase.bgDatas = dictionary3;
+			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair2 in DataBase.commonIdManager.idMap)
+			{
+				int key4 = keyValuePair2.Key;
+				DataBase.Data value = new DataBase.Data(key4, array2[0].Value, dictionary3);
+				DataBase.basicDatas.Add(key4, value);
+			}
+			foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair3 in array2)
+			{
+				keyValuePair3.Value.Dispose();
+				keyValuePair3.Key.Dispose();
+			}
+		}
+
+		private const string csvTopCommonName = "private_maidmode_group";
+
+		private const string typeNameForErrorLog = "プライベートメイドモード";
+
+		private const string bgDefineFileName = "private_maidmode_bg_list.nei";
+
+		private const string eventDefineFileName = "private_maidmode_event_list.nei";
+
+		private static CsvCommonIdManager commonIdManager;
+
+		private static Dictionary<int, DataBase.Data> basicDatas;
+
+		private static Dictionary<string, DataBase.BG> bgDatas;
+
+		public class BG
+		{
+			public BG(int lineY, CsvParser basicCsv, Dictionary<string, List<DataBase.BG.Location>> locationList, Dictionary<string, DataBase.BG.Event[]> eventList)
+			{
+				if (!basicCsv.IsCellToExistData(0, lineY))
+				{
+					return;
+				}
+				int num = 0;
+				this.uniqueName = basicCsv.GetCellAsString(num++, lineY);
+				this.drawName = basicCsv.GetCellAsString(num++, lineY);
+				string cellAsString = basicCsv.GetCellAsString(num++, lineY);
+				List<int> list = new List<int>();
+				if (!string.IsNullOrEmpty(cellAsString))
+				{
+					foreach (string text in cellAsString.Split(new char[]
+					{
+						','
+					}))
+					{
+						int minValue = int.MinValue;
+						if (int.TryParse(text.Trim(), out minValue))
+						{
+							list.Add(minValue);
+						}
+					}
+				}
+				this.requestFacilityId = list.ToArray();
+				this.prefabName = new string[2];
+				this.prefabName[0] = basicCsv.GetCellAsString(num++, lineY);
+				this.prefabName[1] = basicCsv.GetCellAsString(num++, lineY);
+				if (locationList != null && locationList.ContainsKey(this.uniqueName))
+				{
+					this.locations = locationList[this.uniqueName].ToArray();
+					foreach (DataBase.BG.Location location in this.locations)
+					{
+						if (location != null)
+						{
+							location.SetParentBg(this);
+						}
+					}
+				}
+				if (eventList != null && eventList.ContainsKey(this.uniqueName) && eventList[this.uniqueName] != null)
+				{
+					this.events = eventList[this.uniqueName];
+					foreach (DataBase.BG.Event @event in this.events)
+					{
+						if (@event != null)
+						{
+							@event.SetParentBg(this);
+							@event.ShuffleEventPlayOrder();
+						}
+					}
+				}
+			}
+
+			public bool enabled
+			{
+				get
+				{
+					if (this.requestFacilityId == null || this.requestFacilityId.Length <= 0)
+					{
+						return true;
+					}
+					FacilityManager facilityManager = (!(GameMain.Instance != null)) ? null : GameMain.Instance.FacilityMgr;
+					if (facilityManager != null)
+					{
+						foreach (int facilityTypeID in this.requestFacilityId)
+						{
+							Facility[] array2;
+							if (facilityManager.IsExistTypeFacility(facilityTypeID, out array2))
+							{
+								return true;
+							}
+						}
+					}
+					return false;
+				}
+			}
+
+			public string drawNameTerm
+			{
+				get
+				{
+					return string.Empty;
+				}
+			}
+
+			public DataBase.BG.Location GetLocation(string locationName)
+			{
+				foreach (DataBase.BG.Location location in this.locations)
+				{
+					if (location != null && location.drawName == locationName)
+					{
+						return location;
+					}
+				}
+				return null;
+			}
+
+			public DataBase.BG.Event GetEvent(bool isNoon)
+			{
+				return (this.events != null && this.events.Length != 0) ? this.events[(!isNoon) ? 1 : 0] : null;
+			}
+
+			public void Apply(bool isNoon)
+			{
+				if (GameMain.Instance != null && GameMain.Instance.BgMgr != null)
+				{
+					GameMain.Instance.BgMgr.ChangeBg(this.prefabName[(!isNoon) ? 1 : 0]);
+				}
+			}
+
+			public readonly string uniqueName;
+
+			public readonly string drawName;
+
+			public readonly int[] requestFacilityId;
+
+			public readonly string[] prefabName;
+
+			public readonly DataBase.BG.Location[] locations;
+
+			public readonly DataBase.BG.Event[] events;
+
+			public class Location
+			{
+				public Location(int uniqueId, CsvParser basicCsv, out string uniqueBgName)
+				{
+					uniqueBgName = string.Empty;
+					for (int i = 1; i < basicCsv.max_cell_y; i++)
+					{
+						if (basicCsv.IsCellToExistData(0, i) && basicCsv.GetCellAsInteger(0, i) == uniqueId)
+						{
+							int num = 1;
+							uniqueBgName = basicCsv.GetCellAsString(num++, i);
+							this.drawName = basicCsv.GetCellAsString(num++, i);
+							this.fileName = basicCsv.GetCellAsString(num++, i);
+							if (!Path.HasExtension(this.fileName))
+							{
+								this.fileName += ".ks";
+							}
+							this.labelName = basicCsv.GetCellAsString(num++, i);
+							break;
+						}
+					}
+				}
+
+				public DataBase.BG parentBg { get; private set; }
+
+				public string drawNameTerm
+				{
+					get
+					{
+						return string.Empty;
+					}
+				}
+
+				public void SetParentBg(DataBase.BG parentBg)
+				{
+					this.parentBg = parentBg;
+				}
+
+				public bool LoadScript()
+				{
+					if (!string.IsNullOrEmpty(this.labelName) && GameMain.Instance != null && GameMain.Instance.ScriptMgr != null)
+					{
+						ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
+						scriptMgr.tmp_kag.LoadScriptFile(this.fileName, this.labelName);
+						scriptMgr.tmp_kag.enabled = true;
+						scriptMgr.tmp_kag.Exec();
+						scriptMgr.tmp_kag.enabled = false;
+						return true;
+					}
+					return false;
+				}
+
+				public readonly string drawName;
+
+				public readonly string fileName;
+
+				public readonly string labelName;
+			}
+
+			public class Event
+			{
+				public Event(int lineY, CsvParser basicCsv, out string uniqueBgName)
+				{
+					uniqueBgName = string.Empty;
+					if (!basicCsv.IsCellToExistData(0, lineY))
+					{
+						return;
+					}
+					int num = 0;
+					uniqueBgName = basicCsv.GetCellAsString(num++, lineY);
+					this.isNoon = (basicCsv.GetCellAsString(num++, lineY) == "昼");
+					this.hitPrefabPath = basicCsv.GetCellAsString(num++, lineY);
+					this.eventScriptFile = basicCsv.GetCellAsString(num++, lineY);
+					if (!Path.HasExtension(this.eventScriptFile))
+					{
+						this.eventScriptFile += ".ks";
+					}
+					List<DataBase.BG.Event.PointData> list = new List<DataBase.BG.Event.PointData>();
+					for (int i = num; i < basicCsv.max_cell_x; i++)
+					{
+						int no = i - num + 1;
+						string cellAsString = basicCsv.GetCellAsString(i, lineY);
+						if (!string.IsNullOrEmpty(cellAsString))
+						{
+							List<string> list2 = new List<string>();
+							foreach (string text in cellAsString.Split(new char[]
+							{
+								'/'
+							}))
+							{
+								list2.Add(text.Trim());
+							}
+							list.Add(new DataBase.BG.Event.PointData(no, list2));
+						}
+					}
+					this.eventPointList = list.ToArray();
+				}
+
+				public DataBase.BG parentBg { get; private set; }
+
+				public GameObject InstantiateHitPrefab(GameObject parent)
+				{
+					GameObject result;
+					try
+					{
+						result = Utility.CreatePrefab(parent, this.hitPrefabPath, true);
+					}
+					catch (Exception exception)
+					{
+						Debug.LogException(exception);
+						result = null;
+					}
+					return result;
+				}
+
+				public DataBase.BG.Event.PointData GetEventData(int pointNo)
+				{
+					if (this.eventPointList != null)
+					{
+						foreach (DataBase.BG.Event.PointData pointData in this.eventPointList)
+						{
+							if (pointData != null && pointData.no == pointNo)
+							{
+								return pointData;
+							}
+						}
+					}
+					return null;
+				}
+
+				public bool ContainsEvent(int pointNo)
+				{
+					return this.GetEventData(pointNo) != null;
+				}
+
+				public bool LoadScript(Maid maid, int pointNo)
+				{
+					DataBase.BG.Event.PointData eventData = this.GetEventData(pointNo);
+					if (eventData != null && GameMain.Instance != null && GameMain.Instance.ScriptMgr != null)
+					{
+						int hashCode = eventData.GetHashCode();
+						if (!this.scenarioIndexDictionary.ContainsKey(hashCode))
+						{
+							this.scenarioIndexDictionary.Add(hashCode, 0);
+						}
+						ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
+						string str = this.eventScriptFile;
+						if (maid != null)
+						{
+							str = ScriptManager.ReplacePersonal(maid, this.eventScriptFile);
+						}
+						int num = this.scenarioIndexDictionary[hashCode];
+						if (eventData.labelList.Count <= num)
+						{
+							num = 0;
+						}
+						if (maid != null && this.lastMaidGuid != maid.status.guid)
+						{
+							num = 0;
+							this.lastMaidGuid = maid.status.guid;
+						}
+						GameMain.Instance.ScriptMgr.EvalScript("global.__private_maid_mode_adv_file = '" + str + "';");
+						GameMain.Instance.ScriptMgr.EvalScript("global.__private_maid_mode_adv_label = '" + eventData.labelList[num++] + "';");
+						this.scenarioIndexDictionary[hashCode] = num;
+						scriptMgr.LoadAdvScenarioScript("private_maid_mode_adv_call.ks", "*ADVスタート");
+						scriptMgr.adv_kag.Exec();
+						return true;
+					}
+					return false;
+				}
+
+				public void ShuffleEventPlayOrder()
+				{
+				}
+
+				public void SetParentBg(DataBase.BG parentBg)
+				{
+					this.parentBg = parentBg;
+				}
+
+				public readonly bool isNoon;
+
+				public readonly string hitPrefabPath;
+
+				public readonly string eventScriptFile;
+
+				public readonly DataBase.BG.Event.PointData[] eventPointList;
+
+				private Dictionary<int, int> scenarioIndexDictionary = new Dictionary<int, int>();
+
+				private string lastMaidGuid = string.Empty;
+
+				public class PointData
+				{
+					public PointData(int no, List<string> labelList)
+					{
+						this.no = no;
+						this.labelList = labelList;
+					}
+
+					public List<string> labelList { get; private set; }
+
+					public void ShuffleLabel()
+					{
+						string[] array = this.labelList.ToArray();
+						System.Random random = new System.Random();
+						int i = array.Length;
+						while (i > 1)
+						{
+							i--;
+							int num = random.Next(i + 1);
+							string text = array[num];
+							array[num] = array[i];
+							array[i] = text;
+						}
+						this.labelList = new List<string>(array);
+					}
+
+					public readonly int no;
+				}
+			}
+		}
+
+		public class Data
+		{
+			public Data(int uniqueId, CsvParser basicCsv, Dictionary<string, DataBase.BG> bgDataList)
+			{
+				for (int i = 1; i < basicCsv.max_cell_y; i++)
+				{
+					if (basicCsv.IsCellToExistData(0, i) && basicCsv.GetCellAsInteger(0, i) == uniqueId)
+					{
+						int num = 1;
+						this.id = uniqueId;
+						string cellAsString = basicCsv.GetCellAsString(num++, i);
+						this.bgData = bgDataList[cellAsString];
+						string cellAsString2 = basicCsv.GetCellAsString(num++, i);
+						this.locationData = this.bgData.GetLocation(cellAsString2);
+						break;
+					}
+				}
+			}
+
+			public readonly int id;
+
+			public readonly DataBase.BG bgData;
+
+			public readonly DataBase.BG.Location locationData;
+		}
+	}
+}

+ 532 - 0
Assembly-CSharp/PrivateMaidMode/PrivateCharaSelectMain.cs

@@ -0,0 +1,532 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using UnityEngine;
+using UnityEngine.UI;
+using wf;
+
+namespace PrivateMaidMode
+{
+	public class PrivateCharaSelectMain : WfScreenChildren
+	{
+		public override void Awake()
+		{
+			base.Awake();
+			this.charaContent = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport/Content", false);
+			this.charaSelectMgr = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport", false).GetComponent<uGUICharacterSelectManager>();
+		}
+
+		protected override void OnCall()
+		{
+			GameMain.Instance.MainLight.Reset();
+			GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
+			GameMain.Instance.SoundMgr.VoiceStopAll();
+			this.m_selectMaid = null;
+			this.m_selectBG = null;
+			this.m_selectLocation = null;
+			this.charaMgr = GameMain.Instance.CharacterMgr;
+			this.isDaily = this.charaMgr.status.isDaytime;
+			this.charaSelectMgr.SetCallBackOnSelect(new uGUICharacterSelectManager.CallBackOnSelect(this.SelectCharacter));
+			uGUICharacterSelectManager uGUICharacterSelectManager = this.charaSelectMgr;
+			if (PrivateCharaSelectMain.<>f__mg$cache0 == null)
+			{
+				PrivateCharaSelectMain.<>f__mg$cache0 = new uGUICharacterSelectManager.CallBackMaidList(uGUICharacterSelectManager.PrivateMaidList);
+			}
+			uGUICharacterSelectManager.SetCallBackMaidList(PrivateCharaSelectMain.<>f__mg$cache0);
+			this.charaSelectMgr.Create(uGUICharacterSelectManager.Type.Private);
+			this.buttonList = this.charaSelectMgr.GetButtonList();
+			this.maidList = this.charaSelectMgr.GetMaidList();
+			this.buttonList[0].onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectNoSelect)));
+			if (this.maidList.Count > 0)
+			{
+				this.CreateRandomButton(this.buttonList[1], PrivateCharaSelectMain.SelectType.Maid);
+				for (int i = 2; i < this.buttonList.Count; i++)
+				{
+					this.buttonList[i].onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnClickSelectChara)));
+				}
+				if (PrivateModeMgr.Instance.isRandomMaid)
+				{
+					this.charaContent.GetComponent<uGUITabPanel>().Select(this.buttonList[1]);
+				}
+			}
+			this.CreateBGPanel();
+			this.CreateBGPosPanel();
+			GameMain.Instance.CharacterMgr.DeactivateCharaAll();
+			GameMain.Instance.CharacterMgr.DeactivateMaid(0);
+			if (PrivateModeMgr.Instance.LoadPrivateMaid(this.isDaily))
+			{
+				this.m_selectMaid = PrivateModeMgr.Instance.PrivateMaid;
+				this.m_selectBG = PrivateModeMgr.Instance.SelectBG;
+				this.m_selectLocation = PrivateModeMgr.Instance.SelectLocation;
+				this.SetSelectAll();
+			}
+			else
+			{
+				uGUITabPanel component = this.charaContent.GetComponent<uGUITabPanel>();
+				component.Select(this.buttonList[0]);
+			}
+			uGUITutorialPanel.OpenTutorial("ScenePrivate", null, false);
+		}
+
+		public void SetPrivateSettingManager(PrivateSettingManager mgr)
+		{
+			this.privateManager = mgr;
+		}
+
+		private void CreateBGPanel()
+		{
+			GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
+			this.ResetChildren(parentPanel.transform);
+			this.bgList = new List<DataBase.BG>();
+			using (List<DataBase.Data>.Enumerator enumerator = DataBase.GetAllDatas(true).GetEnumerator())
+			{
+				while (enumerator.MoveNext())
+				{
+					DataBase.Data data = enumerator.Current;
+					if (!this.bgList.Exists((DataBase.BG bgElm) => bgElm.uniqueName == data.bgData.uniqueName))
+					{
+						this.bgList.Add(data.bgData);
+					}
+				}
+			}
+			this.enabledBGList = new List<DataBase.BG>();
+			for (int i = 0; i < this.bgList.Count; i++)
+			{
+				GameObject f_goParent = Utility.CreatePrefab(parentPanel, "ScenePrivate/SelectButton", true);
+				uGUITabButton component = UTY.GetChildObject(f_goParent, "Plate", false).GetComponent<uGUITabButton>();
+				component.onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectBG)));
+				if (!this.bgList[i].enabled)
+				{
+					component.interactable = false;
+				}
+				else
+				{
+					this.enabledBGList.Add(this.bgList[i]);
+				}
+				Text component2 = UTY.GetChildObject(f_goParent, "Text", false).GetComponent<Text>();
+				component2.text = this.bgList[i].drawName;
+			}
+			GameObject f_goParent2 = Utility.CreatePrefab(parentPanel, "ScenePrivate/RandomButton", true);
+			uGUITabButton component3 = UTY.GetChildObject(f_goParent2, "Plate", false).GetComponent<uGUITabButton>();
+			this.CreateRandomButton(component3, PrivateCharaSelectMain.SelectType.BG);
+			parentPanel.GetComponent<uGUITabPanel>().UpdateChildren();
+			if (PrivateModeMgr.Instance.isRandomBG)
+			{
+				parentPanel.GetComponent<uGUITabPanel>().Select(component3);
+			}
+			else
+			{
+				DataBase.BG bgdata = DataBase.GetBGData("執務室");
+				int index = this.bgList.IndexOf(bgdata);
+				uGUITabButton component4 = UTY.GetChildObject(parentPanel.transform.GetChild(index).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+				parentPanel.GetComponent<uGUITabPanel>().Select(component4);
+			}
+		}
+
+		private void CreateBGPosPanel()
+		{
+			GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
+			this.ResetChildren(parentPanel.transform);
+			for (int i = 0; i < this.m_selectBG.locations.Length; i++)
+			{
+				GameObject f_goParent = Utility.CreatePrefab(parentPanel, "ScenePrivate/SelectButton", true);
+				uGUITabButton component = UTY.GetChildObject(f_goParent, "Plate", false).GetComponent<uGUITabButton>();
+				component.onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectBGPos)));
+				Text component2 = UTY.GetChildObject(f_goParent, "Text", false).GetComponent<Text>();
+				component2.text = this.m_selectBG.locations[i].drawName;
+			}
+			GameObject f_goParent2 = Utility.CreatePrefab(parentPanel, "ScenePrivate/RandomButton", true);
+			uGUITabButton component3 = UTY.GetChildObject(f_goParent2, "Plate", false).GetComponent<uGUITabButton>();
+			this.CreateRandomButton(component3, PrivateCharaSelectMain.SelectType.BGPos);
+			parentPanel.GetComponent<uGUITabPanel>().UpdateChildren();
+			bool flag = false;
+			if (PrivateModeMgr.Instance.isRandomBG)
+			{
+				parentPanel.GetComponent<uGUITabPanel>().Select(component3);
+				this.SetCanSelectButton(parentPanel.GetComponent<uGUITabPanel>(), false);
+				flag = true;
+			}
+			else if (PrivateModeMgr.Instance.isRandomLocation)
+			{
+				parentPanel.GetComponent<uGUITabPanel>().Select(component3);
+				flag = true;
+			}
+			else if (this.m_selectLocation != null)
+			{
+				foreach (DataBase.BG.Location location in this.m_selectBG.locations)
+				{
+					if (location == this.m_selectLocation)
+					{
+						this.SetSelect(PrivateCharaSelectMain.SelectType.BGPos);
+						flag = true;
+						break;
+					}
+				}
+			}
+			if (!flag)
+			{
+				uGUITabButton component4 = UTY.GetChildObject(parentPanel.transform.GetChild(0).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+				parentPanel.GetComponent<uGUITabPanel>().Select(component4);
+			}
+		}
+
+		private void CreateRandomButton(uGUITabButton button, PrivateCharaSelectMain.SelectType type)
+		{
+			EventDelegate eventDelegate = new EventDelegate(this, "OnSelectRandom");
+			if (type != PrivateCharaSelectMain.SelectType.BG)
+			{
+				if (type != PrivateCharaSelectMain.SelectType.BGPos)
+				{
+					if (type == PrivateCharaSelectMain.SelectType.Maid)
+					{
+						eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.Maid;
+					}
+				}
+				else
+				{
+					eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.BGPos;
+				}
+			}
+			else
+			{
+				eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.BG;
+			}
+			button.onSelectEvent.Add(eventDelegate);
+		}
+
+		private void ResetChildren(Transform parentTrans)
+		{
+			for (int i = 0; i < parentTrans.childCount; i++)
+			{
+				UnityEngine.Object.Destroy(parentTrans.GetChild(i).gameObject);
+			}
+			parentTrans.DetachChildren();
+		}
+
+		private void ResetSetting()
+		{
+			GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
+			DataBase.BG bgdata = DataBase.GetBGData("執務室");
+			int index = this.bgList.IndexOf(bgdata);
+			uGUITabButton component = UTY.GetChildObject(parentPanel.transform.GetChild(index).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+			parentPanel.GetComponent<uGUITabPanel>().Select(component);
+			parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
+			uGUITabButton component2 = UTY.GetChildObject(parentPanel.transform.GetChild(0).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+			parentPanel.GetComponent<uGUITabPanel>().Select(component2);
+			this.ResetCamera();
+		}
+
+		private void OnSelectNoSelect()
+		{
+			this.charaMgr.DeactivateMaidAll();
+			this.m_selectMaid = null;
+			PrivateModeMgr.Instance.isRandomMaid = false;
+			this.bgPanel.SetActive(false);
+			this.bgPositionPanel.SetActive(false);
+			this.ResetSetting();
+		}
+
+		private void OnClickSelectChara()
+		{
+			PrivateModeMgr.Instance.isRandomMaid = false;
+		}
+
+		private void SelectCharacter(Maid select_maid)
+		{
+			this.bgPanel.SetActive(true);
+			this.bgPositionPanel.SetActive(true);
+			if (select_maid != null && this.m_selectMaid != select_maid)
+			{
+				GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+				this.m_selectMaid = select_maid;
+				this.charaMgr.SetActiveMaid(this.m_selectMaid, 0);
+				this.m_selectMaid.Visible = true;
+				base.StartCoroutine(this.WaitCharaLoad());
+			}
+		}
+
+		private IEnumerator WaitCharaLoad()
+		{
+			while (this.charaMgr.IsBusy())
+			{
+				yield return null;
+			}
+			yield return null;
+			yield return null;
+			GameMain.Instance.ScriptMgr.is_motion_blend = false;
+			this.m_selectLocation.LoadScript();
+			GameMain.Instance.ScriptMgr.is_motion_blend = true;
+			GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
+			yield break;
+		}
+
+		private void OnSelectBG()
+		{
+			uGUITabButton selectButton = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG).GetComponent<uGUITabPanel>().GetSelectButton();
+			DataBase.BG bg = this.bgList[selectButton.transform.parent.GetSiblingIndex()];
+			if (bg != null && this.m_selectBG != bg)
+			{
+				this.SelectBG(bg);
+			}
+			PrivateModeMgr.Instance.isRandomBG = false;
+			GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
+			this.SetCanSelectButton(parentPanel.GetComponent<uGUITabPanel>(), true);
+		}
+
+		private void SelectBG(DataBase.BG bg)
+		{
+			if (bg == null)
+			{
+				return;
+			}
+			GameMain.Instance.MainCamera.FadeOut(0.5f, false, null, true, default(Color));
+			this.m_selectBG = bg;
+			this.m_selectBG.Apply(this.isDaily);
+			this.CreateBGPosPanel();
+			GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
+		}
+
+		private void OnSelectBGPos()
+		{
+			uGUITabButton selectButton = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>().GetSelectButton();
+			DataBase.BG.Location location = this.m_selectBG.locations[selectButton.transform.parent.GetSiblingIndex()];
+			if (location != null)
+			{
+				this.SelectBGPos(location);
+			}
+			PrivateModeMgr.Instance.isRandomLocation = false;
+		}
+
+		private void SelectBGPos(DataBase.BG.Location select_location)
+		{
+			GameMain.Instance.MainCamera.FadeOut(0.5f, false, null, true, default(Color));
+			this.m_selectLocation = select_location;
+			if (this.m_selectMaid != null)
+			{
+				GameMain.Instance.ScriptMgr.is_motion_blend = false;
+				this.m_selectLocation.LoadScript();
+				GameMain.Instance.ScriptMgr.is_motion_blend = true;
+			}
+			GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
+		}
+
+		private void SetSelectAll()
+		{
+			this.SetSelect(PrivateCharaSelectMain.SelectType.Maid);
+			this.SetSelect(PrivateCharaSelectMain.SelectType.BG);
+			this.SetSelect(PrivateCharaSelectMain.SelectType.BGPos);
+		}
+
+		private void SetSelect(PrivateCharaSelectMain.SelectType type)
+		{
+			if (type != PrivateCharaSelectMain.SelectType.Maid)
+			{
+				if (type != PrivateCharaSelectMain.SelectType.BG)
+				{
+					if (type == PrivateCharaSelectMain.SelectType.BGPos)
+					{
+						if (this.m_selectLocation == null)
+						{
+							return;
+						}
+						if (PrivateModeMgr.Instance.isRandomLocation)
+						{
+							return;
+						}
+						GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
+						this.Select(type, parentPanel);
+					}
+				}
+				else
+				{
+					if (this.m_selectBG == null)
+					{
+						return;
+					}
+					if (PrivateModeMgr.Instance.isRandomBG)
+					{
+						this.CreateBGPosPanel();
+						return;
+					}
+					GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
+					this.Select(type, parentPanel);
+					this.CreateBGPosPanel();
+				}
+			}
+			else
+			{
+				if (PrivateModeMgr.Instance.isRandomMaid)
+				{
+					return;
+				}
+				this.charaSelectMgr.SelectMaid(this.m_selectMaid);
+			}
+		}
+
+		private void Select(PrivateCharaSelectMain.SelectType type, GameObject parentObj)
+		{
+			string a = null;
+			if (type != PrivateCharaSelectMain.SelectType.BG)
+			{
+				if (type == PrivateCharaSelectMain.SelectType.BGPos)
+				{
+					a = this.m_selectLocation.drawName;
+				}
+			}
+			else
+			{
+				a = this.m_selectBG.drawName;
+			}
+			uGUITabPanel component = parentObj.GetComponent<uGUITabPanel>();
+			Transform transform = parentObj.transform;
+			for (int i = 0; i < transform.childCount; i++)
+			{
+				string text = UTY.GetChildObject(transform.GetChild(i).gameObject, "Text", false).GetComponent<Text>().text;
+				if (a == text)
+				{
+					uGUITabButton component2 = UTY.GetChildObject(transform.GetChild(i).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+					component.Select(component2);
+					return;
+				}
+			}
+		}
+
+		private void OnSelectRandom(PrivateCharaSelectMain.SelectType type)
+		{
+			if (type == PrivateCharaSelectMain.SelectType.Maid && this.maidList != null)
+			{
+				int index = UnityEngine.Random.Range(0, this.maidList.Count);
+				this.SelectCharacter(this.maidList[index]);
+				PrivateModeMgr.Instance.isRandomMaid = true;
+				this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.Maid).GetComponent<uGUITabPanel>().GetSelectButton(), true);
+			}
+			if (type == PrivateCharaSelectMain.SelectType.BG && this.enabledBGList != null)
+			{
+				int index2 = UnityEngine.Random.Range(0, this.enabledBGList.Count);
+				this.SelectBG(this.enabledBGList[index2]);
+				PrivateModeMgr.Instance.isRandomBG = true;
+				PrivateModeMgr.Instance.isRandomLocation = true;
+				this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG).GetComponent<uGUITabPanel>().GetSelectButton(), true);
+				GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
+				uGUITabButton component = UTY.GetChildObject(parentPanel.transform.GetChild(parentPanel.transform.childCount - 1).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+				parentPanel.GetComponent<uGUITabPanel>().Select(component);
+			}
+			if (type == PrivateCharaSelectMain.SelectType.BGPos && this.m_selectBG != null)
+			{
+				int num = UnityEngine.Random.Range(0, this.m_selectBG.locations.Length);
+				this.SelectBGPos(this.m_selectBG.locations[num]);
+				PrivateModeMgr.Instance.isRandomLocation = true;
+				if (PrivateModeMgr.Instance.isRandomBG)
+				{
+					this.SetCanSelectButton(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>(), false);
+				}
+				this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>().GetSelectButton(), true);
+			}
+		}
+
+		private void ResetCamera()
+		{
+			GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
+			GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
+			GameMain.Instance.MainCamera.SetDistance(1.6f, true);
+			GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
+			GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
+		}
+
+		private GameObject GetParentPanel(PrivateCharaSelectMain.SelectType type)
+		{
+			if (type == PrivateCharaSelectMain.SelectType.Maid)
+			{
+				if (this.charaContent != null)
+				{
+					this.charaContent = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport/Content", false);
+				}
+				return this.charaContent;
+			}
+			if (type == PrivateCharaSelectMain.SelectType.BG)
+			{
+				return UTY.GetChildObject(this.bgPanel, "uGUI Scroll View/Viewport/Content", false);
+			}
+			if (type != PrivateCharaSelectMain.SelectType.BGPos)
+			{
+				return null;
+			}
+			return UTY.GetChildObject(this.bgPositionPanel, "uGUI Scroll View/Viewport/Content", false);
+		}
+
+		private void SetButtonTouch(uGUITabButton button, bool isActive)
+		{
+			button.GetComponent<uGUISelectableAnimation>().enabled = isActive;
+			button.maskObj.SetActive(!isActive);
+		}
+
+		private void SetCanSelectButton(uGUITabPanel parent, bool select)
+		{
+			for (int i = 0; i < parent.transform.childCount; i++)
+			{
+				uGUITabButton component = UTY.GetChildObject(parent.transform.GetChild(i).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+				if (component.maskObj != null)
+				{
+					component.maskObj.SetActive(!select);
+				}
+			}
+		}
+
+		public void OnClickOKButton()
+		{
+			PrivateModeMgr.Instance.SetPrivateMaid(this.m_selectMaid);
+			PrivateModeMgr.Instance.SetPrivateBG(this.m_selectBG);
+			PrivateModeMgr.Instance.SetPrivateLocation(this.m_selectLocation);
+			this.Finish();
+		}
+
+		protected override void OnFinish()
+		{
+			if (this.privateManager.MoveScreen.IsExistNextFile())
+			{
+				this.privateManager.CallScreen("Move");
+			}
+		}
+
+		private Maid m_selectMaid;
+
+		private DataBase.BG m_selectBG;
+
+		private DataBase.BG.Location m_selectLocation;
+
+		private PrivateSettingManager privateManager;
+
+		private CharacterMgr charaMgr;
+
+		private uGUICharacterSelectManager charaSelectMgr;
+
+		private List<uGUITabButton> buttonList;
+
+		private List<Maid> maidList;
+
+		private List<DataBase.BG> bgList;
+
+		private List<DataBase.BG> enabledBGList;
+
+		private bool isDaily;
+
+		private GameObject charaContent;
+
+		[SerializeField]
+		private GameObject bgPanel;
+
+		[SerializeField]
+		private GameObject bgPositionPanel;
+
+		[CompilerGenerated]
+		private static uGUICharacterSelectManager.CallBackMaidList <>f__mg$cache0;
+
+		public enum SelectType
+		{
+			Maid,
+			BG,
+			BGPos
+		}
+	}
+}

+ 92 - 0
Assembly-CSharp/PrivateMaidMode/PrivateMaid.cs

@@ -0,0 +1,92 @@
+using System;
+using System.IO;
+
+namespace PrivateMaidMode
+{
+	public class PrivateMaid
+	{
+		public Maid Maid
+		{
+			get
+			{
+				return this.m_privateMaid;
+			}
+		}
+
+		public DataBase.BG BG
+		{
+			get
+			{
+				return this.m_privateBG;
+			}
+		}
+
+		public DataBase.BG.Location Location
+		{
+			get
+			{
+				return this.m_privateLocation;
+			}
+		}
+
+		public void SetPrivateMaid(Maid maid)
+		{
+			this.m_privateMaid = maid;
+			if (maid != null)
+			{
+				this.m_maidGUID = maid.status.guid;
+			}
+			else
+			{
+				this.m_maidGUID = string.Empty;
+			}
+		}
+
+		public void SetPrivateBG(DataBase.BG bg)
+		{
+			this.m_privateBG = bg;
+			this.m_uniqueNameBG = bg.uniqueName;
+		}
+
+		public void SetPrivateLocation(DataBase.BG.Location location)
+		{
+			this.m_privateLocation = location;
+			if (location != null)
+			{
+				this.m_locationName = location.drawName;
+			}
+		}
+
+		public void Serialize(BinaryWriter bw)
+		{
+			bw.Write(this.m_maidGUID);
+			bw.Write(this.m_uniqueNameBG);
+			bw.Write(this.m_locationName);
+		}
+
+		public void Deserialize(BinaryReader br)
+		{
+			this.m_maidGUID = br.ReadString();
+			this.m_privateMaid = GameMain.Instance.CharacterMgr.GetStockMaid(this.m_maidGUID);
+			this.m_uniqueNameBG = br.ReadString();
+			this.m_privateBG = DataBase.GetBGData(this.m_uniqueNameBG);
+			this.m_locationName = br.ReadString();
+			if (this.m_locationName != null && this.m_locationName != string.Empty)
+			{
+				this.m_privateLocation = this.m_privateBG.GetLocation(this.m_locationName);
+			}
+		}
+
+		private string m_maidGUID = string.Empty;
+
+		private Maid m_privateMaid;
+
+		private string m_uniqueNameBG = string.Empty;
+
+		private DataBase.BG m_privateBG;
+
+		private string m_locationName = string.Empty;
+
+		private DataBase.BG.Location m_privateLocation;
+	}
+}

+ 190 - 0
Assembly-CSharp/PrivateMaidMode/PrivateModeMgr.cs

@@ -0,0 +1,190 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+
+namespace PrivateMaidMode
+{
+	public class PrivateModeMgr
+	{
+		public static PrivateModeMgr Instance
+		{
+			get
+			{
+				return PrivateModeMgr.m_Instance;
+			}
+		}
+
+		public Maid PrivateMaid
+		{
+			get
+			{
+				return (this.m_privateMaid == null) ? null : this.m_privateMaid.Maid;
+			}
+		}
+
+		public DataBase.BG SelectBG
+		{
+			get
+			{
+				return (this.m_privateMaid == null) ? null : this.m_privateMaid.BG;
+			}
+		}
+
+		public DataBase.BG.Location SelectLocation
+		{
+			get
+			{
+				return (this.m_privateMaid == null) ? null : this.m_privateMaid.Location;
+			}
+		}
+
+		private void CreateListData()
+		{
+			uGUICharacterSelectManager.PrivateMaidList(this.maidList);
+			List<DataBase.BG> list = new List<DataBase.BG>();
+			using (List<DataBase.Data>.Enumerator enumerator = DataBase.GetAllDatas(true).GetEnumerator())
+			{
+				while (enumerator.MoveNext())
+				{
+					DataBase.Data data = enumerator.Current;
+					if (!list.Exists((DataBase.BG bgElm) => bgElm.uniqueName == data.bgData.uniqueName))
+					{
+						list.Add(data.bgData);
+					}
+				}
+			}
+			this.enabledBGList = new List<DataBase.BG>();
+			foreach (DataBase.BG bg in list)
+			{
+				if (bg.enabled)
+				{
+					this.enabledBGList.Add(bg);
+				}
+			}
+		}
+
+		public bool LoadPrivateMaid(bool isNoon)
+		{
+			this.CreateListData();
+			if (this.SelectBG == null)
+			{
+				return false;
+			}
+			if (isNoon)
+			{
+				this.ChangeRandom();
+			}
+			if (!this.maidList.Contains(this.PrivateMaid))
+			{
+				this.SetPrivateMaid(null);
+			}
+			if (!this.enabledBGList.Contains(this.SelectBG))
+			{
+				this.SetPrivateBG(this.enabledBGList[0]);
+				this.SetPrivateLocation(this.enabledBGList[0].locations[0]);
+			}
+			if (this.PrivateMaid != null)
+			{
+				GameMain.Instance.CharacterMgr.SetActiveMaid(this.PrivateMaid, 0);
+				this.PrivateMaid.Visible = true;
+				this.PrivateMaid.AllProcProp();
+				this.SelectBG.Apply(isNoon);
+				this.LoadLocation();
+				return true;
+			}
+			return false;
+		}
+
+		public void ChangeRandom()
+		{
+			if (this.isRandomMaid)
+			{
+				if (this.maidList != null)
+				{
+					int index = UnityEngine.Random.Range(0, this.maidList.Count);
+					this.SetPrivateMaid(this.maidList[index]);
+				}
+				else
+				{
+					this.SetPrivateMaid(null);
+				}
+			}
+			if (this.isRandomBG)
+			{
+				int index2 = UnityEngine.Random.Range(0, this.enabledBGList.Count);
+				this.SetPrivateBG(this.enabledBGList[index2]);
+			}
+			if (this.isRandomLocation && this.SelectBG.locations != null)
+			{
+				int num = UnityEngine.Random.Range(0, this.SelectBG.locations.Length);
+				this.SetPrivateLocation(this.SelectBG.locations[num]);
+			}
+		}
+
+		public void LoadLocation()
+		{
+			if (this.SelectLocation != null)
+			{
+				string currentFileName = GameMain.Instance.ScriptMgr.adv_kag.kag.GetCurrentFileName();
+				GameMain.Instance.ScriptMgr.is_motion_blend = false;
+				this.SelectLocation.LoadScript();
+				GameMain.Instance.ScriptMgr.is_motion_blend = true;
+			}
+		}
+
+		public void SetPrivateMaid(Maid maid)
+		{
+			this.m_privateMaid.SetPrivateMaid(maid);
+		}
+
+		public void SetPrivateBG(DataBase.BG bg)
+		{
+			this.m_privateMaid.SetPrivateBG(bg);
+		}
+
+		public void SetPrivateLocation(DataBase.BG.Location location)
+		{
+			this.m_privateMaid.SetPrivateLocation(location);
+		}
+
+		public void Serialize(BinaryWriter bw)
+		{
+			bw.Write("COM3D2_PRIVATE");
+			bw.Write(0);
+			this.m_privateMaid.Serialize(bw);
+			bw.Write(this.isRandomMaid);
+			bw.Write(this.isRandomBG);
+			bw.Write(this.isRandomLocation);
+		}
+
+		public void Deserialize(BinaryReader br, int save_version)
+		{
+			string a = br.ReadString();
+			NDebug.Assert(a == "COM3D2_PRIVATE", "セーブデータ\nプライベートメイドモード設定のヘッダーが正しくありません");
+			int num = br.ReadInt32();
+			this.m_privateMaid.Deserialize(br);
+			this.isRandomMaid = br.ReadBoolean();
+			this.isRandomBG = br.ReadBoolean();
+			this.isRandomLocation = br.ReadBoolean();
+		}
+
+		private static PrivateModeMgr m_Instance = new PrivateModeMgr();
+
+		private const string m_SaveHeader = "COM3D2_PRIVATE";
+
+		private const int SaveDataVersion = 0;
+
+		private PrivateMaid m_privateMaid = new PrivateMaid();
+
+		public bool isRandomMaid;
+
+		public bool isRandomBG;
+
+		public bool isRandomLocation;
+
+		private List<Maid> maidList = new List<Maid>();
+
+		private List<DataBase.BG> enabledBGList = new List<DataBase.BG>();
+	}
+}

+ 55 - 0
Assembly-CSharp/PrivateMaidMode/PrivateSettingManager.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+
+namespace PrivateMaidMode
+{
+	public class PrivateSettingManager : WfScreenManager
+	{
+		public void Awake()
+		{
+			this.m_advKag = GameMain.Instance.ScriptMgr.adv_kag;
+		}
+
+		public override void Start()
+		{
+			base.Start();
+			this.m_moveScreen = base.children_dic["Move"].GetComponent<PrivateCharaSelectMove>();
+			if (this.m_advKag.tag_backup != null && this.m_advKag.tag_backup.Count > 0 && this.m_advKag.tag_backup["name"] == "ScenePrivate")
+			{
+				NDebug.Assert(this.m_advKag.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
+				this.m_moveScreen.SetNextLabel(this.m_advKag.tag_backup["label"]);
+				this.m_moveScreen.SetBackupFile(this.m_advKag.kag.GetCurrentFileName());
+			}
+			PrivateCharaSelectMain component = base.children_dic["Main"].GetComponent<PrivateCharaSelectMain>();
+			component.SetPrivateSettingManager(this);
+			this.CallScreen("Main");
+		}
+
+		protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
+		{
+			string[] array = new string[]
+			{
+				"Main",
+				"Move"
+			};
+			for (int i = 0; i < array.Length; i++)
+			{
+				WfScreenChildren component = UTY.GetChildObject(base.gameObject, array[i], false).GetComponent<WfScreenChildren>();
+				component.parent_mgr = this;
+				children_dic.Add(array[i], component);
+			}
+		}
+
+		public PrivateCharaSelectMove MoveScreen
+		{
+			get
+			{
+				return this.m_moveScreen;
+			}
+		}
+
+		private PrivateCharaSelectMove m_moveScreen;
+
+		private ADVKagManager m_advKag;
+	}
+}

+ 225 - 0
Assembly-CSharp/PrivateMaidMode/TouchDataBase.cs

@@ -0,0 +1,225 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+using wf;
+
+namespace PrivateMaidMode
+{
+	public static class TouchDataBase
+	{
+		public static int Count
+		{
+			get
+			{
+				TouchDataBase.CreateData();
+				return TouchDataBase.commonIdManager.idMap.Count;
+			}
+		}
+
+		public static bool Contains(int id)
+		{
+			TouchDataBase.CreateData();
+			return TouchDataBase.commonIdManager.idMap.ContainsKey(id);
+		}
+
+		public static TouchDataBase.Data GetData(int id)
+		{
+			TouchDataBase.CreateData();
+			NDebug.Assert(TouchDataBase.basicDatas.ContainsKey(id), "プライベートメイドお触りモード\nID[" + id + "]のデータは存在しません");
+			return TouchDataBase.basicDatas[id];
+		}
+
+		public static bool IsEnabled(int id)
+		{
+			TouchDataBase.CreateData();
+			return TouchDataBase.commonIdManager.enabledIdList.Contains(id);
+		}
+
+		public static List<TouchDataBase.Data> GetAllDatas(bool onlyEnabled)
+		{
+			TouchDataBase.CreateData();
+			List<TouchDataBase.Data> list = new List<TouchDataBase.Data>();
+			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in TouchDataBase.commonIdManager.idMap)
+			{
+				if (!onlyEnabled || TouchDataBase.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+				{
+					list.Add(TouchDataBase.basicDatas[keyValuePair.Key]);
+				}
+			}
+			return list;
+		}
+
+		public static void CreateData()
+		{
+			if (TouchDataBase.commonIdManager != null)
+			{
+				return;
+			}
+			TouchDataBase.commonIdManager = new CsvCommonIdManager("private_maidmode_touch", "プライベートメイドお触りモード", CsvCommonIdManager.Type.IdOnly, null);
+			TouchDataBase.basicDatas = new Dictionary<int, TouchDataBase.Data>();
+			string[] array = new string[]
+			{
+				"list"
+			};
+			KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
+			for (int i = 0; i < array2.Length; i++)
+			{
+				string text = "private_maidmode_touch_" + array[i] + ".nei";
+				AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
+				CsvParser csvParser = new CsvParser();
+				bool condition = csvParser.Open(afileBase);
+				NDebug.Assert(condition, text + "\nopen failed.");
+				array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
+			}
+			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in TouchDataBase.commonIdManager.idMap)
+			{
+				TouchDataBase.basicDatas.Add(keyValuePair.Key, new TouchDataBase.Data(keyValuePair.Key, array2[0].Value));
+			}
+			foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
+			{
+				keyValuePair2.Value.Dispose();
+				keyValuePair2.Key.Dispose();
+			}
+		}
+
+		private const string csvTopCommonName = "private_maidmode_touch";
+
+		private const string typeNameForErrorLog = "プライベートメイドお触りモード";
+
+		private static CsvCommonIdManager commonIdManager;
+
+		private static Dictionary<int, TouchDataBase.Data> basicDatas;
+
+		public enum TouchPoint
+		{
+			Head,
+			Bust,
+			Back,
+			Hip,
+			SecretPart,
+			Hand,
+			Leg
+		}
+
+		public class PointData
+		{
+			public PointData(TouchDataBase.TouchPoint point, int addExcitement, int addMood)
+			{
+				this.point = point;
+				this.addExcitement = addExcitement;
+				this.addMood = addMood;
+				switch (point)
+				{
+				case TouchDataBase.TouchPoint.Head:
+					this.scriptLabelName = "*頭";
+					break;
+				case TouchDataBase.TouchPoint.Bust:
+					this.scriptLabelName = "*胸";
+					break;
+				case TouchDataBase.TouchPoint.Back:
+					this.scriptLabelName = "*背中";
+					break;
+				case TouchDataBase.TouchPoint.Hip:
+					this.scriptLabelName = "*尻";
+					break;
+				case TouchDataBase.TouchPoint.SecretPart:
+					this.scriptLabelName = "*秘部";
+					break;
+				case TouchDataBase.TouchPoint.Hand:
+					this.scriptLabelName = "*手";
+					break;
+				case TouchDataBase.TouchPoint.Leg:
+					this.scriptLabelName = "*足";
+					break;
+				}
+				if (string.IsNullOrEmpty(this.scriptLabelName))
+				{
+					Debug.LogError("部位の情報が不正です");
+				}
+			}
+
+			public readonly TouchDataBase.TouchPoint point;
+
+			public readonly int addExcitement;
+
+			public readonly int addMood;
+
+			public readonly string scriptLabelName;
+		}
+
+		public class Data
+		{
+			public Data(int id, CsvParser basicCsv)
+			{
+				for (int i = 1; i < basicCsv.max_cell_y; i++)
+				{
+					if (basicCsv.IsCellToExistData(0, i) && basicCsv.GetCellAsInteger(0, i) == id)
+					{
+						int num = 1;
+						this.id = id;
+						this.phaseType = basicCsv.GetCellAsInteger(num++, i);
+						this.ftFile = Path.ChangeExtension(basicCsv.GetCellAsString(num++, i), ".ks");
+						this.rcRegisterFile = Path.ChangeExtension(basicCsv.GetCellAsString(num++, i), ".ks");
+						this.rcRegisterLabel = basicCsv.GetCellAsString(num++, i);
+						this.touchScriptFile = Path.ChangeExtension(basicCsv.GetCellAsString(num++, i), ".ks");
+						this.successFile = Path.ChangeExtension(basicCsv.GetCellAsString(num++, i), ".ks");
+						this.successLabel = basicCsv.GetCellAsString(num++, i);
+						this.failureFile = Path.ChangeExtension(basicCsv.GetCellAsString(num++, i), ".ks");
+						this.failureLabel = basicCsv.GetCellAsString(num++, i);
+						Dictionary<TouchDataBase.TouchPoint, TouchDataBase.PointData> dictionary = new Dictionary<TouchDataBase.TouchPoint, TouchDataBase.PointData>();
+						for (int j = 0; j < Enum.GetNames(typeof(TouchDataBase.TouchPoint)).Length; j++)
+						{
+							bool flag = basicCsv.GetCellAsString(num++, i) == "〇";
+							int cellAsInteger = basicCsv.GetCellAsInteger(num++, i);
+							int cellAsInteger2 = basicCsv.GetCellAsInteger(num++, i);
+							if (flag)
+							{
+								dictionary.Add((TouchDataBase.TouchPoint)j, new TouchDataBase.PointData((TouchDataBase.TouchPoint)j, cellAsInteger, cellAsInteger2));
+							}
+						}
+						this.touchPointData = new ReadOnlyDictionary<TouchDataBase.TouchPoint, TouchDataBase.PointData>(dictionary);
+						break;
+					}
+				}
+			}
+
+			public bool EnabledPoint(TouchDataBase.TouchPoint point)
+			{
+				return this.touchPointData.ContainsKey(point);
+			}
+
+			public TouchDataBase.PointData GetPointData(TouchDataBase.TouchPoint point)
+			{
+				return (!this.touchPointData.ContainsKey(point)) ? null : this.touchPointData[point];
+			}
+
+			public List<TouchDataBase.PointData> GetAllPointData()
+			{
+				return new List<TouchDataBase.PointData>(this.touchPointData.GetValueArray());
+			}
+
+			public readonly int id;
+
+			public readonly int phaseType;
+
+			public readonly string ftFile;
+
+			public readonly string rcRegisterFile;
+
+			public readonly string rcRegisterLabel;
+
+			public readonly string successFile;
+
+			public readonly string successLabel;
+
+			public readonly string failureFile;
+
+			public readonly string failureLabel;
+
+			public readonly string touchScriptFile;
+
+			private readonly ReadOnlyDictionary<TouchDataBase.TouchPoint, TouchDataBase.PointData> touchPointData;
+		}
+	}
+}

+ 122 - 0
Assembly-CSharp/PrivateMaidTouchKagManager.cs

@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+
+public class PrivateMaidTouchKagManager : BaseKagManager
+{
+	public PrivateMaidTouchKagManager(TJSScript tjs, ScriptManager scriptMgr) : base(tjs, scriptMgr)
+	{
+	}
+
+	public override void Initialize()
+	{
+		base.Initialize();
+		this.kag_.AddTagCallBack("talk", new KagScript.KagTagCallBack(this.TagTalk));
+		this.kag_.AddTagCallBack("rc_talk", new KagScript.KagTagCallBack(this.TagRcTalk));
+		this.kag_.AddTagCallBack("talkrepeat", new KagScript.KagTagCallBack(this.TagTalkRepeat));
+		this.kag_.AddTagCallBack("hitret", new KagScript.KagTagCallBack(this.TagHitRet));
+	}
+
+	public void LoadScript(Maid maid, string fileName, string labelName = "")
+	{
+		base.enabled = true;
+		if (maid != null)
+		{
+			fileName = ScriptManager.ReplacePersonal(maid, fileName);
+		}
+		this.LoadScriptFile(fileName, labelName);
+		this.Exec();
+	}
+
+	public bool TagTalk(KagTagSupport tag_data)
+	{
+		this.talkDataDictionary.Clear();
+		base.CheckAbsolutelyNecessaryTag(tag_data, "voice", new string[0]);
+		if (PrivateMaidTouchManager.instance == null)
+		{
+			return false;
+		}
+		this.talkDataDictionary.Add("tag", "talk");
+		this.talkDataDictionary.Add("voice", tag_data.GetTagProperty("voice").AsString() + ".ogg");
+		Maid voiceTargetMaid = BaseKagManager.GetVoiceTargetMaid(tag_data);
+		this.talkDataDictionary.Add("maidguid", (!(voiceTargetMaid != null)) ? string.Empty : voiceTargetMaid.status.guid);
+		return false;
+	}
+
+	private bool TagRcTalk(KagTagSupport tag_data)
+	{
+		this.talkDataDictionary.Clear();
+		base.CheckAbsolutelyNecessaryTag(tag_data, "voice", new string[0]);
+		if (PrivateMaidTouchManager.instance == null)
+		{
+			return false;
+		}
+		this.talkDataDictionary.Add("tag", "rc_talk");
+		this.talkDataDictionary.Add("voice", tag_data.GetTagProperty("voice").AsString() + ".ogg");
+		Maid voiceTargetMaid = BaseKagManager.GetVoiceTargetMaid(tag_data);
+		this.talkDataDictionary.Add("maidguid", (!(voiceTargetMaid != null)) ? string.Empty : voiceTargetMaid.status.guid);
+		return false;
+	}
+
+	private bool TagTalkRepeat(KagTagSupport tag_data)
+	{
+		this.talkDataDictionary.Clear();
+		base.CheckAbsolutelyNecessaryTag(tag_data, "voice", new string[0]);
+		if (PrivateMaidTouchManager.instance == null)
+		{
+			return false;
+		}
+		this.talkDataDictionary.Add("tag", "talkrepeat");
+		this.talkDataDictionary.Add("voice", tag_data.GetTagProperty("voice").AsString() + ".ogg");
+		Maid voiceTargetMaid = BaseKagManager.GetVoiceTargetMaid(tag_data);
+		this.talkDataDictionary.Add("maidguid", (!(voiceTargetMaid != null)) ? string.Empty : voiceTargetMaid.status.guid);
+		return false;
+	}
+
+	public bool TagHitRet(KagTagSupport tag_data)
+	{
+		string text = this.kag_.GetText();
+		this.kag_.TextClear();
+		string text2;
+		this.talkDataDictionary.TryGetValue("tag", out text2);
+		string maidGuid;
+		this.talkDataDictionary.TryGetValue("maidguid", out maidGuid);
+		string voiceFileName;
+		this.talkDataDictionary.TryGetValue("voice", out voiceFileName);
+		this.talkDataDictionary.Clear();
+		PrivateMaidTouchManager.VoiceData voiceData = new PrivateMaidTouchManager.VoiceData
+		{
+			maidGuid = maidGuid,
+			voiceFileName = voiceFileName,
+			text = text
+		};
+		if (text2 != null)
+		{
+			if (!(text2 == "talk"))
+			{
+				if (!(text2 == "rc_talk"))
+				{
+					if (text2 == "talkrepeat")
+					{
+						PrivateMaidTouchManager.instance.SetRepeatVoice(voiceData);
+					}
+				}
+				else
+				{
+					PrivateMaidTouchManager.instance.AddRcVoiceData(voiceData);
+				}
+			}
+			else
+			{
+				PrivateMaidTouchManager.instance.SetSingleVoice(voiceData);
+			}
+		}
+		return false;
+	}
+
+	public override string GetKagClassName()
+	{
+		return "プライベートお触りモードkag";
+	}
+
+	private Dictionary<string, string> talkDataDictionary = new Dictionary<string, string>();
+}

+ 337 - 0
Assembly-CSharp/PrivateMaidTouchManager.cs

@@ -0,0 +1,337 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using PrivateMaidMode;
+using UnityEngine;
+using wf;
+
+public class PrivateMaidTouchManager : MonoBehaviour
+{
+	public int currentExcitement { get; private set; }
+
+	public int currentMood { get; private set; }
+
+	public Maid maid { get; private set; }
+
+	public TouchDataBase.Data playTouchData { get; private set; }
+
+	private void Awake()
+	{
+		PrivateMaidTouchManager.instance = this;
+		this.subtitleDisplay.visible = false;
+		if (!Product.supportMultiLanguage)
+		{
+			this.subtitleDisplay.autoDisplayTypeChange = false;
+		}
+		this.subtitleDisplay.displayType = SubtitleDisplayManager.DisplayType.Original;
+		this.uiPanel.alpha = 0f;
+	}
+
+	private void Start()
+	{
+		if (ScenePrivateEventModeAwake.callEventId != -1)
+		{
+			this.CallTouchMode(GameMain.Instance.CharacterMgr.GetMaid(0), ScenePrivateEventModeAwake.callEventId);
+		}
+	}
+
+	protected IEnumerator Setup()
+	{
+		this.setupCompleted = false;
+		this.pointDatas = this.playTouchData.GetAllPointData();
+		this.maid.AllProcPropSeqStart();
+		this.maid.Visible = true;
+		while (this.maid.IsBusy)
+		{
+			yield return null;
+		}
+		MaidPartsCollider partsCollider = MaidPartsCollider.AddPartCollider(this.maid);
+		this.colliderList = partsCollider.AddCollider();
+		for (int i = 0; i < this.colliderList.Count; i++)
+		{
+			int num = i;
+			this.colliderList[num].canTouch = this.playTouchData.EnabledPoint(this.colliderList[num].point);
+			ColliderEvent colliderEvent = this.colliderList[i].gameObject.AddComponent<ColliderEvent>();
+			colliderEvent.onMouseDown = delegate()
+			{
+				if (UICamera.Raycast(Input.mousePosition))
+				{
+					return;
+				}
+				if (this.playTouchData.EnabledPoint(this.colliderList[num].point))
+				{
+					this.OnTouchPoint(this.colliderList[num].point);
+				}
+			};
+		}
+		yield return null;
+		yield return null;
+		if (this.playTouchData.phaseType == 0)
+		{
+			this.currentExcitement = 0;
+			this.currentMood = 300;
+		}
+		else
+		{
+			this.currentExcitement = PrivateMaidTouchManager.backupExcitement;
+			this.currentMood = PrivateMaidTouchManager.backuptMood;
+		}
+		this.statusGauge.SetCurrentExcite(this.currentExcitement, false);
+		this.statusGauge.SetCurrentMood(this.currentMood, false);
+		GameMain.Instance.ScriptMgr.is_motion_blend = false;
+		this.kagManager.LoadScript(null, this.playTouchData.ftFile, string.Empty);
+		GameMain.Instance.ScriptMgr.is_motion_blend = true;
+		this.rcVoiceList.Clear();
+		this.kagManager.LoadScript(this.maid, this.playTouchData.rcRegisterFile, this.playTouchData.rcRegisterLabel);
+		this.TouchPointViewer.Setup(this.playTouchData);
+		this.setupCompleted = true;
+		this.uiPanel.alpha = 1f;
+		GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
+		yield break;
+	}
+
+	public void CallTouchMode(Maid maid, int id)
+	{
+		GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+		GameMain.Instance.MainLight.Reset();
+		GameMain.Instance.CharacterMgr.ResetCharaPosAll();
+		GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
+		GameMain.Instance.SoundMgr.VoiceStopAll();
+		this.playTouchData = ((!TouchDataBase.Contains(id)) ? null : TouchDataBase.GetData(id));
+		if (this.playTouchData == null)
+		{
+			Debug.LogError("タッチモードを始められませんでした。要求id" + id.ToString());
+			return;
+		}
+		this.maid = maid;
+		base.StartCoroutine(this.Setup());
+	}
+
+	public void OnTouchPoint(TouchDataBase.TouchPoint point)
+	{
+		if (this.playTouchData == null || !this.playTouchData.EnabledPoint(point))
+		{
+			return;
+		}
+		this.repeatVoiceTriggerTime = (this.subtitleOffTime = 0f);
+		this.subtitleDisplay.visible = false;
+		TouchDataBase.PointData pointData = this.playTouchData.GetPointData(point);
+		int num = 0;
+		int num2 = 0;
+		int num3 = (this.playTouchData.phaseType != 0) ? 100 : 0;
+		while (num3 < 300 && num == 0)
+		{
+			num3 += 40;
+			if (this.currentExcitement < num3)
+			{
+				num = num3;
+			}
+			else
+			{
+				num2++;
+			}
+		}
+		this.currentExcitement = wf.Math.RoundMinMax(this.currentExcitement + pointData.addExcitement, 0, (this.playTouchData.phaseType != 0) ? 300 : 100);
+		this.currentMood = wf.Math.RoundMinMax(this.currentMood + pointData.addMood, 0, 300);
+		this.statusGauge.SetCurrentExcite(this.currentExcitement, true);
+		this.statusGauge.SetCurrentMood(this.currentMood, true);
+		if (this.currentMood <= 0)
+		{
+			GameMain.Instance.MainCamera.FadeOut(0.5f, false, delegate
+			{
+				this.OnFinish(false);
+			}, true, default(Color));
+		}
+		else if ((this.playTouchData.phaseType == 0 && this.currentExcitement >= 100) || (this.playTouchData.phaseType == 1 && this.currentExcitement >= 300))
+		{
+			PrivateMaidTouchManager.backupExcitement = this.currentExcitement;
+			PrivateMaidTouchManager.backuptMood = this.currentMood;
+			GameMain.Instance.MainCamera.FadeOut(0.5f, false, delegate
+			{
+				this.OnFinish(true);
+			}, true, default(Color));
+		}
+		else
+		{
+			this.kagManager.ClearExecWait();
+			this.kagManager.LoadScript(this.maid, this.playTouchData.touchScriptFile, pointData.scriptLabelName);
+			float reserveRepeatVoice;
+			if (num <= this.currentExcitement && num2 < this.rcVoiceList.Count)
+			{
+				reserveRepeatVoice = this.PlayVoice(this.rcVoiceList[num2]);
+			}
+			else
+			{
+				reserveRepeatVoice = this.PlayVoice(this.singleVoiceData);
+			}
+			this.SetReserveRepeatVoice(reserveRepeatVoice);
+		}
+	}
+
+	public void OnFinish(bool isSuccess)
+	{
+		if (this.playTouchData == null)
+		{
+			return;
+		}
+		string text = (!isSuccess) ? this.playTouchData.failureFile : this.playTouchData.successFile;
+		string str = (!isSuccess) ? this.playTouchData.failureLabel : this.playTouchData.successLabel;
+		if (this.maid != null && this.maid.GetComponent<MaidPartsCollider>() != null)
+		{
+			this.maid.GetComponent<MaidPartsCollider>().RemoveCollider();
+			UnityEngine.Object.Destroy(this.maid.GetComponent<MaidPartsCollider>());
+		}
+		if (string.IsNullOrEmpty(text))
+		{
+			Debug.LogError("移動先の指定はありませんでした");
+			return;
+		}
+		text = ((!(this.maid == null)) ? ScriptManager.ReplacePersonal(this.maid, text) : text);
+		this.uiPanel.alpha = 0f;
+		GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+		PartColliderData.SetDefaultCursor();
+		ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
+		scriptMgr.EvalScript("global.__private_maid_mode_adv_file = '" + text + "';");
+		scriptMgr.EvalScript("global.__private_maid_mode_adv_label = '" + str + "';");
+		scriptMgr.LoadAdvScenarioScript("private_maid_mode_adv_call.ks", "*ADVスタート");
+		scriptMgr.adv_kag.Exec();
+	}
+
+	public void SetSingleVoice(PrivateMaidTouchManager.VoiceData voiceData)
+	{
+		this.singleVoiceData = voiceData;
+	}
+
+	public void SetRepeatVoice(PrivateMaidTouchManager.VoiceData voiceData)
+	{
+		this.repeatVoiceData = voiceData;
+	}
+
+	public void AddRcVoiceData(PrivateMaidTouchManager.VoiceData voiceData)
+	{
+		this.rcVoiceList.Add(voiceData);
+	}
+
+	private void SetReserveRepeatVoice(float playingVoiceTime)
+	{
+		this.repeatVoiceTriggerTime = Time.time + playingVoiceTime + UnityEngine.Random.Range(3f, 7f);
+	}
+
+	private float PlayVoice(PrivateMaidTouchManager.VoiceData voiceData)
+	{
+		if (voiceData == null)
+		{
+			return 0f;
+		}
+		Maid maid = null;
+		for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
+		{
+			Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
+			if (maid2 != null && maid2.status.guid == voiceData.maidGuid)
+			{
+				maid = maid2;
+				break;
+			}
+		}
+		float num = 0f;
+		if (maid != null && maid.Visible)
+		{
+			maid.AudioMan.LoadPlay(voiceData.voiceFileName, 0f, false, false);
+			if (maid.AudioMan.audiosource.clip != null)
+			{
+				num = maid.AudioMan.audiosource.clip.length;
+			}
+		}
+		else
+		{
+			int voice_pitch = 50;
+			AudioSourceMgr.Type soundType = AudioSourceMgr.Type.Voice;
+			if (maid != null)
+			{
+				voice_pitch = maid.VoicePitch;
+				soundType = maid.AudioMan.SoundType;
+			}
+			GameMain.Instance.SoundMgr.PlayDummyVoice(voiceData.voiceFileName, 0f, false, false, voice_pitch, soundType);
+			if (GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip != null)
+			{
+				num = GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip.length;
+			}
+		}
+		if (0f < num)
+		{
+			this.subtitleDisplay.SetTextFromScriptStyle(voiceData.text);
+			this.subtitleDisplay.visible = true;
+			this.subtitleOffTime = Time.time + num;
+		}
+		return num;
+	}
+
+	private void Update()
+	{
+		if (this.subtitleDisplay.visible && this.subtitleDisplay.messageBgAlpha != SubtitleDisplayManager.configMessageAlpha)
+		{
+			this.subtitleDisplay.messageBgAlpha = SubtitleDisplayManager.configMessageAlpha;
+		}
+		if (0f < this.subtitleOffTime && this.subtitleOffTime <= Time.time)
+		{
+			this.subtitleOffTime = 0f;
+			this.subtitleDisplay.visible = false;
+		}
+		if (0f < this.repeatVoiceTriggerTime && this.repeatVoiceTriggerTime <= Time.time)
+		{
+			float reserveRepeatVoice = this.PlayVoice(this.repeatVoiceData);
+			this.SetReserveRepeatVoice(reserveRepeatVoice);
+		}
+	}
+
+	private PrivateMaidTouchKagManager kagManager
+	{
+		get
+		{
+			return GameMain.Instance.ScriptMgr.privatemode_touch_kag;
+		}
+	}
+
+	private static int backupExcitement;
+
+	private static int backuptMood;
+
+	[SerializeField]
+	private UIPanel uiPanel;
+
+	[SerializeField]
+	private PrivateMaidTouchParamBasicBar statusGauge;
+
+	[SerializeField]
+	private SubtitleDisplayManager subtitleDisplay;
+
+	[SerializeField]
+	private PrivateMaidTouchTouchPointViewer TouchPointViewer;
+
+	public static PrivateMaidTouchManager instance;
+
+	private List<PartColliderData> colliderList;
+
+	private List<TouchDataBase.PointData> pointDatas;
+
+	private bool setupCompleted;
+
+	private List<PrivateMaidTouchManager.VoiceData> rcVoiceList = new List<PrivateMaidTouchManager.VoiceData>();
+
+	private PrivateMaidTouchManager.VoiceData singleVoiceData;
+
+	private PrivateMaidTouchManager.VoiceData repeatVoiceData;
+
+	private float repeatVoiceTriggerTime;
+
+	private float subtitleOffTime;
+
+	public class VoiceData
+	{
+		public string maidGuid;
+
+		public string voiceFileName;
+
+		public string text;
+	}
+}

+ 132 - 0
Assembly-CSharp/PrivateMaidTouchParamBasicBar.cs

@@ -0,0 +1,132 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using wf;
+
+public class PrivateMaidTouchParamBasicBar : MonoBehaviour
+{
+	public virtual void Awake()
+	{
+		if (0 < this.bar_dic_.Count)
+		{
+			return;
+		}
+		PrivateMaidTouchParamBasicBar.BarSet barSet = new PrivateMaidTouchParamBasicBar.BarSet();
+		barSet.min = 0;
+		barSet.max = 300;
+		barSet.gauge_trans = UTY.GetChildObject(base.gameObject, "Excited/GaugeGroup/Gauge", false).transform;
+		barSet.num_label = UTY.GetChildObject(base.gameObject, "Excited/Value", false).GetComponent<UILabel>();
+		this.bar_dic_.Add(PrivateMaidTouchParamBasicBar.Kind.Excite, barSet);
+		PrivateMaidTouchParamBasicBar.BarSet barSet2 = new PrivateMaidTouchParamBasicBar.BarSet();
+		barSet2.min = 0;
+		barSet2.max = 300;
+		barSet2.gauge_trans = UTY.GetChildObject(base.gameObject, "Mood/GaugeGroup/Gauge", false).transform;
+		barSet2.num_label = UTY.GetChildObject(base.gameObject, "Mood/Value", false).GetComponent<UILabel>();
+		this.bar_dic_.Add(PrivateMaidTouchParamBasicBar.Kind.Mood, barSet2);
+		this.color_dic_.Add(PrivateMaidTouchParamBasicBar.GageColor.Blue, new Color(0f, 0.5f, 1f));
+		this.color_dic_.Add(PrivateMaidTouchParamBasicBar.GageColor.Red, new Color(1f, 0f, 0f));
+		this.color_dic_.Add(PrivateMaidTouchParamBasicBar.GageColor.Yellow, new Color(1f, 1f, 0f));
+		this.color_dic_.Add(PrivateMaidTouchParamBasicBar.GageColor.Orange, new Color(1f, 0.5f, 0f));
+		this.color_dic_.Add(PrivateMaidTouchParamBasicBar.GageColor.Pink, new Color(1f, 0f, 0.5f));
+	}
+
+	public void SetMaid(Maid maid)
+	{
+		this.maid_ = maid;
+	}
+
+	public virtual void SetCurrentMood(int cur_num, bool is_anime)
+	{
+		PrivateMaidTouchParamBasicBar.BarSet barSet = this.bar_dic_[PrivateMaidTouchParamBasicBar.Kind.Mood];
+		barSet.num_label.text = cur_num.ToString();
+		float x = (float)cur_num / (float)barSet.max;
+		Color color;
+		if (200 <= cur_num)
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Red];
+		}
+		else if (100 <= cur_num)
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Orange];
+		}
+		else if (50 <= cur_num)
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Yellow];
+		}
+		else
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Blue];
+		}
+		barSet.gauge_trans.GetComponent<UISprite>().color = color;
+		Vector3 vector = new Vector3(x, 1f, 1f);
+		if (is_anime)
+		{
+			Hashtable args = TweenHash.EaseOutSine(TweenHash.Type.Scale, vector, 0.4f);
+			iTween.ScaleTo(barSet.gauge_trans.gameObject, args);
+		}
+		else
+		{
+			barSet.gauge_trans.localScale = vector;
+		}
+	}
+
+	public void SetCurrentExcite(int cur_num, bool is_anime)
+	{
+		PrivateMaidTouchParamBasicBar.BarSet barSet = this.bar_dic_[PrivateMaidTouchParamBasicBar.Kind.Excite];
+		barSet.num_label.text = cur_num.ToString();
+		float num = (float)cur_num / (float)barSet.max;
+		Color color;
+		if ((double)num <= 0.3)
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Blue];
+		}
+		else
+		{
+			color = this.color_dic_[PrivateMaidTouchParamBasicBar.GageColor.Red];
+		}
+		barSet.gauge_trans.GetComponent<UISprite>().color = color;
+		Vector3 vector = new Vector3(num, 1f, 1f);
+		if (is_anime)
+		{
+			Hashtable args = TweenHash.EaseOutSine(TweenHash.Type.Scale, vector, 0.4f);
+			iTween.ScaleTo(barSet.gauge_trans.gameObject, args);
+		}
+		else
+		{
+			barSet.gauge_trans.localScale = vector;
+		}
+	}
+
+	private Dictionary<PrivateMaidTouchParamBasicBar.Kind, PrivateMaidTouchParamBasicBar.BarSet> bar_dic_ = new Dictionary<PrivateMaidTouchParamBasicBar.Kind, PrivateMaidTouchParamBasicBar.BarSet>();
+
+	private Dictionary<PrivateMaidTouchParamBasicBar.GageColor, Color> color_dic_ = new Dictionary<PrivateMaidTouchParamBasicBar.GageColor, Color>();
+
+	protected Maid maid_;
+
+	private enum Kind
+	{
+		Excite,
+		Mood
+	}
+
+	private enum GageColor
+	{
+		Blue,
+		Red,
+		Yellow,
+		Orange,
+		Pink
+	}
+
+	private class BarSet
+	{
+		public Transform gauge_trans;
+
+		public UILabel num_label;
+
+		public int min;
+
+		public int max;
+	}
+}

+ 109 - 0
Assembly-CSharp/PrivateMaidTouchTouchPointViewer.cs

@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using PrivateMaidMode;
+using UnityEngine;
+
+public class PrivateMaidTouchTouchPointViewer : MonoBehaviour
+{
+	private void Awake()
+	{
+		this.manAlphaSlider.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f;
+		this.settingManAlpha = GameMain.Instance.CMSystem.ManAlpha;
+		EventDelegate.Add(this.manAlphaSlider.onChange, new EventDelegate.Callback(this.OnChangeSliderValue));
+	}
+
+	public void Setup(TouchDataBase.Data data)
+	{
+		foreach (UIButton uibutton in this.touchButtons)
+		{
+			if (uibutton != null)
+			{
+				uibutton.isEnabled = false;
+				uibutton.onClick.Clear();
+			}
+		}
+		if (data == null)
+		{
+			return;
+		}
+		List<TouchDataBase.PointData> allPointData = data.GetAllPointData();
+		for (int j = 0; j < allPointData.Count; j++)
+		{
+			if (allPointData[j] != null && j < this.touchButtons.Length && this.touchButtons[j] != null)
+			{
+				this.SetButtonData(this.touchButtons[j], allPointData[j].point);
+			}
+		}
+	}
+
+	private void SetButtonData(UIButton button, TouchDataBase.TouchPoint point)
+	{
+		if (button == null)
+		{
+			return;
+		}
+		button.isEnabled = true;
+		string normalSprite = string.Empty;
+		switch (point)
+		{
+		case TouchDataBase.TouchPoint.Head:
+			normalSprite = "customview_icon_head";
+			goto IL_A7;
+		case TouchDataBase.TouchPoint.Bust:
+			normalSprite = "customview_icon_brest";
+			goto IL_A7;
+		case TouchDataBase.TouchPoint.Back:
+			normalSprite = "customview_icon_back";
+			goto IL_A7;
+		case TouchDataBase.TouchPoint.Hip:
+			normalSprite = "customview_icon_butt";
+			goto IL_A7;
+		case TouchDataBase.TouchPoint.SecretPart:
+			normalSprite = "customview_icon_betweenlegs";
+			goto IL_A7;
+		case TouchDataBase.TouchPoint.Hand:
+			normalSprite = "customview_icon_arm";
+			goto IL_A7;
+		}
+		normalSprite = "customview_icon_leg";
+		IL_A7:
+		button.normalSprite = normalSprite;
+		EventDelegate.Add(button.onClick, delegate()
+		{
+			this.OnClickTouchPoint(point);
+		});
+	}
+
+	private void OnClickTouchPoint(TouchDataBase.TouchPoint point)
+	{
+		if (PrivateMaidTouchManager.instance == null)
+		{
+			return;
+		}
+		PrivateMaidTouchManager.instance.OnTouchPoint(point);
+	}
+
+	private void OnChangeSliderValue()
+	{
+		this.settingManAlpha = (int)Math.Ceiling((double)(UIProgressBar.current.value * 100f));
+		GameMain.Instance.CMSystem.ManAlpha = this.settingManAlpha;
+		GameMain.Instance.CharacterMgr.ManAlphaUpdate();
+	}
+
+	private void Update()
+	{
+		if (GameMain.Instance.CMSystem.ManAlpha != this.settingManAlpha)
+		{
+			this.manAlphaSlider.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f;
+			this.settingManAlpha = GameMain.Instance.CMSystem.ManAlpha;
+		}
+	}
+
+	[SerializeField]
+	private UIButton[] touchButtons;
+
+	[SerializeField]
+	private UISlider manAlphaSlider;
+
+	private int settingManAlpha;
+}

+ 41 - 0
Assembly-CSharp/PrivateModeEventObject.cs

@@ -0,0 +1,41 @@
+using System;
+using UnityEngine;
+
+public class PrivateModeEventObject : MonoBehaviour
+{
+	public int GetEventNo()
+	{
+		return this.eventNo;
+	}
+
+	private void Update()
+	{
+		if (!NInput.GetMouseButtonDown(0))
+		{
+			return;
+		}
+		if (UICamera.Raycast(Input.mousePosition))
+		{
+			return;
+		}
+		Ray ray = GameMain.Instance.MainCamera.camera.ScreenPointToRay(Input.mousePosition);
+		RaycastHit raycastHit = default(RaycastHit);
+		if (!Physics.Raycast(ray, out raycastHit, float.PositiveInfinity, LayerMask.GetMask(new string[]
+		{
+			LayerMask.LayerToName(base.gameObject.layer)
+		})) || raycastHit.transform != base.transform)
+		{
+			return;
+		}
+		if (PrivateModeEventObject.onClickObject != null)
+		{
+			PrivateModeEventObject.onClickObject(this.eventNo);
+		}
+	}
+
+	[SerializeField]
+	[Header("イベント番号")]
+	private int eventNo;
+
+	public static Action<int> onClickObject;
+}

+ 8 - 0
Assembly-CSharp/Product.cs

@@ -134,6 +134,14 @@ public static class Product
 		}
 	}
 
+	public static bool enabledSpecialRelation
+	{
+		get
+		{
+			return false;
+		}
+	}
+
 	public static bool lockDLCSiteLink
 	{
 		get

+ 3 - 3
Assembly-CSharp/ProfileCtrl.cs

@@ -440,7 +440,7 @@ public class ProfileCtrl : MonoBehaviour
 		this.m_lWaist.text = this.m_maidStatus.body.waist.ToString();
 		this.m_lHip.text = this.m_maidStatus.body.hip.ToString();
 		this.m_lCup.text = this.m_maidStatus.body.cup;
-		this.m_lRelation.GetComponent<Localize>().SetTerm(this.GetCondition(this.m_maidStatus.relation, this.m_maidStatus.additionalRelation));
+		this.m_lRelation.GetComponent<Localize>().SetTerm(this.GetCondition(this.m_maidStatus.relation, this.m_maidStatus.additionalRelation, this.m_maidStatus.specialRelation));
 		this.m_lConditionText.GetComponent<UILabel>().text = this.m_maidStatus.conditionText;
 		this.m_lConditionText.GetComponent<Localize>().SetTerm(this.m_maidStatus.conditionTermText);
 		this.m_lYotogiPlayCount.text = this.m_maidStatus.playCountYotogi.ToString();
@@ -577,9 +577,9 @@ public class ProfileCtrl : MonoBehaviour
 		return EnumConvert.GetTerm(contractType);
 	}
 
-	private string GetCondition(Relation relation, AdditionalRelation addRelation)
+	private string GetCondition(Relation relation, AdditionalRelation addRelation, SpecialRelation specialRelation)
 	{
-		return EnumConvert.GetTerm(relation, addRelation);
+		return EnumConvert.GetTerm(relation, addRelation, specialRelation);
 	}
 
 	private string AdjustStrLengthIfOver(string str, int length)

+ 10 - 2
Assembly-CSharp/RhythmAction_Mgr.cs

@@ -167,6 +167,14 @@ public class RhythmAction_Mgr : MonoBehaviour
 		}
 	}
 
+	public static bool IsVSDanceFirst
+	{
+		get
+		{
+			return RhythmAction_Mgr.IsVSDance && RhythmAction_Mgr.NowState == RhythmAction_Mgr.DanceState.Dance_First;
+		}
+	}
+
 	public static bool IsRhythmGameMode
 	{
 		get
@@ -479,7 +487,7 @@ public class RhythmAction_Mgr : MonoBehaviour
 		{
 			UnityEngine.Object.Destroy(this.m_ReadyPanel);
 		}
-		if (DanceMain.KaraokeMode)
+		if (DanceMain.KaraokeMode || (RhythmAction_Mgr.IsVSDance && VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState))
 		{
 			return;
 		}
@@ -494,7 +502,7 @@ public class RhythmAction_Mgr : MonoBehaviour
 
 	private void ToNextState()
 	{
-		if (DanceMain.KaraokeMode)
+		if (DanceMain.KaraokeMode || (RhythmAction_Mgr.IsVSDance && VsDanceDataMgr.Instance.CurrentSetting.isSpecifiedVictoryState))
 		{
 			return;
 		}

+ 1 - 0
Assembly-CSharp/SaveAndLoadCtrl.cs

@@ -360,6 +360,7 @@ public class SaveAndLoadCtrl : BaseCreateViewerCtrl
 	{
 		this.SetAllButtonEnable(false);
 		GameMain.Instance.SysDlg.Close();
+		GameMain.Instance.MainCamera.FadeOut(0.5f, false, null, true, default(Color));
 		int serialNoByKey = this.GetSerialNoByKey(this.m_loadDataNo);
 		this.isLoading = true;
 		this.m_loadDataNo = string.Empty;

+ 1 - 0
Assembly-CSharp/SaveAndLoadMgr.cs

@@ -123,6 +123,7 @@ public class SaveAndLoadMgr : BaseCreatePanel
 
 	public void ClosePanelAfterAction<T>(Func<T, bool> action, T param)
 	{
+		BasePanelMgr.isOpen = false;
 		TweenAlpha tweenAlpha = TweenAlpha.Begin(this.fadeTargetPanel, 0.5f, 0f);
 		EventDelegate.Set(tweenAlpha.onFinished, delegate()
 		{

+ 19 - 6
Assembly-CSharp/ScenarioData.cs

@@ -50,6 +50,10 @@ public class ScenarioData
 								$this.m_PlayableData.Add(ScenarioData.PlayableCondition.追加関係, new ScenarioData.PlayableData(text2, ScenarioData.PlayableCondition.追加関係));
 							}
 						}
+						else if (text2 == "嫁")
+						{
+							$this.m_PlayableData.Add(ScenarioData.PlayableCondition.特殊関係, new ScenarioData.PlayableData(text2, ScenarioData.PlayableCondition.特殊関係));
+						}
 						else if (!$this.m_PlayableData.ContainsKey(condition))
 						{
 							$this.m_PlayableData.Add(condition, new ScenarioData.PlayableData(text2, condition));
@@ -448,12 +452,12 @@ public class ScenarioData
 								if (text == "移籍メイド")
 								{
 									add_maid(stockMaid2);
-									goto IL_443;
+									goto IL_447;
 								}
 								if (text == "雇用移籍メイド")
 								{
 									action(stockMaid2, !stockMaid2.status.mainChara);
-									goto IL_443;
+									goto IL_447;
 								}
 							}
 							string convertPersonal = GameMain.Instance.ScenarioSelectMgr.GetConvertPersonal(stockMaid2);
@@ -474,7 +478,7 @@ public class ScenarioData
 								action(stockMaid2, "移籍" + convertPersonal == text);
 							}
 						}
-						IL_443:;
+						IL_447:;
 					}
 					else if (stockMaid2.status.heroineType == HeroineType.Original)
 					{
@@ -483,12 +487,12 @@ public class ScenarioData
 							if (text == "オリジナルメイド")
 							{
 								add_maid(stockMaid2);
-								goto IL_583;
+								goto IL_587;
 							}
 							if (text == "雇用メイド")
 							{
 								action(stockMaid2, !stockMaid2.status.mainChara);
-								goto IL_583;
+								goto IL_587;
 							}
 						}
 						string convertPersonal2 = GameMain.Instance.ScenarioSelectMgr.GetConvertPersonal(stockMaid2);
@@ -509,7 +513,7 @@ public class ScenarioData
 							action(stockMaid2, convertPersonal2 == text);
 						}
 					}
-					IL_583:;
+					IL_587:;
 				}
 				break;
 			}
@@ -650,6 +654,14 @@ public class ScenarioData
 					action(stockMaid10, EnumConvert.GetString(stockMaid10.status.additionalRelation) == text);
 				}
 				break;
+			case ScenarioData.PlayableCondition.特殊関係:
+				action2();
+				for (int num10 = 0; num10 < characterMgr.GetStockMaidCount(); num10++)
+				{
+					Maid stockMaid11 = characterMgr.GetStockMaid(num10);
+					action(stockMaid11, EnumConvert.GetString(stockMaid11.status.specialRelation) == text);
+				}
+				break;
 			case ScenarioData.PlayableCondition.アイテム:
 			{
 				int facilityPowerUpMaterialID = FacilityDataTable.GetFacilityPowerUpMaterialID(text);
@@ -881,6 +893,7 @@ public class ScenarioData
 		夜伽クラス,
 		関係,
 		追加関係,
+		特殊関係,
 		アイテム,
 		施設,
 		NTRブロック,

+ 1 - 1
Assembly-CSharp/SceneCharacterSelect.cs

@@ -48,7 +48,7 @@ public class SceneCharacterSelect : WfScreenManager
 					ScheduleCSVData.Yotogi yotogi = (ScheduleCSVData.Yotogi)scheduleBase;
 					if (yotogi.yotogiType == ScheduleCSVData.YotogiType.NewSex && yotogi.pairCondPersonal.Count > 0)
 					{
-						foreach (Maid maid2 in ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi.pairCondPersonal, maid))
+						foreach (Maid maid2 in ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi, yotogi.pairCondPersonal, maid))
 						{
 							SceneCharacterSelect.chara_guid_stock_list.Add(maid2.status.guid);
 						}

+ 4 - 0
Assembly-CSharp/SceneFreeModeSelectManager.cs

@@ -195,6 +195,7 @@ public class SceneFreeModeSelectManager : WfScreenManager
 				value.init_seikeiken = status.initSeikeiken;
 				value.relation = status.relation;
 				value.addRelation = status.additionalRelation;
+				value.specialRelation = status.specialRelation;
 				value.feature_set = new HashSet<Feature.Data>();
 				foreach (int key2 in status.features.GetKeyArray())
 				{
@@ -241,6 +242,7 @@ public class SceneFreeModeSelectManager : WfScreenManager
 				status.initSeikeiken = backupData.init_seikeiken;
 				status.relation = backupData.relation;
 				status.additionalRelation = backupData.addRelation;
+				status.specialRelation = backupData.specialRelation;
 				int[] keyArray2 = status.features.GetKeyArray();
 				foreach (int featureId in keyArray2)
 				{
@@ -436,5 +438,7 @@ public class SceneFreeModeSelectManager : WfScreenManager
 		public Relation relation;
 
 		public AdditionalRelation addRelation;
+
+		public SpecialRelation specialRelation;
 	}
 }

+ 1 - 1
Assembly-CSharp/SceneNPCEdit/SaveData.cs

@@ -10,7 +10,7 @@ namespace SceneNPCEdit
 		public static void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_NPCEDIT");
-			binary.Write(1330);
+			binary.Write(1350);
 			binary.Write(SaveData.presetData.Count);
 			foreach (KeyValuePair<int, byte[]> keyValuePair in SaveData.presetData)
 			{

+ 75 - 0
Assembly-CSharp/ScenePrivateEventModeAwake.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using PrivateMaidMode;
+
+public class ScenePrivateEventModeAwake : WfScreenManager
+{
+	public static string returnFile { get; private set; }
+
+	public static string returnLabel { get; private set; }
+
+	public static int callEventId { get; private set; }
+
+	public WfScreenMoveChildren moveScreen { get; private set; }
+
+	private void Awake()
+	{
+		ScenePrivateEventModeAwake.callEventId = -1;
+	}
+
+	public override void Start()
+	{
+		base.Start();
+		ADVKagManager adv_kag = GameMain.Instance.ScriptMgr.adv_kag;
+		this.moveScreen = base.children_dic["Move"].GetComponent<WfScreenMoveChildren>();
+		if (adv_kag.tag_backup != null && 0 < adv_kag.tag_backup.Count && adv_kag.tag_backup["name"] == "ScenePrivateEventMode")
+		{
+			if (adv_kag.tag_backup.ContainsKey("start"))
+			{
+				NDebug.Assert(adv_kag.tag_backup.ContainsKey("file"), "SceneCallにlabelの設定がされていませんでした");
+				NDebug.Assert(adv_kag.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
+				ScenePrivateEventModeAwake.returnFile = adv_kag.tag_backup["file"];
+				ScenePrivateEventModeAwake.returnLabel = adv_kag.tag_backup["label"];
+			}
+			ScenePrivateEventModeAwake.callEventId = -1;
+			int callEventId = 0;
+			if (adv_kag.tag_backup.ContainsKey("eventid") && int.TryParse(adv_kag.tag_backup["eventid"], out callEventId))
+			{
+				ScenePrivateEventModeAwake.callEventId = callEventId;
+			}
+			this.moveScreen.SetNextLabel(ScenePrivateEventModeAwake.returnLabel);
+			if (adv_kag.tag_backup.ContainsKey("event_reset"))
+			{
+				foreach (DataBase.BG bg in DataBase.GetAllBGDatas())
+				{
+					if (bg.events != null)
+					{
+						foreach (DataBase.BG.Event @event in bg.events)
+						{
+							if (@event != null)
+							{
+								@event.ShuffleEventPlayOrder();
+							}
+						}
+					}
+				}
+			}
+		}
+		this.CallScreen("Main");
+	}
+
+	protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
+	{
+		string[] array = new string[]
+		{
+			"Main",
+			"Move"
+		};
+		for (int i = 0; i < array.Length; i++)
+		{
+			WfScreenChildren component = UTY.GetChildObject(base.gameObject, array[i], false).GetComponent<WfScreenChildren>();
+			component.parent_mgr = this;
+			children_dic.Add(array[i], component);
+		}
+	}
+}

+ 23 - 6
Assembly-CSharp/Schedule/ScheduleAPI.cs

@@ -574,7 +574,7 @@ namespace Schedule
 						ScheduleCSVData.Yotogi yotogi = (ScheduleCSVData.Yotogi)scheduleBase;
 						if (yotogi.yotogiType == ScheduleCSVData.YotogiType.NewSex)
 						{
-							if (yotogi.pairCondPersonal.Count <= 0 || ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi.pairCondPersonal, scheduleSlot).Count > 0)
+							if (yotogi.pairCondPersonal.Count <= 0 || ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi, yotogi.pairCondPersonal, scheduleSlot).Count > 0)
 							{
 								list.Add(scheduleSlot);
 							}
@@ -585,7 +585,7 @@ namespace Schedule
 			return list;
 		}
 
-		public static List<Maid> GetNewYotogiHaremPairCandidateList(List<int> condPersonalIds, Maid excludeMaid = null)
+		public static List<Maid> GetNewYotogiHaremPairCandidateList(ScheduleCSVData.Yotogi workData, List<int> condPersonalIds, Maid excludeMaid = null)
 		{
 			List<Maid> list = new List<Maid>();
 			if (condPersonalIds == null || condPersonalIds.Count <= 0)
@@ -599,9 +599,26 @@ namespace Schedule
 				{
 					if (!(excludeMaid != null) || !(excludeMaid.status.guid == stockMaid.status.guid))
 					{
-						if (stockMaid.status.seikeiken == Seikeiken.Yes_Yes && stockMaid.status.relation >= Relation.Lover && condPersonalIds.Contains(stockMaid.status.personal.id))
+						if (workData.id == 10072 && workData.isCheckGP002Personal)
 						{
-							list.Add(stockMaid);
+							if ((stockMaid.status.seikeiken == Seikeiken.Yes_No || stockMaid.status.seikeiken == Seikeiken.Yes_Yes) && condPersonalIds.Contains(stockMaid.status.personal.id) && PluginData.IsEnabledForGP002Personal(stockMaid.status.personal.uniqueName))
+							{
+								list.Add(stockMaid);
+							}
+						}
+						else if (stockMaid.status.seikeiken == Seikeiken.Yes_Yes && stockMaid.status.relation >= Relation.Lover && condPersonalIds.Contains(stockMaid.status.personal.id))
+						{
+							if (workData.isCheckGP002Personal)
+							{
+								if (PluginData.IsEnabledForGP002Personal(stockMaid.status.personal.uniqueName))
+								{
+									list.Add(stockMaid);
+								}
+							}
+							else
+							{
+								list.Add(stockMaid);
+							}
 						}
 					}
 				}
@@ -1467,7 +1484,7 @@ namespace Schedule
 					{
 						if (maid.status.personal.id == yotogi.condPersonal[num10])
 						{
-							flag7 = true;
+							flag7 = (!yotogi.isCheckGP002Personal || PluginData.IsEnabledForGP002Personal(maid.status.personal.uniqueName));
 							break;
 						}
 					}
@@ -1476,7 +1493,7 @@ namespace Schedule
 						return false;
 					}
 				}
-				if (yotogi.pairCondPersonal.Count > 0 && ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi.pairCondPersonal, maid).Count <= 0)
+				if (yotogi.pairCondPersonal.Count > 0 && ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi, yotogi.pairCondPersonal, maid).Count <= 0)
 				{
 					return false;
 				}

+ 11 - 2
Assembly-CSharp/Schedule/ScheduleCSVData.cs

@@ -896,6 +896,13 @@ namespace Schedule
 							}
 						}
 						num++;
+						yotogi.isCheckGP002Personal = false;
+						if (csv.IsCellToExistData(num, 0) && csv.IsCellToExistData(num, i))
+						{
+							string cellAsString19 = csv.GetCellAsString(num, i);
+							yotogi.isCheckGP002Personal = (cellAsString19 == "〇" || cellAsString19 == "○");
+						}
+						num++;
 						if (mode == ScheduleCSVData.ScheduleBase.Mode.COM3D)
 						{
 							if (yotogi.yotogiType == ScheduleCSVData.YotogiType.HaveSex)
@@ -909,7 +916,7 @@ namespace Schedule
 						}
 						else if (mode == ScheduleCSVData.ScheduleBase.Mode.CM3D2 && yotogi.yotogiType != ScheduleCSVData.YotogiType.Vip && yotogi.yotogiType != ScheduleCSVData.YotogiType.VipCall)
 						{
-							goto IL_A63;
+							goto IL_AB8;
 						}
 						if (yotogi.id > 0)
 						{
@@ -917,7 +924,7 @@ namespace Schedule
 						}
 					}
 				}
-				IL_A63:;
+				IL_AB8:;
 			}
 		}
 
@@ -1452,6 +1459,8 @@ namespace Schedule
 
 			public List<int> pairCondPersonal;
 
+			public bool isCheckGP002Personal;
+
 			public bool netorareFlag;
 
 			public ScheduleCSVData.Yotogi.EasyYotogi easyYotogi;

+ 26 - 1
Assembly-CSharp/ScriptManager.cs

@@ -369,6 +369,8 @@ public class ScriptManager : IDisposable
 		this.adv_kag_.kag.SetOnRReturnFunction(new KagScript.OnScenarioLoadCallBack(this.OnRReturnEvent));
 		this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
 		this.yotogi_kag_.Initialize();
+		this.privatemode_touch_kag = new PrivateMaidTouchKagManager(this.tjs_, this);
+		this.privatemode_touch_kag.Initialize();
 		this.tmp_kag_ = new BaseKagManager(this.tjs_, this);
 		this.tmp_kag_.Initialize();
 		using (AFileBase afileBase = this.file_system.FileOpen("startup.tjs"))
@@ -390,6 +392,7 @@ public class ScriptManager : IDisposable
 		}
 		this.adv_kag_.kag.ClearCallStack();
 		this.yotogi_kag_.kag.ClearCallStack();
+		this.privatemode_touch_kag.kag.ClearCallStack();
 		this.tmp_kag_.kag.ClearCallStack();
 	}
 
@@ -401,6 +404,7 @@ public class ScriptManager : IDisposable
 		}
 		this.adv_kag_.Update();
 		this.yotogi_kag_.Update();
+		this.privatemode_touch_kag.Update();
 		this.tmp_kag_.Update();
 	}
 
@@ -879,6 +883,10 @@ public class ScriptManager : IDisposable
 		{
 			result.SetString(EnumConvert.GetString(status.additionalRelation));
 		}
+		else if (a == "特殊関係")
+		{
+			result.SetString(EnumConvert.GetString(status.specialRelation));
+		}
 		else if (a == "旧関係")
 		{
 			if (status.OldStatus != null)
@@ -2235,6 +2243,14 @@ public class ScriptManager : IDisposable
 		{
 			maid.status.additionalRelation = AdditionalRelation.Null;
 		}
+		else if (a == "嫁")
+		{
+			maid.status.specialRelation = SpecialRelation.Married;
+		}
+		else if (a == "特殊関係解除")
+		{
+			maid.status.specialRelation = SpecialRelation.Null;
+		}
 	}
 
 	private void TJSFuncSetSeikeikenFront(TJSVariantRef[] tjs_param, TJSVariantRef result)
@@ -3203,6 +3219,10 @@ public class ScriptManager : IDisposable
 		{
 			this.yotogi_kag_.Dispose();
 		}
+		if (this.privatemode_touch_kag != null)
+		{
+			this.privatemode_touch_kag.Dispose();
+		}
 		if (this.tmp_kag_ != null)
 		{
 			this.tmp_kag_.Dispose();
@@ -3217,7 +3237,7 @@ public class ScriptManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_SCRIPT");
-		binary.Write(1330);
+		binary.Write(1350);
 		this.adv_kag_.Serialize(binary);
 	}
 
@@ -3231,6 +3251,9 @@ public class ScriptManager : IDisposable
 		this.yotogi_kag_.Dispose();
 		this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
 		this.yotogi_kag_.Initialize();
+		this.privatemode_touch_kag.Dispose();
+		this.privatemode_touch_kag = new PrivateMaidTouchKagManager(this.tjs_, this);
+		this.privatemode_touch_kag.Initialize();
 		foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
 		{
 			keyValuePair.Value.Dispose();
@@ -3319,6 +3342,8 @@ public class ScriptManager : IDisposable
 		}
 	}
 
+	public PrivateMaidTouchKagManager privatemode_touch_kag { get; private set; }
+
 	public Dictionary<int, MotionKagManager> kag_mot_dic
 	{
 		get

+ 10 - 5
Assembly-CSharp/ShootCutInTex.cs

@@ -183,11 +183,16 @@ public class ShootCutInTex : MonoBehaviour
 	public static void SetEnemyCutInTex(bool is_second)
 	{
 		ShootCutInTex.m_EnemyCutInTexList.Clear();
-		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.対峙演出, VsDanceDataMgr.Instance.GetCurrentEnemy(is_second).ConfrontCutin);
-		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.性格固有1, VsDanceDataMgr.Instance.GetCurrentEnemy(is_second).PersonalCutin1);
-		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.性格固有2, VsDanceDataMgr.Instance.GetCurrentEnemy(is_second).PersonalCutin2);
-		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.ジョブ固有, VsDanceDataMgr.Instance.GetCurrentEnemy(is_second).JobCutin);
-		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.逆転, VsDanceDataMgr.Instance.GetCurrentEnemy(is_second).ReversalCutin);
+		DanceEnemyParam currentEnemy = VsDanceDataMgr.Instance.GetCurrentEnemy(is_second);
+		if (currentEnemy == null)
+		{
+			return;
+		}
+		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.対峙演出, currentEnemy.ConfrontCutin);
+		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.性格固有1, currentEnemy.PersonalCutin1);
+		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.性格固有2, currentEnemy.PersonalCutin2);
+		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.ジョブ固有, currentEnemy.JobCutin);
+		ShootCutInTex.m_EnemyCutInTexList.Add(ShootCutInTex.CutInName.逆転, currentEnemy.ReversalCutin);
 	}
 
 	public static void SetPlayerCutInTex()

+ 2 - 4
Assembly-CSharp/ShoulderThighIKData.cs

@@ -5,11 +5,11 @@ using UnityEngine;
 [Serializable]
 public class ShoulderThighIKData : LimbIKData
 {
-	public ShoulderThighIKData(IKEffector root_effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, tgt_bone, false)
+	public ShoulderThighIKData(IKEffector root_effector, FBIKChain chain, IKMappingLimb ik_mapping, FullBodyIKCtrl ik_ctrl, Transform tgt_bone) : base(ik_ctrl, chain, ik_mapping, tgt_bone, false)
 	{
 		this.Effector = root_effector;
 		this.Effector.target = base.IKTarget;
-		this.IKMapping = ik_mapping;
+		this.m_IsUpperBody = (this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.UpperArm_L) || this.TargetBone == this.MyIKCtrl.GetIKBone(FullBodyIKCtrl.IKBoneType.UpperArm_R));
 		this.m_ForceIKEnable = true;
 	}
 
@@ -89,8 +89,6 @@ public class ShoulderThighIKData : LimbIKData
 
 	public readonly IKEffector Effector;
 
-	public readonly IKMappingLimb IKMapping;
-
 	private ElbowKneeIKData m_ElbowKneeData;
 
 	private HandFootIKData m_HandFootData;

+ 2 - 2
Assembly-CSharp/StatusMgr.cs

@@ -104,8 +104,8 @@ public class StatusMgr : BaseCreatePanel
 		status.mValue = this.m_maid.status.mvalue;
 		status.hentai = this.m_maid.status.hentai;
 		status.housi = this.m_maid.status.housi;
-		status.relation = EnumConvert.GetString(this.m_maid.status.relation, this.m_maid.status.additionalRelation);
-		status.relationTerm = EnumConvert.GetTerm(this.m_maid.status.relation, this.m_maid.status.additionalRelation);
+		status.relation = EnumConvert.GetString(this.m_maid.status.relation, this.m_maid.status.additionalRelation, this.m_maid.status.specialRelation);
+		status.relationTerm = EnumConvert.GetTerm(this.m_maid.status.relation, this.m_maid.status.additionalRelation, this.m_maid.status.specialRelation);
 		if (this.m_maid.status.OldStatus != null)
 		{
 			if (this.m_maid.status.OldStatus.isMarriage)

+ 1 - 1
Assembly-CSharp/StatusViewer.cs

@@ -117,7 +117,7 @@ public class StatusViewer : MonoBehaviour
 		{
 			this.mainBusinessLabel.text = "-";
 		}
-		if (PluginData.IsEnabled("GP001"))
+		if (PluginData.IsEnabled("GP001") || PluginData.IsEnabled("GP002"))
 		{
 			this.mainBusinessImage.spriteName = GameModeManager.GetData().strBannerImageName;
 		}

+ 1 - 1
Assembly-CSharp/SubtitleDisplayManager.cs

@@ -260,7 +260,7 @@ public class SubtitleDisplayManager : MonoBehaviour
 
 	[Header("コンフィグの内容を読み取って表示タイプを自動更新する")]
 	[SerializeField]
-	private bool autoDisplayTypeChange = true;
+	public bool autoDisplayTypeChange = true;
 
 	private bool callAwake;
 

+ 14 - 11
Assembly-CSharp/UndressDance_Mgr.cs

@@ -568,19 +568,22 @@ public class UndressDance_Mgr : PartsMgrBase
 		list.Reverse();
 		foreach (Maid maid in list)
 		{
-			foreach (UndressItem undressItem in this.m_ItemUIList.Values)
+			if (maid)
 			{
-				undressItem.AddMaidData(maid);
+				foreach (UndressItem undressItem in this.m_ItemUIList.Values)
+				{
+					undressItem.AddMaidData(maid);
+				}
+				GameObject gameObject = Utility.CreatePrefab(this.m_MaidGrid.gameObject, "SceneDance/Rhythm_Action/Prefab/UndressDance/MaidIcon", true);
+				Transform transform = gameObject.transform.Find("IconMask/Icon");
+				this.m_HoverCheckObj.Add(transform.gameObject);
+				transform.GetComponent<UITexture>().mainTexture = maid.GetThumIcon();
+				UIWFTabButton component = transform.GetComponent<UIWFTabButton>();
+				this.m_MaidIconList.Add(component, maid);
+				EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.MaidSelect));
+				this.m_MaidSexsualData.Add(maid, new UndressDance_Mgr.SexsualData());
+				this.m_MaidSexsualData[maid].Icon = transform.GetComponent<UITexture>();
 			}
-			GameObject gameObject = Utility.CreatePrefab(this.m_MaidGrid.gameObject, "SceneDance/Rhythm_Action/Prefab/UndressDance/MaidIcon", true);
-			Transform transform = gameObject.transform.Find("IconMask/Icon");
-			this.m_HoverCheckObj.Add(transform.gameObject);
-			transform.GetComponent<UITexture>().mainTexture = maid.GetThumIcon();
-			UIWFTabButton component = transform.GetComponent<UIWFTabButton>();
-			this.m_MaidIconList.Add(component, maid);
-			EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.MaidSelect));
-			this.m_MaidSexsualData.Add(maid, new UndressDance_Mgr.SexsualData());
-			this.m_MaidSexsualData[maid].Icon = transform.GetComponent<UITexture>();
 		}
 		this.m_MaidGrid.repositionNow = true;
 		this.m_MaidTabPanel.UpdateChildren();

+ 60 - 4
Assembly-CSharp/VsDanceDataMgr.cs

@@ -101,9 +101,9 @@ public class VsDanceDataMgr
 		int key = (!is_2nd) ? this.CurrentSetting.Enemy1stID : this.CurrentSetting.Enemy2ndID;
 		if (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid)
 		{
-			return this.m_DanceEnemyData[key];
+			return (!this.m_DanceEnemyData.ContainsKey(key)) ? null : this.m_DanceEnemyData[key];
 		}
-		return this.m_SubstituteEnemyData[key];
+		return (!this.m_SubstituteEnemyData.ContainsKey(key)) ? null : this.m_SubstituteEnemyData[key];
 	}
 
 	public void MusicRelese(int setting_id)
@@ -195,6 +195,13 @@ public class VsDanceDataMgr
 
 	private Dictionary<int, DanceData> m_DanceDataList = new Dictionary<int, DanceData>();
 
+	public enum ForcedVictory
+	{
+		Nothing,
+		ForceWin,
+		ForceLose
+	}
+
 	public class DanceBattleSetting
 	{
 		public DanceBattleSetting(CsvParser csv, int cy)
@@ -205,7 +212,15 @@ public class VsDanceDataMgr
 			this.Enemy1stID = csv.GetCellAsInteger(num++, cy);
 			this.Enemy2ndID = csv.GetCellAsInteger(num++, cy);
 			string cellAsString = csv.GetCellAsString(num++, cy);
-			this.Music2ndID = ((!(cellAsString != "Free")) ? -1 : int.Parse(cellAsString));
+			int num2 = (!(cellAsString != "Free")) ? -1 : int.Parse(cellAsString);
+			if (num2 != -1)
+			{
+				this.specifyDanceData = DanceSelect.GetDanceData(num2);
+			}
+			else
+			{
+				this.specifyDanceData = null;
+			}
 			this.ClearReleaseList = new List<int>();
 			string cellAsString2 = csv.GetCellAsString(num++, cy);
 			if (!string.IsNullOrEmpty(cellAsString2))
@@ -239,6 +254,43 @@ public class VsDanceDataMgr
 					"Rindere"
 				};
 			}
+			string cellAsString4 = csv.GetCellAsString(num++, cy);
+			if (!string.IsNullOrEmpty(cellAsString4))
+			{
+				this.specifyVictoryState = (VsDanceDataMgr.ForcedVictory)Enum.Parse(typeof(VsDanceDataMgr.ForcedVictory), cellAsString4);
+			}
+			else
+			{
+				this.specifyVictoryState = VsDanceDataMgr.ForcedVictory.Nothing;
+			}
+			string cellAsString5 = csv.GetCellAsString(num++, cy);
+			if (!string.IsNullOrEmpty(cellAsString5))
+			{
+				this.fixedMaidOrder = cellAsString5.Split(new char[]
+				{
+					','
+				});
+			}
+			else
+			{
+				this.fixedMaidOrder = new string[0];
+			}
+		}
+
+		public bool isSpecifiedVictoryState
+		{
+			get
+			{
+				return this.specifyVictoryState != VsDanceDataMgr.ForcedVictory.Nothing;
+			}
+		}
+
+		public bool isFixedMaidOrder
+		{
+			get
+			{
+				return this.fixedMaidOrder != null && this.fixedMaidOrder.Length > 0;
+			}
 		}
 
 		public bool IsCanBattleParticipate(Maid maid)
@@ -257,10 +309,14 @@ public class VsDanceDataMgr
 
 		public readonly int Enemy2ndID;
 
-		public readonly int Music2ndID;
+		public readonly DanceData specifyDanceData;
 
 		public readonly List<int> ClearReleaseList;
 
 		public readonly List<string> BattlePersonalList;
+
+		public readonly VsDanceDataMgr.ForcedVictory specifyVictoryState;
+
+		public readonly string[] fixedMaidOrder;
 	}
 }

+ 1 - 1
Assembly-CSharp/WindowPartsFingerPreset.cs

@@ -182,7 +182,7 @@ public class WindowPartsFingerPreset : MonoBehaviour
 	{
 		WindowPartsFingerBlend.Type blendType = tareget_blend.BlendType;
 		FingerBlend.BaseFinger baseFingerClass = tareget_blend.GetBaseFingerClass(tareget_blend.mgr.select_maid, blendType);
-		XElement xelement = new XElement("GameVersion", 1330);
+		XElement xelement = new XElement("GameVersion", 1350);
 		XElement xelement2 = new XElement("RightData", blendType == WindowPartsFingerBlend.Type.RightArm || blendType == WindowPartsFingerBlend.Type.RightLeg);
 		XElement xelement3 = new XElement("BinaryData", Convert.ToBase64String(baseFingerClass.GetBinary()));
 		XNode[] contents = new XNode[]

+ 42 - 17
Assembly-CSharp/YotogiKagManager.cs

@@ -1,17 +1,18 @@
 using System;
+using System.Collections.Generic;
 using UnityEngine;
 
 public class YotogiKagManager : BaseKagManager
 {
 	public YotogiKagManager(TJSScript tjs, ScriptManager script_mgr) : base(tjs, script_mgr)
 	{
-		this.pickUpText = (this.repeatStackText = false);
 	}
 
 	public override void Initialize()
 	{
 		base.Initialize();
 		this.kag_.AddTagCallBack("talk", new KagScript.KagTagCallBack(this.TagTalk));
+		this.kag_.AddTagCallBack("talkaddft", new KagScript.KagTagCallBack(this.TagTalkAddFt));
 		this.kag_.AddTagCallBack("hitret", new KagScript.KagTagCallBack(this.TagHitRet));
 		this.kag_.AddTagCallBack("talkrepeat", new KagScript.KagTagCallBack(this.TagTalkRepeat));
 		this.kag_.AddTagCallBack("talkrepeatadd", new KagScript.KagTagCallBack(this.TagTalkRepeatAdd));
@@ -95,8 +96,19 @@ public class YotogiKagManager : BaseKagManager
 					this.yotogi_mgr_.play_mgr.SetMessageTextDisplayTime((int)(length * 1000f));
 				}
 			}
-			this.pickUpText = true;
-			this.repeatStackText = false;
+			this.talkType = "talk";
+		}
+		return false;
+	}
+
+	public bool TagTalkAddFt(KagTagSupport tag_data)
+	{
+		if (tag_data.IsValid("voice"))
+		{
+			Maid voiceTargetMaid = BaseKagManager.GetVoiceTargetMaid(tag_data);
+			string value = tag_data.GetTagProperty("voice").AsString() + ".ogg";
+			this.backupVoiceData = new KeyValuePair<int, string>(voiceTargetMaid.ActiveSlotNo, value);
+			this.talkType = "talkaddft";
 		}
 		return false;
 	}
@@ -119,8 +131,7 @@ public class YotogiKagManager : BaseKagManager
 				this.yotogi_old_mgr_.SetRepeatVoiceFile(tag_data.GetTagProperty("voice").AsString() + ".ogg", maid_no);
 			}
 		}
-		this.pickUpText = true;
-		this.repeatStackText = true;
+		this.talkType = "talkrepeat";
 		return false;
 	}
 
@@ -135,7 +146,7 @@ public class YotogiKagManager : BaseKagManager
 		{
 			this.yotogi_mgr_.AddRepeatVoiceFile(tag_data.GetTagProperty("voice").AsString() + ".ogg", maid_no);
 		}
-		this.pickUpText = (this.repeatStackText = false);
+		this.talkType = "talkrepeatadd";
 		return false;
 	}
 
@@ -180,27 +191,41 @@ public class YotogiKagManager : BaseKagManager
 
 	public bool TagHitRet(KagTagSupport tag_data)
 	{
-		if (this.pickUpText && this.yotogi_mgr_ != null)
+		if (this.yotogi_mgr_ != null)
 		{
 			string text = this.kag_.GetText();
 			if (!string.IsNullOrEmpty(text))
 			{
-				if (this.repeatStackText)
+				string text2 = this.talkType;
+				if (text2 != null)
 				{
-					this.yotogi_mgr_.play_mgr.AddRepeatVoiceText(text);
-				}
-				else
-				{
-					this.yotogi_mgr_.play_mgr.SetMessageText(text);
+					if (!(text2 == "talk"))
+					{
+						if (!(text2 == "talkrepeat"))
+						{
+							if (text2 == "talkaddft")
+							{
+								this.yotogi_mgr_.play_mgr.SetAdditionalFtVoice(this.backupVoiceData.Value, text, this.backupVoiceData.Key);
+							}
+						}
+						else
+						{
+							this.yotogi_mgr_.play_mgr.AddRepeatVoiceText(text);
+						}
+					}
+					else
+					{
+						this.yotogi_mgr_.play_mgr.SetMessageText(text);
+					}
 				}
 			}
 		}
 		this.kag_.TextClear();
-		this.pickUpText = (this.repeatStackText = false);
+		this.talkType = string.Empty;
 		return false;
 	}
 
-	private void PlayVoice(Maid maid, string file)
+	public void PlayVoice(Maid maid, string file)
 	{
 		if (maid != null && maid.Visible)
 		{
@@ -228,7 +253,7 @@ public class YotogiKagManager : BaseKagManager
 
 	private YotogiOldManager yotogi_old_mgr_;
 
-	private bool pickUpText;
+	private string talkType;
 
-	private bool repeatStackText;
+	private KeyValuePair<int, string> backupVoiceData;
 }

+ 1 - 1
Assembly-CSharp/YotogiManager.cs

@@ -656,7 +656,7 @@ public class YotogiManager : WfScreenManager
 			for (int i = 0; i < keyArray.Length; i++)
 			{
 				Skill.Data data = Skill.Get(keyArray[i]);
-				if (data.specialConditionType != Skill.Data.SpecialConditionType.NewType && data.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect)
+				if (data.specialConditionType != Skill.Data.SpecialConditionType.NewType && data.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect && data.specialConditionType != Skill.Data.SpecialConditionType.GP02Recollect)
 				{
 					if (!hashSet.Contains(data.player_num))
 					{

+ 1 - 1
Assembly-CSharp/YotogiParameterViewer.cs

@@ -64,7 +64,7 @@ public class YotogiParameterViewer : MonoBehaviour
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Name].text = status.charaName.GetFullName("\n");
 		this.label_dictionary_[YotogiParameterViewer.LabelType.YotogiPlayCount].text = status.playCountYotogi.ToString();
 		action(YotogiParameterViewer.LabelType.Seikeiken, EnumConvert.GetString(status.seikeiken), EnumConvert.GetTerm(status.seikeiken));
-		action(YotogiParameterViewer.LabelType.Relation, EnumConvert.GetString(status.relation, status.additionalRelation), EnumConvert.GetTerm(status.relation, status.additionalRelation));
+		action(YotogiParameterViewer.LabelType.Relation, EnumConvert.GetString(status.relation, status.additionalRelation, status.specialRelation), EnumConvert.GetTerm(status.relation, status.additionalRelation, status.specialRelation));
 		action(YotogiParameterViewer.LabelType.ConditionText, status.conditionText, status.conditionTermText);
 	}
 

+ 117 - 53
Assembly-CSharp/YotogiPlayManager.cs

@@ -435,85 +435,124 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			this.SetControlMask(false, false);
 		}
-		if (!this.lockRepeatVoiceUpdate)
+		if (this.additionalFtVoice == null)
 		{
-			for (int i = 0; i < this.repeat_voice_data_list_.Count; i++)
+			if (!this.lockRepeatVoiceUpdate)
 			{
-				YotogiPlayManager.RepeatVoiceData repeatVoiceData = this.repeat_voice_data_list_[i];
-				if (!string.IsNullOrEmpty(repeatVoiceData.repeat_voice_file))
+				for (int i = 0; i < this.repeat_voice_data_list_.Count; i++)
 				{
-					Maid maid;
-					if (0 < repeatVoiceData.maid_no)
+					YotogiPlayManager.RepeatVoiceData repeatVoiceData = this.repeat_voice_data_list_[i];
+					if (!string.IsNullOrEmpty(repeatVoiceData.repeat_voice_file))
 					{
-						maid = GameMain.Instance.CharacterMgr.GetMaid(repeatVoiceData.maid_no);
-					}
-					else
-					{
-						maid = this.maid_;
-						if (YotogiManager.isGP001HaremMode)
+						Maid maid;
+						if (0 < repeatVoiceData.maid_no)
 						{
-							maid = GameMain.Instance.CharacterMgr.GetMaid(0);
+							maid = GameMain.Instance.CharacterMgr.GetMaid(repeatVoiceData.maid_no);
 						}
-					}
-					if (!maid.AudioMan.isPlay())
-					{
-						repeatVoiceData.elapsed_time += (int)(Time.deltaTime * 1000f);
-						if (this.kRepeatWaitTime <= repeatVoiceData.elapsed_time)
+						else
 						{
-							repeatVoiceData.elapsed_time = 0;
-							if (maid != null && maid.AudioMan != null)
+							maid = this.maid_;
+							if (YotogiManager.isGP001HaremMode)
 							{
-								maid.AudioMan.LoadPlay(repeatVoiceData.repeat_voice_file, 0f, false, true);
-								if (this.subtitlesManager != null && !string.IsNullOrEmpty(repeatVoiceData.text))
+								maid = GameMain.Instance.CharacterMgr.GetMaid(0);
+							}
+						}
+						if (!maid.AudioMan.isPlay())
+						{
+							repeatVoiceData.elapsed_time += (int)(Time.deltaTime * 1000f);
+							if (this.kRepeatWaitTime <= repeatVoiceData.elapsed_time)
+							{
+								repeatVoiceData.elapsed_time = 0;
+								if (maid != null && maid.AudioMan != null)
 								{
-									this.message_display_time_ = float.MaxValue;
-									this.subtitlesManager.SetTextFromScriptStyle(repeatVoiceData.text);
+									maid.AudioMan.LoadPlay(repeatVoiceData.repeat_voice_file, 0f, false, true);
+									if (this.subtitlesManager != null && !string.IsNullOrEmpty(repeatVoiceData.text))
+									{
+										this.message_display_time_ = float.MaxValue;
+										this.subtitlesManager.SetTextFromScriptStyle(repeatVoiceData.text);
+									}
 								}
 							}
 						}
 					}
 				}
 			}
-		}
-		if (this.is_faint_end && !GameMain.Instance.MainCamera.IsFadeProcNoUI() && GameMain.Instance.SysDlg.IsDecided)
-		{
-			bool flag = this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint;
-			if (!flag)
-			{
-				this.CallNormalFile("?_YOTOGI_SYSTEM_KIZETU.ks", string.Empty);
-				GameMain.Instance.MainCamera.FadeOutNoUI(base.fade_time, true);
-			}
-			if (this.playing_skill_.skill_pair.base_data.connect_faint_skill != null)
+			if (this.is_faint_end && !GameMain.Instance.MainCamera.IsFadeProcNoUI() && GameMain.Instance.SysDlg.IsDecided)
 			{
-				GameMain.Instance.SysDlg.Show("気絶しました。\n気絶したメイドを責めますか?", SystemDialog.TYPE.YES_NO, delegate
+				bool flag = this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint;
+				if (!flag)
 				{
-					GameMain.Instance.SysDlg.Close();
-					this.yotogi_mgr_.AddPlaySkill(this.playing_skill_.skill_pair.base_data.connect_faint_skill);
-					this.playing_skill_no_ = this.yotogi_mgr_.play_skill_array.Length - 2;
-					this.maid_.status.currentMind = this.maid_.status.maxMind;
-					this.Finish();
-				}, delegate
+					this.CallNormalFile("?_YOTOGI_SYSTEM_KIZETU.ks", string.Empty);
+					GameMain.Instance.MainCamera.FadeOutNoUI(base.fade_time, true);
+				}
+				if (this.playing_skill_.skill_pair.base_data.connect_faint_skill != null)
+				{
+					GameMain.Instance.SysDlg.Show("気絶しました。\n気絶したメイドを責めますか?", SystemDialog.TYPE.YES_NO, delegate
+					{
+						GameMain.Instance.SysDlg.Close();
+						this.yotogi_mgr_.AddPlaySkill(this.playing_skill_.skill_pair.base_data.connect_faint_skill);
+						this.playing_skill_no_ = this.yotogi_mgr_.play_skill_array.Length - 2;
+						this.maid_.status.currentMind = this.maid_.status.maxMind;
+						this.Finish();
+					}, delegate
+					{
+						GameMain.Instance.SysDlg.Close();
+						this.playing_skill_no_ = -1;
+						this.Finish();
+					});
+				}
+				else if (flag)
 				{
-					GameMain.Instance.SysDlg.Close();
 					this.playing_skill_no_ = -1;
 					this.Finish();
-				});
+				}
+				else
+				{
+					GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/気絶して夜伽終了報告", null, SystemDialog.TYPE.OK, delegate
+					{
+						GameMain.Instance.SysDlg.Close();
+						this.playing_skill_no_ = -1;
+						this.Finish();
+					}, null);
+				}
+				this.is_faint_end = false;
 			}
-			else if (flag)
+			return;
+		}
+		Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(this.additionalFtVoice.maidNo);
+		if (!this.additionalFtVoice.isPlaying)
+		{
+			bool flag2 = true;
+			int num = 0;
+			while (num < GameMain.Instance.CharacterMgr.GetMaidCount() && flag2)
 			{
-				this.playing_skill_no_ = -1;
-				this.Finish();
+				Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(num);
+				if (maid3 != null && maid3.AudioMan.isPlay())
+				{
+					flag2 = false;
+				}
+				num++;
 			}
-			else
+			if (flag2)
 			{
-				GameMain.Instance.SysDlg.ShowFromLanguageTerm("Dialog/気絶して夜伽終了報告", null, SystemDialog.TYPE.OK, delegate
+				this.yotogi_mgr_.yotogi_kag.PlayVoice(maid2, this.additionalFtVoice.voiceFile);
+				if (maid2.AudioMan.isPlay())
 				{
-					GameMain.Instance.SysDlg.Close();
-					this.playing_skill_no_ = -1;
-					this.Finish();
-				}, null);
+					float length = maid2.AudioMan.GetLength();
+					this.yotogi_mgr_.play_mgr.SetMessageTextDisplayTime((int)(length * 1000f));
+					string text = this.additionalFtVoice.text;
+					if (!string.IsNullOrEmpty(text))
+					{
+						this.yotogi_mgr_.play_mgr.SetMessageText(text);
+					}
+				}
+				this.additionalFtVoice.isPlaying = true;
 			}
-			this.is_faint_end = false;
+			return;
+		}
+		if (maid2 == null || !maid2.AudioMan.isPlay())
+		{
+			this.additionalFtVoice = null;
 		}
 	}
 
@@ -662,6 +701,7 @@ public class YotogiPlayManager : WfScreenChildren
 			Debug.LogError("failed to Yotogi Suspend.");
 			return;
 		}
+		this.additionalFtVoice = null;
 		this.yotogi_mgr_.yotogi_kag.enabled = false;
 		this.SetControlMask(true, true);
 		this.lockRepeatVoiceUpdate = true;
@@ -848,6 +888,14 @@ public class YotogiPlayManager : WfScreenChildren
 		}
 	}
 
+	public void SetAdditionalFtVoice(string voideFile, string text, int maidNo)
+	{
+		this.additionalFtVoice = new YotogiPlayManager.AddFtVoiceData();
+		this.additionalFtVoice.voiceFile = voideFile;
+		this.additionalFtVoice.text = text;
+		this.additionalFtVoice.maidNo = maidNo;
+	}
+
 	public void SetRepeatVoiceFile(string file_name, int maid_no)
 	{
 		this.repeat_voice_data_list_.Clear();
@@ -892,6 +940,7 @@ public class YotogiPlayManager : WfScreenChildren
 
 	public void ClearVoice()
 	{
+		this.additionalFtVoice = null;
 		GameMain.Instance.SoundMgr.VoiceStopAll();
 		foreach (YotogiPlayManager.RepeatVoiceData repeatVoiceData in this.repeat_voice_data_list_)
 		{
@@ -1043,6 +1092,7 @@ public class YotogiPlayManager : WfScreenChildren
 		this.param_scroll_.CallFadeIn(list2);
 		this.ClearCommandFile();
 		this.SetMessageTextDisplayTime(0);
+		this.additionalFtVoice = null;
 		Maid maid = this.maid_;
 		if (0 < command_data.basic.ref_maid_no)
 		{
@@ -2137,6 +2187,7 @@ public class YotogiPlayManager : WfScreenChildren
 
 	private void OnNextSkillMove()
 	{
+		this.additionalFtVoice = null;
 		if (this.command_menu != null)
 		{
 			this.command_menu.DestroySkillCommand();
@@ -2474,6 +2525,8 @@ public class YotogiPlayManager : WfScreenChildren
 
 	private bool doneFtFileCall;
 
+	private YotogiPlayManager.AddFtVoiceData additionalFtVoice;
+
 	private bool is_faint_end;
 
 	private List<YotogiPlayManager.RepeatVoiceData> repeat_voice_data_list_ = new List<YotogiPlayManager.RepeatVoiceData>();
@@ -2513,4 +2566,15 @@ public class YotogiPlayManager : WfScreenChildren
 
 		public string text;
 	}
+
+	private class AddFtVoiceData
+	{
+		public string text;
+
+		public string voiceFile;
+
+		public int maidNo;
+
+		public bool isPlaying;
+	}
 }

+ 52 - 0
Assembly-CSharp/YotogiStage.cs

@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using MaidStatus;
 using UnityEngine;
 using wf;
 
@@ -262,6 +263,57 @@ public static class YotogiStage
 			return flag;
 		}
 
+		public bool isYotogiPlayable(Maid maid, int clubGrade, bool checkFacility)
+		{
+			if (clubGrade < this.requestClubGrade)
+			{
+				return false;
+			}
+			bool flag = this.requestFacilityIds.Length == 0;
+			FacilityManager facilityMgr = GameMain.Instance.FacilityMgr;
+			foreach (int facilityTypeID in this.requestFacilityIds)
+			{
+				if (checkFacility)
+				{
+					flag |= facilityMgr.IsExistTypeFacility(facilityTypeID);
+				}
+				else
+				{
+					flag |= facilityMgr.IsFacilityBuildFlag(facilityTypeID);
+				}
+			}
+			if (flag && this.uniqueName == "プライベートルーム")
+			{
+				if (!PluginData.IsEnabled("GP002") || maid == null || maid.status.specialRelation != SpecialRelation.Married)
+				{
+					flag = false;
+				}
+				if (flag)
+				{
+					bool flag2 = false;
+					if (maid.status.yotogiSkill != null && maid.status.yotogiSkill.datas != null)
+					{
+						foreach (YotogiSkillData yotogiSkillData in maid.status.yotogiSkill.datas.GetValueArray())
+						{
+							if (yotogiSkillData != null)
+							{
+								if (yotogiSkillData.data.getcondition_data.requestMarried)
+								{
+									flag2 = true;
+									break;
+								}
+							}
+						}
+					}
+					if (!flag2)
+					{
+						flag = false;
+					}
+				}
+			}
+			return flag;
+		}
+
 		public string termName
 		{
 			get

+ 1 - 1
Assembly-CSharp/YotogiStageSelectManager.cs

@@ -53,7 +53,7 @@ public class YotogiStageSelectManager : WfScreenChildren
 		{
 			GameObject gameObject = Utility.CreatePrefab(childObject, path, true);
 			YotogiStageUnit component2 = gameObject.GetComponent<YotogiStageUnit>();
-			component2.SetStageData(allDatas[j], allDatas[j].isYotogiPlayable(clubGrade, true), isDaytime);
+			component2.SetStageData(allDatas[j], allDatas[j].isYotogiPlayable(this.maid_, clubGrade, true), isDaytime);
 			component2.SetOnSelectEvent(new YotogiStageUnit.OnSelectEvent(this.OnSelectEvent));
 			if (yotogiStageUnit == null)
 			{

+ 24 - 5
Assembly-CSharp/Yotogis/Skill.cs

@@ -1400,6 +1400,8 @@ namespace Yotogis
 						{
 							num += 2;
 						}
+						string cellAsString7 = csv_acq.GetCellAsString(num++, y);
+						this.getcondition_data.requestMarried = (cellAsString7 == "〇");
 						return;
 					}
 					if (cellAsString3 == "〇")
@@ -1422,7 +1424,7 @@ namespace Yotogis
 
 			public bool IsExecMaid(MaidStatus.Status maid_status)
 			{
-				return this.IsExecRelation(maid_status.relation) && this.IsExecSeikeiken(maid_status.seikeiken) && this.IsExecContract(maid_status.contract) && (this.getcondition_data.maid_class == null || JobClass.IsEnabled(this.getcondition_data.maid_class.id)) && (this.getcondition_data.yotogi_class == null || YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id));
+				return this.IsExecRelation(maid_status.relation) && this.IsExecSeikeiken(maid_status.seikeiken) && this.IsExecContract(maid_status.contract) && this.IsExecStatus(maid_status) && (this.getcondition_data.maid_class == null || JobClass.IsEnabled(this.getcondition_data.maid_class.id)) && (this.getcondition_data.yotogi_class == null || YotogiClass.IsEnabled(this.getcondition_data.yotogi_class.id));
 			}
 
 			public bool IsExecRelation(MaidStatus.Relation check_condition)
@@ -1440,6 +1442,11 @@ namespace Yotogis
 				return this.exec_contract.ContainsKey(check_contract);
 			}
 
+			public bool IsExecStatus(MaidStatus.Status status)
+			{
+				return status != null && (!this.getcondition_data.requestMarried || status.specialRelation == SpecialRelation.Married);
+			}
+
 			public bool IsExecPersonal(MaidStatus.Personal.Data personal_data)
 			{
 				if (this.getcondition_data.requestPersonals.Length == 0)
@@ -1493,6 +1500,10 @@ namespace Yotogis
 				{
 					return false;
 				}
+				if (this.getcondition_data.requestMarried && status.specialRelation != SpecialRelation.Married)
+				{
+					return false;
+				}
 				if (this.getcondition_data.requestPersonals.Length != 0)
 				{
 					bool flag = false;
@@ -1539,13 +1550,20 @@ namespace Yotogis
 
 			public bool IsResultDisplay(bool lockNTRPlay)
 			{
-				Skill.Data.SpecialConditionType specialConditionType = this.specialConditionType;
-				return specialConditionType != Skill.Data.SpecialConditionType.Faint && specialConditionType != Skill.Data.SpecialConditionType.NewType && specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect && (!lockNTRPlay || (this.category != Yotogi.Category.交換 && this.category != Yotogi.Category.乱交));
+				switch (this.specialConditionType)
+				{
+				case Skill.Data.SpecialConditionType.Faint:
+				case Skill.Data.SpecialConditionType.NewType:
+				case Skill.Data.SpecialConditionType.GP01Recollect:
+				case Skill.Data.SpecialConditionType.GP02Recollect:
+					return false;
+				}
+				return !lockNTRPlay || (this.category != Yotogi.Category.交換 && this.category != Yotogi.Category.乱交);
 			}
 
 			public bool IsSkillListDisplay(bool lockNTRPlay)
 			{
-				return this.specialConditionType != Skill.Data.SpecialConditionType.Faint && this.specialConditionType != Skill.Data.SpecialConditionType.NewType && this.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect && (!lockNTRPlay || (this.category != Yotogi.Category.交換 && this.category != Yotogi.Category.乱交));
+				return this.specialConditionType != Skill.Data.SpecialConditionType.Faint && this.specialConditionType != Skill.Data.SpecialConditionType.NewType && this.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect && this.specialConditionType != Skill.Data.SpecialConditionType.GP02Recollect && (!lockNTRPlay || (this.category != Yotogi.Category.交換 && this.category != Yotogi.Category.乱交));
 			}
 
 			public Skill.Data.Command command
@@ -2138,7 +2156,8 @@ namespace Yotogis
 				Faint,
 				Confess,
 				NewType,
-				GP01Recollect
+				GP01Recollect,
+				GP02Recollect
 			}
 
 			public class GetConditionData : SkillAcquisitionCondition

+ 10 - 0
Assembly-CSharp/Yotogis/SkillAcquisitionCondition.cs

@@ -96,6 +96,14 @@ namespace Yotogis
 					this.charm.ToString()
 				}, value8));
 			}
+			if (this.requestMarried)
+			{
+				bool value9 = status != null && status.specialRelation == SpecialRelation.Married;
+				list.Add(new KeyValuePair<string[], bool>(new string[]
+				{
+					"MaidStatus/条件文/状態嫁"
+				}, value9));
+			}
 			return list;
 		}
 
@@ -118,5 +126,7 @@ namespace Yotogis
 		public YotogiClass.Data yotogi_class;
 
 		public int yotogi_class_level;
+
+		public bool requestMarried;
 	}
 }

+ 60 - 2
Assembly-CSharp/com/workman/cm3d2/scene/dailyEtc/DailyAPI.cs

@@ -3,6 +3,7 @@ using System.Collections;
 using System.Collections.Generic;
 using MaidStatus;
 using MaidStatus.CsvData;
+using PrivateMaidMode;
 using UnityEngine;
 
 namespace com.workman.cm3d2.scene.dailyEtc
@@ -126,6 +127,10 @@ namespace com.workman.cm3d2.scene.dailyEtc
 			}
 			GameMain.Instance.CharacterMgr.DeactivateCharaAll();
 			GameMain.Instance.CharacterMgr.DeactivateMaid(0);
+			if (PluginData.IsEnabled("GP002"))
+			{
+				this.m_isPrivate = PrivateModeMgr.Instance.LoadPrivateMaid(this.m_bDay);
+			}
 			f_parent.StartCoroutine(this.CoCharaLoad());
 			for (int j = 0; j < GameMain.Instance.CharacterMgr.GetStockMaidCount(); j++)
 			{
@@ -153,7 +158,17 @@ namespace com.workman.cm3d2.scene.dailyEtc
 			{
 				yield return null;
 			}
-			GameMain.Instance.CharacterMgr.ResetCharaPosAll();
+			yield return null;
+			yield return null;
+			if (this.m_isPrivate)
+			{
+				this.SetMaidCollider(true);
+				PrivateModeMgr.Instance.LoadLocation();
+			}
+			else
+			{
+				GameMain.Instance.CharacterMgr.ResetCharaPosAll();
+			}
 			GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
 			if (this.m_dgStart != null)
 			{
@@ -166,13 +181,17 @@ namespace com.workman.cm3d2.scene.dailyEtc
 		{
 			this.jumpLabelName = f_jumpLabelName;
 			this.m_eEndType = f_eEndType;
+			CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
+			if (this.m_isPrivate)
+			{
+				this.SetMaidCollider(false);
+			}
 			if (this.m_eEndType == DailyAPI.EndType.NormalSceneChange)
 			{
 				GameMain.Instance.SoundMgr.StopBGM(1f);
 			}
 			else if (this.m_eEndType == DailyAPI.EndType.ToFreeMode)
 			{
-				CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
 				for (int i = 0; i < characterMgr.GetMaidCount(); i++)
 				{
 					if (characterMgr.GetMaid(i) != null)
@@ -184,8 +203,45 @@ namespace com.workman.cm3d2.scene.dailyEtc
 			GameMain.Instance.MainCamera.FadeOut(0.5f, false, new CameraMain.dgOnCompleteFade(this.OnFinishFadeOut), true, default(Color));
 		}
 
+		public void SetMaidCollider(bool isActive)
+		{
+			if (this.m_isPrivate)
+			{
+				if (isActive)
+				{
+					MaidColliderCollect maidColliderCollect = MaidColliderCollect.AddColliderCollect(PrivateModeMgr.Instance.PrivateMaid);
+					List<CapsuleCollider> list = maidColliderCollect.AddCollider(MaidColliderCollect.ColliderType.Grab);
+					for (int i = 0; i < list.Count; i++)
+					{
+						ColliderEvent colliderEvent = list[i].gameObject.AddComponent<ColliderEvent>();
+						colliderEvent.onMouseDown = delegate()
+						{
+							if (UICamera.Raycast(Input.mousePosition) || BasePanelMgr.IsOpen())
+							{
+								return;
+							}
+							this.EndNextScene(DailyAPI.EndType.NormalSceneChange, "label_privatemaidmodeevent");
+						};
+					}
+				}
+				else
+				{
+					Maid privateMaid = PrivateModeMgr.Instance.PrivateMaid;
+					if (privateMaid != null && privateMaid.GetComponent<MaidColliderCollect>() != null)
+					{
+						privateMaid.GetComponent<MaidColliderCollect>().RemoveCollider(MaidColliderCollect.ColliderType.Grab);
+						UnityEngine.Object.Destroy(privateMaid.GetComponent<MaidColliderCollect>());
+					}
+				}
+			}
+		}
+
 		private void OnFinishFadeOut()
 		{
+			if (this.m_isPrivate)
+			{
+				GameMain.Instance.CharacterMgr.DeactivateMaid(0);
+			}
 			if (!string.IsNullOrEmpty(this.jumpLabelName))
 			{
 				this.sceneManager.GoToLabel(this.jumpLabelName);
@@ -255,6 +311,8 @@ namespace com.workman.cm3d2.scene.dailyEtc
 
 		private bool m_bDay = true;
 
+		private bool m_isPrivate;
+
 		private DailyAPI.EndType m_eEndType;
 
 		public delegate void dgOnSceneStartCallBack();

+ 191 - 0
Assembly-CSharp/uGUICharacterSelectManager.cs

@@ -0,0 +1,191 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using MaidStatus;
+using UnityEngine;
+using UnityEngine.UI;
+using wf;
+
+public class uGUICharacterSelectManager : MonoBehaviour
+{
+	public static void DefaultMaidList(List<Maid> drawList)
+	{
+		CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
+		for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
+		{
+			drawList.Add(characterMgr.GetStockMaid(i));
+		}
+	}
+
+	public static void PrivateMaidList(List<Maid> drawList)
+	{
+		CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
+		for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
+		{
+			Maid stockMaid = characterMgr.GetStockMaid(i);
+			Status status = stockMaid.status;
+			if (status.specialRelation == SpecialRelation.Married)
+			{
+				drawList.Add(stockMaid);
+			}
+		}
+	}
+
+	public void Awake()
+	{
+		NDebug.AssertNull(this.MaidPlateParentGrid != null);
+		this.tabPanel = this.MaidPlateParentGrid.gameObject.GetComponent<uGUITabPanel>();
+	}
+
+	public void Create(uGUICharacterSelectManager.Type type)
+	{
+		if (this.callBackMaidList == null)
+		{
+			if (uGUICharacterSelectManager.<>f__mg$cache0 == null)
+			{
+				uGUICharacterSelectManager.<>f__mg$cache0 = new uGUICharacterSelectManager.CallBackMaidList(uGUICharacterSelectManager.DefaultMaidList);
+			}
+			this.callBackMaidList = uGUICharacterSelectManager.<>f__mg$cache0;
+		}
+		this.m_type = type;
+		Transform transform = this.MaidPlateParentGrid.transform;
+		for (int i = 0; i < transform.childCount; i++)
+		{
+			UnityEngine.Object.Destroy(transform.GetChild(i).gameObject);
+		}
+		transform.DetachChildren();
+		this.maidList = new List<Maid>();
+		this.callBackMaidList(this.maidList);
+		this.buttonList = new List<uGUITabButton>();
+		if (type == uGUICharacterSelectManager.Type.Private)
+		{
+			GameObject f_goParent = Utility.CreatePrefab(this.MaidPlateParentGrid.gameObject, "ScenePrivate/NoSelect", true);
+			uGUITabButton component = UTY.GetChildObject(f_goParent, "Plate", false).GetComponent<uGUITabButton>();
+			this.buttonList.Add(component);
+			if (this.maidList.Count > 0)
+			{
+				GameObject f_goParent2 = Utility.CreatePrefab(this.MaidPlateParentGrid.gameObject, "ScenePrivate/RandomButton", true);
+				uGUITabButton component2 = UTY.GetChildObject(f_goParent2, "Plate", false).GetComponent<uGUITabButton>();
+				this.buttonList.Add(component2);
+			}
+		}
+		for (int j = 0; j < this.maidList.Count; j++)
+		{
+			GameObject gameObject = Utility.CreatePrefab(this.MaidPlateParentGrid.gameObject, "ScenePrivate/MaidStatus", true);
+			gameObject.GetComponent<uGUIMaidPlate>().SetMaidData(this.maidList[j]);
+			uGUITabButton component3 = UTY.GetChildObject(gameObject, "Plate", false).GetComponent<uGUITabButton>();
+			EventDelegate.Add(component3.onSelectEvent, new EventDelegate.Callback(this.OnSelect));
+			this.buttonList.Add(component3);
+		}
+		if (this.tabPanel == null)
+		{
+			this.tabPanel = this.MaidPlateParentGrid.gameObject.AddComponent<uGUITabPanel>();
+		}
+		this.tabPanel.UpdateChildren();
+		uGUITabButton component4 = UTY.GetChildObject(this.MaidPlateParentGrid.transform.GetChild(0).gameObject, "Plate", false).GetComponent<uGUITabButton>();
+		this.tabPanel.Select(component4);
+	}
+
+	public void SelectMaid(Maid maid)
+	{
+		if (maid == null)
+		{
+			return;
+		}
+		Transform transform = this.MaidPlateParentGrid.transform;
+		for (int i = 0; i < transform.childCount; i++)
+		{
+			uGUIMaidPlate component = transform.GetChild(i).GetComponent<uGUIMaidPlate>();
+			if (component != null && component.maid == maid)
+			{
+				uGUITabButton component2 = UTY.GetChildObject(component.gameObject, "Plate", false).GetComponent<uGUITabButton>();
+				this.tabPanel.Select(component2);
+				return;
+			}
+		}
+	}
+
+	public void UpdateMaidPlate(Maid maid)
+	{
+		Transform transform = this.MaidPlateParentGrid.transform;
+		for (int i = 0; i < transform.childCount; i++)
+		{
+			uGUIMaidPlate component = transform.GetChild(i).GetComponent<uGUIMaidPlate>();
+			if (component != null && component.maid == maid)
+			{
+				component.SetMaidData(maid);
+				return;
+			}
+		}
+	}
+
+	private void OnSelect()
+	{
+		GameObject gameObject = uGUITabButton.current.transform.parent.gameObject;
+		uGUIMaidPlate component = gameObject.GetComponent<uGUIMaidPlate>();
+		bool selected = uGUITabButton.selected;
+		if (selected && this.callBackOnSelect != null)
+		{
+			this.callBackOnSelect(component.maid);
+		}
+	}
+
+	public List<uGUITabButton> GetButtonList()
+	{
+		if (this.buttonList != null)
+		{
+			return this.buttonList;
+		}
+		return null;
+	}
+
+	public List<Maid> GetMaidList()
+	{
+		if (this.maidList != null)
+		{
+			return this.maidList;
+		}
+		return null;
+	}
+
+	public void SetCallBackMaidList(uGUICharacterSelectManager.CallBackMaidList callBack)
+	{
+		this.callBackMaidList = callBack;
+	}
+
+	public void SetCallBackOnSelect(uGUICharacterSelectManager.CallBackOnSelect callBack)
+	{
+		this.callBackOnSelect = callBack;
+	}
+
+	public GridLayoutGroup MaidPlateParentGrid;
+
+	private uGUICharacterSelectManager.CallBackMaidList callBackMaidList;
+
+	private uGUICharacterSelectManager.CallBackOnSelect callBackOnSelect;
+
+	private uGUICharacterSelectManager.Type m_type;
+
+	private uGUITabPanel tabPanel;
+
+	private uGUIMaidPlate[] selectList;
+
+	private List<uGUITabButton> buttonList;
+
+	private List<Maid> maidList;
+
+	[CompilerGenerated]
+	private static uGUICharacterSelectManager.CallBackMaidList <>f__mg$cache0;
+
+	public delegate void CallBackMaidList(List<Maid> drawList);
+
+	public delegate void CallBackOnSelect(Maid selectMaid);
+
+	public delegate void CallBackOnSelectNoSelect();
+
+	public enum Type
+	{
+		Default,
+		Private
+	}
+}

+ 77 - 0
Assembly-CSharp/uGUIMaidPlate.cs

@@ -0,0 +1,77 @@
+using System;
+using MaidStatus;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class uGUIMaidPlate : MonoBehaviour
+{
+	public Maid maid
+	{
+		get
+		{
+			return this.m_maid;
+		}
+	}
+
+	private void Awake()
+	{
+		this.m_status.main = UTY.GetChildObject(base.gameObject, "Plate", false);
+		this.m_status.leaderPlate = UTY.GetChildObject(base.gameObject, "Status/Leader", false).GetComponent<Image>();
+		this.m_status.icon = UTY.GetChildObject(base.gameObject, "Figure/Icon", false).GetComponent<Image>();
+		this.m_status.firstName = UTY.GetChildObject(base.gameObject, "Status/Name/FirstName", false).GetComponent<Text>();
+		this.m_status.lastName = UTY.GetChildObject(base.gameObject, "Status/Name/LastName", false).GetComponent<Text>();
+		this.m_status.contractType = UTY.GetChildObject(base.gameObject, "Status/ContractType/Value", false).GetComponent<Text>();
+		this.SetMaidData(GameMain.Instance.CharacterMgr.GetMaid(0));
+	}
+
+	public void SetMaidData(Maid maid)
+	{
+		this.m_maid = maid;
+		if (this.m_maid == null)
+		{
+			return;
+		}
+		MaidStatus.Status status = this.m_maid.status;
+		this.m_status.leaderPlate.gameObject.SetActive(status.leader);
+		NamePair charaName = status.charaName;
+		this.m_status.lastName.text = charaName.name1;
+		this.m_status.firstName.text = charaName.name2;
+		if (status.heroineType != HeroineType.Sub)
+		{
+			this.m_status.contractType.text = EnumConvert.GetString(status.contract);
+		}
+		else
+		{
+			this.m_status.contractType.text = status.subCharaStatus.contractText;
+		}
+		Texture2D thumIcon = this.m_maid.GetThumIcon();
+		if (thumIcon != null)
+		{
+			Sprite sprite = Sprite.Create(thumIcon, new Rect(0f, 0f, (float)thumIcon.width, (float)thumIcon.height), default(Vector2));
+			this.m_status.icon.sprite = sprite;
+		}
+		else
+		{
+			this.m_status.icon.sprite = null;
+		}
+	}
+
+	private Maid m_maid;
+
+	private uGUIMaidPlate.Status m_status;
+
+	private struct Status
+	{
+		public GameObject main;
+
+		public Text firstName;
+
+		public Text lastName;
+
+		public Text contractType;
+
+		public Image leaderPlate;
+
+		public Image icon;
+	}
+}

+ 36 - 0
Assembly-CSharp/uGUIPanel.cs

@@ -0,0 +1,36 @@
+using System;
+using UnityEngine;
+using UnityEngine.EventSystems;
+
+public class uGUIPanel : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IEventSystemHandler
+{
+	private void OnHover(bool isOver)
+	{
+		GameMain.Instance.MainCamera.gameObject.SendMessage("OnHover", isOver, SendMessageOptions.DontRequireReceiver);
+	}
+
+	public void OnPointerEnter(PointerEventData eventData)
+	{
+		this.OnHover(false);
+		this.isEnter = true;
+	}
+
+	public void OnPointerExit(PointerEventData eventData)
+	{
+		if (this.isEnter)
+		{
+			this.OnHover(true);
+			this.isEnter = false;
+		}
+	}
+
+	private void Update()
+	{
+		if (this.isEnter && GameMain.Instance.MainCamera.IsFallThrough)
+		{
+			this.OnHover(false);
+		}
+	}
+
+	private bool isEnter;
+}

+ 128 - 0
Assembly-CSharp/uGUITabButton.cs

@@ -0,0 +1,128 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+
+public class uGUITabButton : Button
+{
+	public bool isSelected
+	{
+		get
+		{
+			return this.selected_;
+		}
+	}
+
+	public bool isEnabled
+	{
+		get
+		{
+			return base.enabled;
+		}
+		set
+		{
+			base.enabled = value;
+		}
+	}
+
+	protected void OnInit()
+	{
+		this.isInit = true;
+		this.backupDefaultColor = base.targetGraphic.color;
+		this.isInitColor = true;
+		if (this.selectSprite != null)
+		{
+			if (!this.selectSprite.enabled)
+			{
+				this.selectSprite.enabled = true;
+			}
+			this.selectSprite.color = new Color(this.selectSprite.color.r, this.selectSprite.color.g, this.selectSprite.color.b, 0f);
+		}
+	}
+
+	public override void OnPointerClick(PointerEventData eventData)
+	{
+		if (uGUITabButton.current == null && base.enabled && base.interactable)
+		{
+			base.OnPointerClick(eventData);
+			uGUITabButton.current = this;
+			EventDelegate.Execute(this.onClickEvent);
+			uGUITabButton.current = null;
+		}
+	}
+
+	public void SetSelect(bool is_select)
+	{
+		if (!this.isInit)
+		{
+			this.OnInit();
+		}
+		if (!this.isInitColor)
+		{
+			this.backupDefaultColor = base.targetGraphic.color;
+			this.isInitColor = true;
+		}
+		this.selected_ = is_select;
+		if (is_select)
+		{
+			base.targetGraphic.color = base.colors.normalColor;
+			if (this.selectSprite != null)
+			{
+				this.selectSprite.color = new Color(this.selectSprite.color.r, this.selectSprite.color.g, this.selectSprite.color.b, 1f);
+			}
+			uGUISelectableAnimation component = base.GetComponent<uGUISelectableAnimation>();
+			if (component != null)
+			{
+				component.enabled = false;
+			}
+			if (this.maskObj != null)
+			{
+				this.maskObj.SetActive(true);
+			}
+			uGUITabButton uGUITabButton = uGUITabButton.current;
+			uGUITabButton.current = this;
+			uGUITabButton.selected = is_select;
+			EventDelegate.Execute(this.onSelectEvent);
+			uGUITabButton.selected = false;
+			uGUITabButton.current = uGUITabButton;
+		}
+		else
+		{
+			base.targetGraphic.color = this.backupDefaultColor;
+			if (this.selectSprite != null)
+			{
+				this.selectSprite.color = new Color(this.selectSprite.color.r, this.selectSprite.color.g, this.selectSprite.color.b, 0f);
+			}
+			uGUISelectableAnimation component2 = base.GetComponent<uGUISelectableAnimation>();
+			if (component2 != null)
+			{
+				component2.enabled = true;
+			}
+			if (this.maskObj != null)
+			{
+				this.maskObj.SetActive(false);
+			}
+		}
+	}
+
+	public List<EventDelegate> onClickEvent = new List<EventDelegate>();
+
+	public List<EventDelegate> onSelectEvent = new List<EventDelegate>();
+
+	public Image selectSprite;
+
+	public GameObject maskObj;
+
+	protected bool selected_;
+
+	public static bool selected;
+
+	public static uGUITabButton current;
+
+	private bool isInit;
+
+	private bool isInitColor;
+
+	protected Color backupDefaultColor;
+}

+ 142 - 0
Assembly-CSharp/uGUITabPanel.cs

@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class uGUITabPanel : MonoBehaviour
+{
+	public List<uGUITabButton> buttonList
+	{
+		get
+		{
+			return this.m_buttonList;
+		}
+	}
+
+	public void Start()
+	{
+		if (this.onClickEvent != null)
+		{
+			return;
+		}
+		this.UpdateChildren();
+	}
+
+	public void AddChildrenList(List<uGUITabButton> buttonList)
+	{
+		if (!base.enabled)
+		{
+			return;
+		}
+		if (this.onClickEvent == null)
+		{
+			this.onClickEvent = new EventDelegate(this, "OnClick");
+		}
+		this.m_buttonList.Clear();
+		for (int i = 0; i < buttonList.Count; i++)
+		{
+			uGUITabButton uGUITabButton = this.m_buttonList[i];
+			if (uGUITabButton != null)
+			{
+				bool flag = false;
+				for (int j = 0; j < uGUITabButton.onClickEvent.Count; j++)
+				{
+					if (uGUITabButton.onClickEvent[j] == this.onClickEvent)
+					{
+						flag = true;
+						break;
+					}
+				}
+				if (!flag)
+				{
+					uGUITabButton.onClickEvent.Add(this.onClickEvent);
+				}
+			}
+		}
+	}
+
+	public void UpdateChildren()
+	{
+		if (!base.enabled)
+		{
+			return;
+		}
+		if (this.onClickEvent == null)
+		{
+			this.onClickEvent = new EventDelegate(this, "OnClick");
+		}
+		this.m_buttonList.Clear();
+		Transform transform = base.transform;
+		for (int i = 0; i < transform.childCount; i++)
+		{
+			if (transform.gameObject.activeSelf)
+			{
+				uGUITabButton componentInChildren = transform.GetChild(i).GetComponentInChildren<uGUITabButton>();
+				if (componentInChildren != null)
+				{
+					this.m_buttonList.Add(componentInChildren);
+					bool flag = false;
+					for (int j = 0; j < componentInChildren.onClickEvent.Count; j++)
+					{
+						if (componentInChildren.onClickEvent[j] == this.onClickEvent)
+						{
+							flag = true;
+							break;
+						}
+					}
+					if (!flag)
+					{
+						componentInChildren.onClickEvent.Add(this.onClickEvent);
+					}
+				}
+			}
+		}
+	}
+
+	public void Select(uGUITabButton button)
+	{
+		if (!base.enabled)
+		{
+			return;
+		}
+		uGUITabButton current = uGUITabButton.current;
+		uGUITabButton.current = button;
+		EventDelegate.Execute(button.onClickEvent);
+		uGUITabButton.current = current;
+	}
+
+	public void ResetSelect()
+	{
+		this.selectButton = null;
+	}
+
+	public uGUITabButton GetSelectButton()
+	{
+		return this.selectButton;
+	}
+
+	private void OnClick()
+	{
+		if (!base.enabled)
+		{
+			return;
+		}
+		for (int i = 0; i < this.m_buttonList.Count; i++)
+		{
+			if (this.m_buttonList[i].enabled)
+			{
+				bool flag = uGUITabButton.current == this.m_buttonList[i];
+				if (flag)
+				{
+					this.selectButton = this.m_buttonList[i];
+				}
+				this.m_buttonList[i].SetSelect(flag);
+			}
+		}
+	}
+
+	private EventDelegate onClickEvent;
+
+	private List<uGUITabButton> m_buttonList = new List<uGUITabButton>();
+
+	private uGUITabButton selectButton;
+}