public virtual void OnStart()
        {
            ((Task)this).OnStart();
            AgentActor agent = this.Agent;
            Chunk      chunk;

            Singleton <Manager.Map> .Instance.ChunkTable.TryGetValue(agent.ChunkID, out chunk);

            Vector3            position        = agent.Position;
            List <ActionPoint> actionPointList = ListPool <ActionPoint> .Get();

            this._changeWarp = false;
            switch (Singleton <Manager.Map> .Instance.Simulator.Weather)
            {
            case Weather.Rain:
            case Weather.Storm:
                if (!agent.ChaControl.fileGameInfo.normalSkill.ContainsValue(16))
                {
                    SetDesiredRandomAction.CreateList(agent, chunk.AppendActionPoints, actionPointList, this._eventType, this._checkFollowType, true);
                    this._destination = SetDesiredRandomAction.RandomDestination(agent, this._eventType, chunk.AppendActionPoints, actionPointList, this._checkFollowType, true, out this._changeWarp);
                    if (Object.op_Equality((Object)this._destination, (Object)null) && !this._changeWarp)
                    {
                        actionPointList.Clear();
                        SetDesiredRandomAction.CreateList(agent, chunk.ActionPoints, actionPointList, this._eventType, this._checkFollowType, true);
                        this._destination = SetDesiredRandomAction.RandomDestination(agent, this._eventType, chunk.ActionPoints, actionPointList, this._checkFollowType, true, out this._changeWarp);
                        break;
                    }
                    break;
                }
                break;
            }
            if (Object.op_Equality((Object)this._destination, (Object)null) && !this._changeWarp && !agent.ChaControl.fileGameInfo.normalSkill.ContainsValue(17))
            {
                actionPointList.Clear();
                SetDesiredRandomAction.CreateList(agent, chunk.AppendActionPoints, actionPointList, this._eventType, this._checkFollowType, false);
                this._destination = SetDesiredRandomAction.RandomDestination(agent, this._eventType, chunk.AppendActionPoints, actionPointList, this._checkFollowType, false, out this._changeWarp);
            }
            if (Object.op_Equality((Object)this._destination, (Object)null) && !this._changeWarp)
            {
                actionPointList.Clear();
                SetDesiredRandomAction.CreateList(agent, chunk.ActionPoints, actionPointList, this._eventType, this._checkFollowType, false);
                this._destination = SetDesiredRandomAction.RandomDestination(agent, this._eventType, chunk.ActionPoints, actionPointList, this._checkFollowType, false, out this._changeWarp);
            }
            ListPool <ActionPoint> .Release(actionPointList);
        }