       knownQuests = JSON.parse(body).quests
       questReportEnabled = true
     window.addEventListener 'game.response', reportToServer
-    window.addEventListener 'battle.result', reportBattleResultToServer
   pluginWillUnload: (e) ->
     window.removeEventListener 'game.response', reportToServer
-    window.removeEventListener 'battle.result', reportBattleResultToServer

              'User-Agent': "Reporter v#{REPORTER_VERSION}"
        catch err
          console.error err
  # Drop ship report
reportBattleResultToServer = async (e) ->
    {rank, boss, map, mapCell, quest, enemy, dropShipId, enemyShipId, enemyFormation, getEventItem} = e.detail
    {_teitokuLv, _nickName, _teitokuId} = window
    # Third party server
    return if thirdParty
    info =
      shipId: dropShipId
      quest: quest
      enemy: enemy
      rank: rank
      isBoss: boss
      mapId: map
      cellId: mapCell
      teitokuLv: _teitokuLv
      mapLv: mapLv[map] or 0
      enemyShips: enemyShipId
      enemyFormation: enemyFormation
    try
      yield request.postAsync "http://#{SERVER_HOSTNAME}/api/report/v2/drop_ship",
        form:
          data: JSON.stringify info
        headers:
          'User-Agent': "Reporter v#{REPORTER_VERSION}"
    catch err
      console.error err
    if getEventItem
      info =
        teitokuId: _teitokuId
        teitokuLv: _teitokuLv
        teitoku: _nickName
        mapId: map
        mapLv: mapLv[map] or 0
      try
        yield request.postAsync "http://#{SERVER_HOSTNAME}/api/report/v2/pass_event",
          form:
            data: JSON.stringify info
          headers:
            'User-Agent': "Reporter v#{REPORTER_VERSION}"
      catch err
        console.error err

module.exports =
  show: false

                  'User-Agent': "Reporter v#{REPORTER_VERSION}"
            catch err
              console.error err
      # Create ship report
      when '/kcsapi/api_req_kousyou/createship'
        creating = true
