local this = {}

function this:init()
  this.super.init(self)
  self.data = {filterType = 1}
  self.targetData = {}
  self.dicTracing = {}
  self.nodeTargetInfo = {}
  self.markData = {}
  self.discoveredObjs = {}
  self.unlockAllArea = false
  self.curTraceCollectionId = nil
  self.specialMonsters = {}
  self.mythicalPets = {}
  self.collectionDict = {}
end

function this:getFilterType()
  return self.data.filterType
end

function this:getMark(mapId, guid)
  local marks = self:getMarkBymapId(mapId)
  if not table.isEmpty(marks) then
    for i, v in pairs(marks) do
      if v.guid == guid then
        return v, false
      end
    end
  end
  return require(L_R.store .. "map.mapPointItem").new(), true
end

function this:getMarkBymapId(mapId)
  if mapId == nil then
    return nil
  end
  local data = self.markData[mapId]
  if data == nil then
    data = {}
    self.markData[mapId] = data
  end
  return data
end

function this:getMarkBymapInfo(mapId, guid)
  if math.isEmpty(mapId) then
    return nil
  end
  return self:getMarkBymapId(mapId)[guid]
end

function this:getNavPointInfo(mapId)
  if self.markData[mapId] then
    for k, v in pairs(self.markData[mapId]) do
      if v.markId == L_Const.mapNavPointId then
        return v
      end
    end
  end
end

function this:getSelfNodeInfo(mapId)
  local data = {}
  if self.markData[mapId] then
    for k, v in pairs(self.markData[mapId]) do
      if v.markId ~= L_Const.mapNavPointId then
        table.insert(data, v)
      end
    end
  end
  return data
end

function this:getTracing(guid)
  return self.dicTracing[guid] == true
end

function this:getCurNodeTargetTracing()
  return self.nodeTargetInfo
end

function this:getUnlockAreaStatus()
  return self.unlockAllArea
end

function this:setUnlockAllArea()
  self.unlockAllArea = true
end

function this:checkObjDiscovered(mapId, guid)
  if self.discoveredObjs and self.discoveredObjs[mapId] and self.discoveredObjs[mapId][guid] then
    return true
  end
  return false
end

function this:getMapCollectionDict()
  return self.collectionDict
end

function this:getCurTraceCollectionId()
  return self.curTraceCollectionId
end

return this
