                   'User-Agent': "Reporter v#{REPORTER_VERSION}"
             catch err
               console.error err
-      # Map selected rank
-      when '/kcsapi/api_get_member/mapinfo'
-        for map in body
-          mapLv[map.api_id] = 0
-          if map.api_eventmap?
-            mapLv[map.api_id] = map.api_eventmap.api_selected_rank
-      # Eventmap select report
-      when '/kcsapi/api_req_map/select_eventmap_rank'
-        {_teitokuLv, _teitokuId} = window
-        info =
-          teitokuLv: _teitokuLv
-          teitokuId: _teitokuId
-          mapareaId: parseInt(postBody.api_maparea_id) * 10 + parseInt(postBody.api_map_no)
-          rank: parseInt(postBody.api_rank)
-        mapLv[parseInt(postBody.api_maparea_id) * 10 + parseInt(postBody.api_map_no)] = parseInt(postBody.api_rank)
-        try
-          yield request.postAsync "http://#{SERVER_HOSTNAME}/api/report/v2/select_rank",
-            form:
-              data: JSON.stringify info
-            headers:
-              'User-Agent': "Reporter v#{REPORTER_VERSION}"
-        catch err
-          console.error err
       # Create ship report
       when '/kcsapi/api_req_kousyou/createship'
         creating = true

      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

# Remodel item
remodelItemId = -1
remodelItemLevel = -1
# Drop ship
DropInfo =
  mapId: null
  cellId: null
  isBoss: null
  mapLv: null
  enemy: null
  enemyShips: null
  enemyFormation: null
  quest: null
  rank: null
  shipId: null
  teitokuLv: null
drop = null
# Third party server
thirdParty = false

report = async (path, info) ->
  try
    yield request.postAsync "http://#{SERVER_HOSTNAME}#{path}",
      form:
        data: JSON.stringify info
      headers:
        'User-Agent': "Reporter v#{REPORTER_VERSION}"
  catch err
    console.error err

reportToServer = async (e) ->
    {method, path, body, postBody} = e.detail
