private void OpenADV(PlayerActor player, AgentActor agent)
        {
            this.packData.Init();
            this.openData.FindLoad(string.Format("{0}", (object)this._eventID), this.charaID, 2);
            this.packData.SetCommandData((ADV.ICommandData)Singleton <Game> .Instance?.WorldData?.Environment);
            this.packData.SetParam((IParams)agent.AgentData, (IParams)Singleton <Game> .Instance?.WorldData?.PlayerData);
            if (this._eventID == 1)
            {
                bool flag = player.IsBirthday(agent);
                this.packData.isBirthday = flag;
                if (flag)
                {
                    agent.AgentData.IsPlayerForBirthdayEvent = true;
                }
            }
            this.packData.onComplete = (System.Action)(() =>
            {
                if (agent.IsEvent)
                {
                    agent.IsEvent = false;
                }
                agent.EnableBehavior();
                switch (this._eventID)
                {
                case 0:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Game), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 1:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Gift), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 2:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    this.Complete();
                    agent.SetDesire(Desire.GetDesireKey(Desire.Type.Want), 0.0f);
                    agent.ChangeBehavior(Desire.ActionType.Normal);
                    goto case 4;

                case 3:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        if (player.ChaControl.sex == (byte)1 && !player.ChaControl.fileParam.futanari)
                        {
                            if (agent.CanSelectHCommand(Singleton <Resources> .Instance.DefinePack.MapDefines.LesTypeHMeshTag))
                            {
                                Singleton <HSceneManager> .Instance.nInvitePtn = 0;
                                agent.InitiateHScene(HSceneManager.HEvent.Normal);
                                goto case 4;
                            }
                            else
                            {
                                this.ChangeTakeMode(agent, player, false);
                                goto case 4;
                            }
                        }
                        else if (agent.CanSelectHCommand())
                        {
                            Singleton <HSceneManager> .Instance.nInvitePtn = 0;
                            agent.InitiateHScene(HSceneManager.HEvent.Normal);
                            goto case 4;
                        }
                        else
                        {
                            this.ChangeTakeMode(agent, player, false);
                            goto case 4;
                        }
                    }
                    else if (agent.CanMasturbation)
                    {
                        MapUIContainer.SetVisibleHUD(true);
                        switch (player.Mode)
                        {
                        case Desire.ActionType.Normal:
                        case Desire.ActionType.Date:
                            player.CameraControl.Mode = CameraMode.Normal;
                            player.Controller.ChangeState("Normal");
                            player.CameraControl.OnCameraBlended = (System.Action)(() => Singleton <Manager.Map> .Instance.Player.ChaControl.visibleAll = player.CameraControl.ShotType != ShotType.PointOfView);
                            break;
                        }
                        agent.Animation.ResetDefaultAnimatorController();
                        agent.CommandPartner = this._prevPartner;
                        agent.AddMotivation(Desire.GetDesireKey(Desire.Type.H), 50f);
                        agent.ChangeBehavior(Desire.ActionType.SearchMasturbation);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.H), 0.0f);
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 4:
                    this.packData.Release();
                    Singleton <Manager.ADV> .Instance.Captions.EndADV((System.Action)null);
                    break;

                case 5:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (agent.CanSelectHCommand(Singleton <Resources> .Instance.DefinePack.MapDefines.FloorTypeHMeshTag))
                    {
                        agent.InitiateHScene(HSceneManager.HEvent.FromFemale);
                        goto case 4;
                    }
                    else
                    {
                        this.ChangeTakeMode(agent, player, true);
                        goto case 4;
                    }

                case 6:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeSleepPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 7:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    agent.FromFemale = true;
                    this.ChangeAbductMode(agent, player, Desire.ActionType.TakeSleepHPoint);
                    goto case 4;

                case 8:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeEatPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                case 9:
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    if (this.packData.isSuccessH)
                    {
                        this.ChangeAbductMode(agent, player, Desire.ActionType.TakeBreakPoint);
                        goto case 4;
                    }
                    else
                    {
                        this.Complete();
                        agent.SetDesire(Desire.GetDesireKey(Desire.Type.Lonely), 0.0f);
                        agent.ChangeBehavior(Desire.ActionType.Normal);
                        MapUIContainer.SetVisibleHUD(true);
                        goto case 4;
                    }

                default:
                    agent.EnableBehavior();
                    agent.ChaControl.ChangeLookEyesPtn(0);
                    agent.ChaControl.ChangeLookEyesTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 2f);
                    agent.ChaControl.ChangeLookNeckPtn(3, 1f);
                    agent.ChaControl.ChangeLookNeckTarget(0, (Transform)null, 0.5f, 0.0f, 1f, 0.8f);
                    goto case 4;
                }
            });
            this.packData.restoreCommands = (CommCommandList.CommandInfo[])null;
            Singleton <MapUIContainer> .Instance.OpenADV(this.openData, (IPack)this.packData);
        }