           id: 100000
           content: '...'
           progress: ''
+          category: 0
+          type: 0
       @setState
         tasks: tasks
+      event = new CustomEvent 'task.change',
+        bubbles: true
+        cancelable: true
+        detail:
+          tasks: tasks
+      window.dispatchEvent event
     prevHours = curHours
+  handleTaskInfo: (e) ->
+    {tasks} = e.detail
+    @setState
+      tasks: tasks
   componentDidMount: ->
     window.addEventListener 'game.response', @handleResponse
+    window.addEventListener 'task.info', @handleTaskInfo
     interval = setInterval @refreshDay, 30000
   componentWillUnmount: ->
     window.removeEventListener 'game.response', @handleResponse
+    window.removeEventListener 'task.info', @handleTaskInfo
     clearInterval interval
   render: ->
     <Panel header="任务" bsStyle="success">

          id: 100000
          content: '...'
          progress: ''
      # Stop quest
      when '/kcsapi/api_req_quest/stop'
        idx = _.findIndex tasks, (e) ->

          id: 100000
          content: '...'
          progress: ''
          category: 0
          type: 0
    tasks = _.sortBy tasks, (e) ->
      e.id
    @setState
      tasks: tasks
    event = new CustomEvent 'task.change',
      bubbles: true
      cancelable: true
      detail:
        tasks: tasks
    window.dispatchEvent event
  refreshDay: ->
    curHours = (new Date()).getUTCHours()
    return if prevHours == curHours
