diff --git a/Localization.lua b/Localization.lua index fb8eb49..d435669 100644 --- a/Localization.lua +++ b/Localization.lua @@ -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"] = "只显示你诅咒过的单位", diff --git a/filter.lua b/filter.lua index 7b1084d..65624fb 100644 --- a/filter.lua +++ b/filter.lua @@ -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) diff --git a/settings.lua b/settings.lua index f5374e4..8d04b3a 100644 --- a/settings.lua +++ b/settings.lua @@ -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