change range filter to 45 yards if IsSpellInRange available
This commit is contained in:
@@ -46,6 +46,7 @@ L:RegisterTranslations("enUS", function()
|
||||
["Hostile"] = true,
|
||||
["Attackable"] = true,
|
||||
["Within 28 Range"] = true,
|
||||
["Within 45 Range"] = true,
|
||||
["Has Raid Mark"] = true,
|
||||
["Has Curse"] = true,
|
||||
["Only show units you have cursed"] = true,
|
||||
@@ -189,6 +190,7 @@ L:RegisterTranslations("zhCN", function()
|
||||
["Hostile"] = "敌对",
|
||||
["Attackable"] = "可攻击",
|
||||
["Within 28 Range"] = "在28范围内",
|
||||
["Within 45 Range"] = "在45范围内",
|
||||
["Has Raid Mark"] = "有团队标记",
|
||||
["Has Curse"] = "有诅咒",
|
||||
["Only show units you have cursed"] = "只显示你诅咒过的单位",
|
||||
|
||||
+6
-1
@@ -21,7 +21,12 @@ filter.alive = function(unit)
|
||||
end
|
||||
|
||||
filter.range = function(unit)
|
||||
return CheckInteractDistance(unit, 4) and true or false
|
||||
if IsSpellInRange then
|
||||
-- 16707 is hex which has 45 yd range
|
||||
return IsSpellInRange(16707, unit) == 1 and true or false
|
||||
else
|
||||
return CheckInteractDistance(unit, 4) and true or false
|
||||
end
|
||||
end
|
||||
|
||||
filter.icon = function(unit)
|
||||
|
||||
+2
-2
@@ -203,8 +203,8 @@ local mobFilters = {
|
||||
},
|
||||
["range"] = {
|
||||
type = "toggle",
|
||||
name = L["Within 28 Range"],
|
||||
desc = L["Within 28 Range"],
|
||||
name = IsSpellInRange and L["Within 45 Range"] or L["Within 28 Range"],
|
||||
desc = IsSpellInRange and L["Within 45 Range"] or L["Within 28 Range"],
|
||||
order = 4,
|
||||
get = function()
|
||||
return Cursive.db.profile.filterrange
|
||||
|
||||
Reference in New Issue
Block a user