少年修仙传客户端代码仓库
client_Zxw
2019-03-16 5f813239de40124632cdb2882b1bbb9d178f2c4b
System/MainInterfacePanel/TaskModel.cs
@@ -130,6 +130,10 @@
    //----关于前期无操作自动执行主线
    public int TaskAutoLv = 0;
    public int TaskAutoTime = 0;
    public bool TaskOverBool = false;
    private int Times = 0;
    private int NeedWaitTime = 4;
    PackModel _playerPack;
    PackModel playerPack {
        get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
@@ -191,6 +195,7 @@
        GlobalTimeEvent.Instance.secondEvent += secondEvent;
        TaskAllocation.Instance.TaskTime = TimeUtility.ServerNow;
        AutomaticityBool = true;
        TaskOverBool = false;
    }
@@ -237,6 +242,7 @@
                int missionState = allMissionDict[MissionID].MissionState;
                if (allMissionDict[MissionID].MissionState != MissionState && MissionState == 3 && AutomaticityBool)
                {
                    TaskOverBool = true;
                    if (CompletionOfTaskEvent != null)
                    {
                        CompletionOfTaskEvent(MissionID);
@@ -1568,6 +1574,22 @@
        else
        {
            IsGetOnBool = false;
        }
        if (TaskOverBool)
        {
            Times += 1;
            if (Times >= NeedTime)
            {
                TaskOverBool = false;
            }
        }
        else
        {
            if (Times != 0)
            {
                Times = 0;
            }
        }
    }