aura_env.herbs = {
	[1] = {
		["X"] = 49.38,
		["Y"] = 77.73,
		["CD"] = 0,
	},
	[2] = {
		["X"] = 48.13,
		["Y"] = 85.04,
		["CD"] = 0,
	},
	[3] = {
		["X"] = 47.99,
		["Y"] = 73.48,
		["CD"] = 0,
	},
	[4] = {
		["X"] = 55.28,
		["Y"] = 61.71,
		["CD"] = 0,
	},
	[5] = {
		["X"] = 58.67,
		["Y"] = 59.56,
		["CD"] = 0,
	},
	[6] = {
		["X"] = 57.57,
		["Y"] = 57.4,
		["CD"] = 0,
	},
	[7] = {
		["X"] = 57.13,
		["Y"] = 60.08,
		["CD"] = 0,
	},
	[8] = {
		["X"] = 55.73,
		["Y"] = 51.76,
		["CD"] = 0,
	},
	[9] = {
		["X"] = 56.14,
		["Y"] = 51.59,
		["CD"] = 0,
	},
	[10] = {
		["X"] = 41.07,
		["Y"] = 73.8,
		["CD"] = 0,
	},
}
aura_env.cooldown = 600
aura_env.wipeDistance = 50
aura_env.angle = 0
aura_env.hyp = 0
aura_env.GetClosestHerb = function()
	aura_env.minID = {
		["X"] = 0,
		["Y"] = 0,
		["D"] = 1000,
		["ID"] = -1,
	}
	local pX = GetPlayerMapPosition("player") or 0
	local pY = select(2, GetPlayerMapPosition("player")) or 0
	pX, pY = pX * 100, pY * 100
	for k, v in ipairs(aura_env.herbs) do
		local hX, hY, cd = aura_env.herbs[k].X, aura_env.herbs[k].Y, aura_env.herbs[k].CD
		if cd == 0 then
			local X, Y = pX - hX, pY - hY
			local hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2)))
			if hyp < aura_env.minID.D then
				aura_env.minID.X = hX
				aura_env.minID.Y = hY
				aura_env.minID.D = hyp
				aura_env.minID.ID = k
			end
		end
	end
	return aura_env.minID.ID
end
if WeakAuras.IsOptionsOpen() then
	WeakAurasSaved.HerbSniffer.CD = 0
	WeakAurasSaved.HerbSniffer.NoCD = #aura_env.herbs
end
