Commit a139200a authored by Darth Predator's avatar Darth Predator
Browse files

Cause Mera Can't Code

parent b309171a
......@@ -828,6 +828,14 @@ P["sle"] = {
["texture"] = "ALERT",
["CustomTexture"] = "",
},
["dead"] = {
["enable"] = false,
["size"] = 36,
["xOffset"] = 0,
["yOffset"] = 0,
["texture"] = "SKULL",
["CustomTexture"] = "",
},
["role"] = {
["xoffset"] = 0,
["yoffset"] = 0,
......@@ -852,6 +860,14 @@ P["sle"] = {
["texture"] = "ALERT",
["CustomTexture"] = "",
},
["dead"] = {
["enable"] = false,
["size"] = 36,
["xOffset"] = 0,
["yOffset"] = 0,
["texture"] = "SKULL",
["CustomTexture"] = "",
},
["role"] = {
["xoffset"] = 0,
["yoffset"] = 0,
......@@ -876,6 +892,14 @@ P["sle"] = {
["texture"] = "ALERT",
["CustomTexture"] = "",
},
["dead"] = {
["enable"] = false,
["size"] = 36,
["xOffset"] = 0,
["yOffset"] = 0,
["texture"] = "SKULL",
["CustomTexture"] = "",
},
["auras"] = {
["buffs"] = {
["threshold"] = 4,
......
<Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file="AceAddon-3.0\AceAddon-3.0.lua"/> <Script file="AceConsole-3.0\AceConsole-3.0.lua"/> <Include file="LibTourist-3.0\lib.xml" /> <Script file="AceDB-3.0\AceDB-3.0.lua"/> <Include file="LibElv-UIButtons-1.0\load_uibuttons.xml"/> <Script file="LibElv-GameMenu-1.0\LibElv-GameMenu-1.0.lua"/> <Script file="LibAnim\LibAnim.lua"/> <Script file="LibQTip-1.0\LibQTip-1.0.lua"/> <Script file="LibRangeCheck-2.0\LibRangeCheck-2.0.lua"/> <Include file="LibBabble-SubZone-3.0\lib.xml"/> <Include file="LibFishing-1.0\lib.xml" /> <Script file="oUF_OfflineSLE\oUF_OfflineSLE.lua"/> <Script file="LibKitUITags-1.0\LibKitUITags-1.0.lua"/> <Script file="LibKituiConditions-1.0\LibKituiConditions-1.0.lua"/> <Script file="LibRealmInfo\LibRealmInfo.lua"/> <Include file="LibProcessable\LibProcessable.lua"/></Ui>
\ No newline at end of file
<Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file="AceAddon-3.0\AceAddon-3.0.lua"/> <Script file="AceConsole-3.0\AceConsole-3.0.lua"/> <Include file="LibTourist-3.0\lib.xml" /> <Script file="AceDB-3.0\AceDB-3.0.lua"/> <Include file="LibElv-UIButtons-1.0\load_uibuttons.xml"/> <Script file="LibElv-GameMenu-1.0\LibElv-GameMenu-1.0.lua"/> <Script file="LibAnim\LibAnim.lua"/> <Script file="LibQTip-1.0\LibQTip-1.0.lua"/> <Script file="LibRangeCheck-2.0\LibRangeCheck-2.0.lua"/> <Include file="LibBabble-SubZone-3.0\lib.xml"/> <Include file="LibFishing-1.0\lib.xml" /> <Script file="oUF_OfflineSLE\oUF_OfflineSLE.lua"/> <Script file="oUF_DeadSLE\oUF_DeadSLE.lua"/> <Script file="LibKitUITags-1.0\LibKitUITags-1.0.lua"/> <Script file="LibKituiConditions-1.0\LibKituiConditions-1.0.lua"/> <Script file="LibRealmInfo\LibRealmInfo.lua"/> <Include file="LibProcessable\LibProcessable.lua"/></Ui>
\ No newline at end of file
......
local parent, ns = ...
local oUF = ElvUF or oUF
local _G = _G
local UnitIsDead = UnitIsDead
local Update = function(self, event, unit)
local dead = self.Dead
if unit and unit ~= self.unit then return end
if not unit then unit = self.unit end
local corpse = UnitIsDead(unit) or UnitIsGhost(unit)
if corpse or _G[dead.Group].isForced then
dead:Show()
else
dead:Hide()
end
end
local Path = function(self, ...)
return (self.Dead.Override or Update) (self, ...)
end
local Enable = function(self, unit)
local dead = self.Dead
if(dead) then
dead.__owner = self
-- self:RegisterEvent('PLAYER_ALIVE', Path)
-- self:RegisterEvent('PLAYER_UNGHOST', Path)
-- self:RegisterEvent('PLAYER_DEAD', Path)
self:RegisterEvent('UNIT_HEALTH', Path)
Update(self, nil, unit)
return true
end
end
local Disable = function(self)
local dead = self.Dead
if(dead) then
-- self:UnregisterEvent('PLAYER_ALIVE', Path)
-- self:UnregisterEvent('PLAYER_UNGHOST', Path)
-- self:UnregisterEvent('PLAYER_DEAD', Path)
self:UnregisterEvent('UNIT_HEALTH', Path)
self.Dead:Hide()
end
end
oUF:AddElement('SLE_Dead', Path, Enable, Disable)
\ No newline at end of file
## Interface: 60200
## Title: oUF Dead Indicator for S&E
## Notes: Dead indicator for oUF frames in S&L.
## Author: Darth Predator
## Version: 1.0.0
## Dependencies: oUF
oUF_OfflineSLE.lua
\ No newline at end of file
......@@ -841,6 +841,7 @@ L["Combat Icon"] = true
L["LFG Icons"] = true
L["Choose what icon set will unitframes and chat use."] = true
L["Offline Indicator"] = true
L["Dead Indicator"] = true
L["Shows an icon on party or raid unitframes for people that are offline."] = true
L["Statusbars"] = true
L["Power Texture"] = true
......
......@@ -835,6 +835,7 @@ L["Combat Icon"] = true
L["LFG Icons"] = true
L["Choose what icon set will unitframes and chat use."] = true
L["Offline Indicator"] = true
L["Dead Indicator"] = true
L["Shows an icon on party or raid unitframes for people that are offline."] = true
L["Statusbars"] = true
L["Power Texture"] = true
......
......@@ -836,6 +836,7 @@ L["Combat Icon"] = "Иконка боя"
L["LFG Icons"] = "Иконки ЛФГ"
L["Choose what icon set will unitframes and chat use."] = "Набор иконок для использования на рамках юнитов и в чате."
L["Offline Indicator"] = "Не в сети"
L["Dead Indicator"] = "Мертв"
L["Shows an icon on party or raid unitframes for people that are offline."] = "Показывает иконку на рамках членов группы или рейда, которые находятся не в сети"
L["Statusbars"] = "Полосы состояния"
L["Power Texture"] = "Текстура ресурса"
......
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local SUF = SLE:GetModule("UnitFrames")
SUF.DeadTextures = {
["SKULL"] = [[Interface\LootFrame\LootPanel-Icon]],
}
function SUF:Construct_Dead(frame, group)
local db = E.db.sle.unitframes.unit[group].dead
local dead = frame.RaisedElementParent.TextureParent:CreateTexture(frame:GetName().."Dead", "OVERLAY")
dead:SetSize(db.size, db.size)
dead:SetPoint("CENTER", frame, "CENTER", db.xOffset, db.yOffset)
dead.Group = "ElvUF_"..T.StringToUpper(group)
dead:Hide()
return dead
end
......@@ -2,6 +2,7 @@
<Script file='unitframes.lua'/>
<Include file='units\load_units.xml'/>
<Script file='offline.lua'/>
<Script file='dead.lua'/>
<Script file='statusbars.lua'/>
<Script file='roleIcons.lua'/>
<Script file='pvpIcon.lua'/>
......
......@@ -28,6 +28,24 @@ function SUF:Update_GroupFrames(frame)
frame:DisableElement('SLE_Offline')
end
end
if not frame.Dead then frame.Dead = SUF:Construct_Dead(frame, group) end
if db.dead.enable then
if not frame:IsElementEnabled('SLE_Dead') then
frame:EnableElement('SLE_Dead')
end
frame.Dead:SetPoint("CENTER", frame, "CENTER", db.dead.xOffset, db.dead.yOffset)
frame.Dead:SetSize(db.dead.size, db.dead.size)
if db.dead.texture == "CUSTOM" then
frame.Dead:SetTexture(db.dead.CustomTexture)
else
frame.Dead:SetTexture(SUF.DeadTextures[db.dead.texture])
end
else
if frame:IsElementEnabled('SLE_Dead') then
frame:DisableElement('SLE_Dead')
end
end
-- if frame.db.roleIcon.enable and frame.GroupRoleIndicator then
-- frame.GroupRoleIndicator:ClearAllPoints()
-- local x, y = self:GetPositionOffset(frame.db.roleIcon.position, 1)
......
......@@ -56,6 +56,39 @@ local function configTable()
return config
end
local function CreateDeadConfig(group)
local config = {
order = 6,
type = "group",
name = L["Dead Indicator"],
get = function(info) return E.db.sle.unitframes.unit[group].dead[ info[#info] ] end,
set = function(info, value) E.db.sle.unitframes.unit[group].dead[ info[#info] ] = value; UF:CreateAndUpdateHeaderGroup(group) end,
args = {
enable = { order = 1, type = "toggle", name = L["Enable"] },
size = { order = 2, type = 'range', name = L["Size"], min = 10, max = 120, step = 1 },
xOffset = { order = 3, type = 'range', name = L["X-Offset"], min = -600, max = 600, step = 1 },
yOffset = { order = 4, type = 'range', name = L["Y-Offset"], min = -600, max = 600, step = 1 },
texture = {
order = 5,
type = "select",
name = L["Texture"],
values = {
["SKULL"] = [[|TInterface\LootFrame\LootPanel-Icon:14|t]],
["CUSTOM"] = CUSTOM,
},
},
CustomTexture = {
order = 6,
type = 'input',
width = 'full',
name = L["Custom Texture"],
disabled = function() return E.db.sle.unitframes.unit[group].dead.texture ~= "CUSTOM" end,
},
},
}
return config
end
local function CreatePortraitConfig(unitID)
local config = {
order = 1,
......@@ -224,6 +257,7 @@ local function configTable()
},
portrait = CreatePortraitConfig("party"),
offline = CreateOfflineConfig("party"),
dead = CreateOfflineConfig("party"),
auras = CreateAurasConfig("party"),
},
},
......@@ -242,6 +276,7 @@ local function configTable()
},
portrait = CreatePortraitConfig("raid"),
offline = CreateOfflineConfig("raid"),
dead = CreateOfflineConfig("raid"),
auras = CreateAurasConfig("raid"),
},
},
......@@ -260,6 +295,7 @@ local function configTable()
},
portrait = CreatePortraitConfig("raid40"),
offline = CreateOfflineConfig("raid40"),
dead = CreateOfflineConfig("raid40"),
auras = CreateAurasConfig("raid40"),
},
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment