-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6930915
Showing
60 changed files
with
14,547 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"Lua.diagnostics.globals": [ | ||
"SELECTED_CHAT_FRAME", | ||
"DEFAULT_CHAT_FRAME", | ||
"NORMAL_FONT_COLOR", | ||
"GameFontNormal", | ||
"GameFontHighlight", | ||
"ACCEPT", | ||
"CANCEL", | ||
"Settings", | ||
"InterfaceOptions_AddCategory", | ||
"GameFontHighlightLarge", | ||
"GameFontHighlightSmall", | ||
"CLOSE", | ||
"GameFontDisableSmall", | ||
"GameFontNormalSmall", | ||
"FONT_COLOR_CODE_CLOSE", | ||
"SetDesaturation", | ||
"ColorPickerFrame", | ||
"OpacitySliderFrame", | ||
"ChatFontNormal", | ||
"OKAY", | ||
"NOT_BOUND", | ||
"InterfaceOptionsFrame_OpenToCategory", | ||
"NORMAL_FONT_COLOR_CODE", | ||
"LE_PARTY_CATEGORY_INSTANCE", | ||
"LE_PARTY_CATEGORY_HOME" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
local _, NS = ... | ||
|
||
local Interface = NS.Interface | ||
|
||
local LibStub = LibStub | ||
local CreateFrame = CreateFrame | ||
local IsInRaid = IsInRaid | ||
local IsInGroup = IsInGroup | ||
|
||
HIR = LibStub("AceAddon-3.0"):NewAddon("HIR", "AceEvent-3.0") | ||
|
||
-- Range Checker | ||
do | ||
--- @class HealerInRangeFrame | ||
--- @field inRange boolean|nil | ||
|
||
--- @type HealerInRangeFrame|Frame|nil | ||
local healerInRangeFrame = nil | ||
local timeElapsed = 0 | ||
|
||
local function InRangeChecker(_, elapsed) | ||
timeElapsed = timeElapsed + elapsed | ||
if timeElapsed > 0.1 then | ||
timeElapsed = 0 | ||
|
||
local inRange = NS.isHealerInRange() | ||
|
||
if healerInRangeFrame and healerInRangeFrame.inRange ~= inRange then | ||
healerInRangeFrame.inRange = inRange | ||
Interface.inRange = inRange | ||
|
||
NS.ToggleVisibility(inRange, HIR.db.global.reverse) | ||
end | ||
end | ||
end | ||
|
||
function HIR:CheckForHealerInRange() | ||
local inRange = NS.isHealerInRange() | ||
|
||
if not healerInRangeFrame then | ||
healerInRangeFrame = CreateFrame("Frame") | ||
--- @cast healerInRangeFrame HealerInRangeFrame | ||
healerInRangeFrame.inRange = inRange | ||
Interface.inRange = inRange | ||
end | ||
|
||
NS.ToggleVisibility(inRange, HIR.db.global.reverse) | ||
|
||
if IsInRaid() or IsInGroup() then | ||
healerInRangeFrame:SetScript("OnUpdate", InRangeChecker) | ||
else | ||
healerInRangeFrame:SetScript("OnUpdate", nil) | ||
Interface.textFrame:Hide() | ||
end | ||
end | ||
|
||
function HIR:GROUP_ROSTER_UPDATE() | ||
self:CheckForHealerInRange() | ||
end | ||
end | ||
|
||
function HIR:PLAYER_ENTERING_WORLD() | ||
if IsInRaid() or IsInGroup() then | ||
self:CheckForHealerInRange() | ||
end | ||
|
||
self:RegisterEvent("GROUP_ROSTER_UPDATE") | ||
end | ||
|
||
function HIR:OnInitialize() | ||
self.db = LibStub("AceDB-3.0"):New("HIRDB", NS.DefaultDatabase, true) | ||
self:SetupOptions() | ||
end | ||
|
||
function HIR:OnEnable() | ||
Interface:CreateInterface() | ||
|
||
self:RegisterEvent("PLAYER_ENTERING_WORLD") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Interface: 100200 | ||
## Title: HealerInRange | ||
## Version: 1.0.0 | ||
## Author: Ajax | ||
## Notes: Shows text if you're in range of a healer | ||
## X-Flavor: Mainline | ||
## X-Category: Battlegrounds/PvP | ||
## X-Credits: Ajax | ||
## X-License: All Rights Reserved | ||
## X-Website: https://www.curseforge.com/wow/addons/healer-in-range | ||
## IconTexture: Interface\AddOns\HealerInRange\logo.tga | ||
## X-Curse-Project-ID: 957193 | ||
## X-Wago-ID: | ||
## X-WoWI-ID: | ||
## DefaultState: Enabled | ||
## SavedVariables: HIRDB | ||
|
||
embeds.xml | ||
config.lua | ||
helpers.lua | ||
interface.lua | ||
HealerInRange.lua | ||
options.lua |
Oops, something went wrong.