diff --git a/2/3/4/5/6/7/ElvUI/Modules/Misc/Load_Misc.xml b/2/3/4/5/6/7/ElvUI/Modules/Misc/Load_Misc.xml
index 936f312..101dda9 100644
--- a/2/3/4/5/6/7/ElvUI/Modules/Misc/Load_Misc.xml
+++ b/2/3/4/5/6/7/ElvUI/Modules/Misc/Load_Misc.xml
@@ -4,4 +4,5 @@
+
\ No newline at end of file
diff --git a/2/3/4/5/6/7/ElvUI/Modules/Misc/Misc.lua b/2/3/4/5/6/7/ElvUI/Modules/Misc/Misc.lua
index 7b60adf..2781ee8 100644
--- a/2/3/4/5/6/7/ElvUI/Modules/Misc/Misc.lua
+++ b/2/3/4/5/6/7/ElvUI/Modules/Misc/Misc.lua
@@ -170,7 +170,7 @@ function M:ForceCVars()
end
function M:Initialize()
- -- self:LoadRaidMarker()
+ self:LoadRaidMarker()
self:LoadLoot()
self:LoadLootRoll()
self:LoadChatBubbles()
diff --git a/2/3/4/5/6/7/ElvUI/Modules/Misc/RaidMarker.lua b/2/3/4/5/6/7/ElvUI/Modules/Misc/RaidMarker.lua
new file mode 100644
index 0000000..9e4ce23
--- /dev/null
+++ b/2/3/4/5/6/7/ElvUI/Modules/Misc/RaidMarker.lua
@@ -0,0 +1,107 @@
+local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
+local M = E:GetModule("Misc");
+
+--Cache global variables
+--Lua functions
+local sin, cos, pi = math.sin, math.cos, math.pi
+--WoW API / Variables
+local CreateFrame = CreateFrame
+local GetNumPartyMembers = GetNumPartyMembers
+local UnitInRaid = UnitInRaid
+local UnitIsPartyLeader = UnitIsPartyLeader
+local UnitExists, UnitIsDead = UnitExists, UnitIsDead
+local GetCursorPosition = GetCursorPosition
+local PlaySound = PlaySound
+local SetRaidTarget = SetRaidTarget
+local SetRaidTargetIconTexture = SetRaidTargetIconTexture
+local UIErrorsFrame = UIErrorsFrame
+
+local ButtonIsDown
+
+function M:RaidMarkCanMark()
+ if not self.RaidMarkFrame then return false end
+
+ if GetNumPartyMembers() > 0 then
+ if UnitIsPartyLeader("player") or UnitInRaid("player") and not UnitIsPartyLeader("player") then
+ return true
+ else
+ UIErrorsFrame:AddMessage(L["You don't have permission to mark targets."], 1.0, 0.1, 0.1, 1.0)
+ return false
+ end
+ else
+ return true
+ end
+end
+
+function M:RaidMarkShowIcons()
+ if not UnitExists("target") or UnitIsDead("target") then
+ return
+ end
+ local x, y = GetCursorPosition()
+ local scale = E.UIParent:GetEffectiveScale()
+ self.RaidMarkFrame:SetPoint("CENTER", E.UIParent, "BOTTOMLEFT", x / scale, y / scale)
+ self.RaidMarkFrame:Show()
+end
+
+function RaidMark_HotkeyPressed(keystate)
+ ButtonIsDown = keystate == "down" and M:RaidMarkCanMark()
+ if ButtonIsDown and M.RaidMarkFrame then
+ M:RaidMarkShowIcons()
+ elseif M.RaidMarkFrame then
+ M.RaidMarkFrame:Hide()
+ end
+end
+
+function M:RaidMark_OnEvent()
+ if ButtonIsDown and self.RaidMarkFrame then
+ self:RaidMarkShowIcons()
+ end
+end
+M:RegisterEvent("PLAYER_TARGET_CHANGED", "RaidMark_OnEvent")
+
+function M:RaidMarkButton_OnEnter()
+ this.Texture:ClearAllPoints()
+ this.Texture:SetPoint("TOPLEFT", -10, 10)
+ this.Texture:SetPoint("BOTTOMRIGHT", 10, -10)
+end
+
+function M:RaidMarkButton_OnLeave()
+ this.Texture:SetAllPoints()
+end
+
+function M:RaidMarkButton_OnClick(button)
+ PlaySound("UChatScrollButton")
+ SetRaidTarget("target", button ~= "RightButton" and this:GetID() or 0)
+ this:GetParent():Hide()
+end
+
+function M:LoadRaidMarker()
+ local marker = CreateFrame("Frame", nil, E.UIParent)
+ marker:EnableMouse(true)
+ marker:SetWidth(100)
+ marker:SetHeight(100)
+ marker:SetFrameStrata("DIALOG")
+
+ for i = 1, 8 do
+ local button = CreateFrame("Button", "RaidMarkIconButton" .. i, marker)
+ button:SetWidth(40)
+ button:SetHeight(40)
+ button:SetID(i)
+ button.Texture = button:CreateTexture(button:GetName() .. "NormalTexture", "ARTWORK")
+ button.Texture:SetTexture("Interface\\TargetingFrame\\UI-RaidTargetingIcons")
+ button.Texture:SetAllPoints()
+ SetRaidTargetIconTexture(button.Texture, i)
+ button:RegisterForClicks("LeftbuttonUp","RightbuttonUp")
+ button:SetScript("OnClick", M.RaidMarkButton_OnClick)
+ button:SetScript("OnEnter", M.RaidMarkButton_OnEnter)
+ button:SetScript("OnLeave", M.RaidMarkButton_OnLeave)
+ if i == 8 then
+ button:SetPoint("CENTER", 0, 0)
+ else
+ local angle = pi / 0.7 * i
+ button:SetPoint("CENTER", sin(angle) * 60, cos(angle) * 60)
+ end
+ end
+
+ M.RaidMarkFrame = marker
+end
\ No newline at end of file