Compare commits
109 Commits
v1.05-Beta
...
v1.15-Beta
Author | SHA1 | Date | |
---|---|---|---|
ede4b93ad8 | |||
ca211e047f | |||
8121cf3c6c | |||
6a66bcb0ca | |||
50716f3f63 | |||
43bd5af2cc | |||
9780922fec | |||
88b769c12d | |||
4ff3ed487b | |||
92dc847909 | |||
fa01d38989 | |||
326af8e796 | |||
af17c7e1b9 | |||
4148e775a9 | |||
0d7bd3c688 | |||
2988177128 | |||
b17e58f558 | |||
9edb632efc | |||
56de506ef1 | |||
6c471a0fad | |||
6f5cb0498b | |||
df2ff4c9e7 | |||
b03b05b2bb | |||
09a07c7201 | |||
152573124f | |||
3378cfcd0b | |||
53228a0e39 | |||
cbf8c1a13b | |||
993de572cd | |||
f0c0286708 | |||
20a654c810 | |||
c5f2ee1eff | |||
4eda8cea8f | |||
fb953530b6 | |||
bc1a617b6e | |||
505154e699 | |||
5776dde270 | |||
0b9c33b867 | |||
d7f31dbdab | |||
b363df73a3 | |||
54e0aa4a47 | |||
c970fe576f | |||
2be103fb88 | |||
4cd4ff982c | |||
9d26713dc1 | |||
db1e3da6fc | |||
5cad55e91a | |||
5972ef8c05 | |||
779e81727c | |||
0c4409fe16 | |||
85f63e590b | |||
da5a8ea67d | |||
4f370f4e63 | |||
06884ae043 | |||
7b0bf921c4 | |||
a83c1ad0c2 | |||
8ba1f84047 | |||
4721324a2a | |||
51e484eadd | |||
46f379c1e4 | |||
5e42a9b51f | |||
df58544f6e | |||
43518055f0 | |||
9ef174e290 | |||
a60119caa2 | |||
1546e3db6e | |||
82a9a014e4 | |||
a9a1a77dd3 | |||
084fad0074 | |||
2b9e219839 | |||
ba8ea87863 | |||
f498a0dde1 | |||
673dc72b3b | |||
6da33b6c68 | |||
0c6cae0b04 | |||
ded321e772 | |||
7015bb989e | |||
eaeccf5595 | |||
c7d07c62ee | |||
cf804546c2 | |||
467b459898 | |||
0d9cbc8f45 | |||
2c858e1c84 | |||
ffc5d32b80 | |||
1956b3a568 | |||
84f542b3b8 | |||
ccf7d08832 | |||
2e093950e2 | |||
2f9356f8de | |||
8c4a70fd04 | |||
cac0124f1a | |||
cef9de3819 | |||
a84178edbf | |||
c05fab9454 | |||
be54619576 | |||
c70560e66a | |||
de4adaec16 | |||
01d748f37e | |||
ad130af188 | |||
67edecf8d1 | |||
e01b86e1e6 | |||
8b69f5ef93 | |||
4f774b1ddb | |||
3a846add3b | |||
9dfec29f16 | |||
28d33d2f9a | |||
2d53df2b5f | |||
cddea2e094 | |||
ee1a78000e |
57
Bindings.xml
57
Bindings.xml
@ -1,38 +1,31 @@
|
|||||||
<Bindings>
|
<Bindings>
|
||||||
<Binding name="GLADDYBUTTON1_LEFT" header="GLADDY" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON1_LEFT" header="GLADDY" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON2_LEFT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON2_LEFT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON3_LEFT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON3_LEFT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON4_LEFT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON4_LEFT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON5_LEFT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON5_LEFT" Category="Gladdy"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_RIGHT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON1_RIGHT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON2_RIGHT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON2_RIGHT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON3_RIGHT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON3_RIGHT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON4_RIGHT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON4_RIGHT" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON5_RIGHT" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON5_RIGHT" Category="Gladdy"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_MIDDLE" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON1_MIDDLE" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON2_MIDDLE" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON2_MIDDLE" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON3_MIDDLE" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON3_MIDDLE" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON4_MIDDLE" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON4_MIDDLE" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON5_MIDDLE" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON5_MIDDLE" Category="Gladdy"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_BUTTON4" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON1_BUTTON4" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON2_BUTTON4" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON2_BUTTON4" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON3_BUTTON4" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON3_BUTTON4" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON4_BUTTON4" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON4_BUTTON4" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON5_BUTTON4" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON5_BUTTON4" Category="Gladdy"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_BUTTON5" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON1_BUTTON5" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON2_BUTTON5" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON2_BUTTON5" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON3_BUTTON5" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON3_BUTTON5" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON4_BUTTON5" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON4_BUTTON5" Category="Gladdy"/>
|
||||||
<Binding name="GLADDYBUTTON5_BUTTON5" category="ADDONS"/>
|
<Binding name="GLADDYBUTTON5_BUTTON5" Category="Gladdy"/>
|
||||||
|
|
||||||
|
|
||||||
<Binding header="GLADDYTRINKET" name="GLADDYTRINKET1" category="ADDONS"/>
|
|
||||||
<Binding name="GLADDYTRINKET2" category="ADDONS"/>
|
|
||||||
<Binding name="GLADDYTRINKET3" category="ADDONS"/>
|
|
||||||
<Binding name="GLADDYTRINKET4" category="ADDONS"/>
|
|
||||||
<Binding name="GLADDYTRINKET5" category="ADDONS"/>
|
|
||||||
</Bindings>
|
</Bindings>
|
1944
Constants.lua
1944
Constants.lua
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
|||||||
local select, string_gsub, tostring = select, string.gsub, tostring
|
local select, string_gsub, tostring = select, string.gsub, tostring
|
||||||
|
|
||||||
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
||||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
|
||||||
local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF
|
local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF
|
||||||
local AURA_TYPE_BUFF = AURA_TYPE_BUFF
|
local AURA_TYPE_BUFF = AURA_TYPE_BUFF
|
||||||
|
|
||||||
@ -34,7 +33,6 @@ function EventListener:JOINED_ARENA()
|
|||||||
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
||||||
self:SetScript("OnEvent", EventListener.OnEvent)
|
self:SetScript("OnEvent", EventListener.OnEvent)
|
||||||
Gladdy:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", UnitName("player"))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:Reset()
|
function EventListener:Reset()
|
||||||
@ -76,21 +74,10 @@ end
|
|||||||
|
|
||||||
function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
||||||
-- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool
|
-- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool
|
||||||
local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName = CombatLogGetCurrentEventInfo()
|
local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo()
|
||||||
local srcUnit = Gladdy.guids[sourceGUID]
|
local srcUnit = Gladdy.guids[sourceGUID]
|
||||||
local destUnit = Gladdy.guids[destGUID]
|
local destUnit = Gladdy.guids[destGUID]
|
||||||
|
|
||||||
if Gladdy.specSpells[spellName] and srcUnit then
|
|
||||||
--Gladdy:Print(eventType, spellName, Gladdy.specSpells[spellName], srcUnit)
|
|
||||||
end
|
|
||||||
if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then
|
|
||||||
if destUnit then
|
|
||||||
--Gladdy:Print(eventType, "destUnit", destUnit)
|
|
||||||
elseif srcUnit then
|
|
||||||
--Gladdy:Print(eventType, "srcUnit", srcUnit)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if destUnit then
|
if destUnit then
|
||||||
-- diminish tracker
|
-- diminish tracker
|
||||||
if (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then
|
if (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then
|
||||||
@ -104,26 +91,32 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
|||||||
if not Gladdy.buttons[destUnit].class then
|
if not Gladdy.buttons[destUnit].class then
|
||||||
Gladdy:SpotEnemy(destUnit, true)
|
Gladdy:SpotEnemy(destUnit, true)
|
||||||
end
|
end
|
||||||
|
--interrupt detection
|
||||||
|
if eventType == "SPELL_INTERRUPT" then
|
||||||
|
Gladdy:SendMessage("SPELL_INTERRUPT", destUnit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if srcUnit then
|
if srcUnit then
|
||||||
local unitRace = Gladdy.buttons[srcUnit].race
|
if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED") then
|
||||||
-- cooldown tracker
|
local unitRace = Gladdy.buttons[srcUnit].race
|
||||||
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then
|
-- cooldown tracker
|
||||||
local unitClass
|
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then
|
||||||
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
local unitClass
|
||||||
if Gladdy.db.cooldownCooldowns[tostring(spellId)] then
|
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
||||||
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
|
if Gladdy.db.cooldownCooldowns[tostring(spellId)] then
|
||||||
unitClass = Gladdy.buttons[srcUnit].class
|
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
|
||||||
else
|
unitClass = Gladdy.buttons[srcUnit].class
|
||||||
unitClass = Gladdy.buttons[srcUnit].race
|
else
|
||||||
|
unitClass = Gladdy.buttons[srcUnit].race
|
||||||
|
end
|
||||||
|
Cooldowns:CooldownUsed(srcUnit, unitClass, spellId, spellName)
|
||||||
|
Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
||||||
end
|
end
|
||||||
Cooldowns:CooldownUsed(srcUnit, unitClass, spellId, spellName)
|
|
||||||
Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if Gladdy.db.racialEnabled and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then
|
if Gladdy.db.racialEnabled and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then
|
||||||
Gladdy:SendMessage("RACIAL_USED", srcUnit)
|
Gladdy:SendMessage("RACIAL_USED", srcUnit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not Gladdy.buttons[srcUnit].class then
|
if not Gladdy.buttons[srcUnit].class then
|
||||||
@ -143,12 +136,11 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
if button or pet then
|
if button or pet then
|
||||||
if updateReason == "seen" then
|
if updateReason == "seen" then
|
||||||
-- ENEMY_SPOTTED
|
-- ENEMY_SPOTTED
|
||||||
if button and not button.class then
|
if button then
|
||||||
Gladdy:SpotEnemy(unit, true)
|
Gladdy:SendMessage("ENEMY_STEALTH", unit, false)
|
||||||
end
|
if not button.class then
|
||||||
if button and button.stealthed then
|
Gladdy:SpotEnemy(unit, true)
|
||||||
local class = Gladdy.buttons[unit].class
|
end
|
||||||
button.healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b, 1)
|
|
||||||
end
|
end
|
||||||
if pet then
|
if pet then
|
||||||
Gladdy:SendMessage("PET_SPOTTED", unit)
|
Gladdy:SendMessage("PET_SPOTTED", unit)
|
||||||
@ -156,9 +148,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
elseif updateReason == "unseen" then
|
elseif updateReason == "unseen" then
|
||||||
-- STEALTH
|
-- STEALTH
|
||||||
if button then
|
if button then
|
||||||
Gladdy:SendMessage("ENEMY_STEALTH", unit)
|
Gladdy:SendMessage("ENEMY_STEALTH", unit, true)
|
||||||
button.healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1)
|
|
||||||
button.stealthed = true
|
|
||||||
end
|
end
|
||||||
if pet then
|
if pet then
|
||||||
Gladdy:SendMessage("PET_STEALTH", unit)
|
Gladdy:SendMessage("PET_STEALTH", unit)
|
||||||
@ -177,7 +167,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local exceptionNames = {
|
local exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB
|
||||||
[31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence
|
[31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence
|
||||||
[43523] = GetSpellInfo(30405) .. " Silence",
|
[43523] = GetSpellInfo(30405) .. " Silence",
|
||||||
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
||||||
@ -213,7 +203,7 @@ function EventListener:UNIT_AURA(unit)
|
|||||||
end
|
end
|
||||||
if not button.spec and Gladdy.specBuffs[spellName] then
|
if not button.spec and Gladdy.specBuffs[spellName] then
|
||||||
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
||||||
if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then
|
if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then
|
||||||
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -252,7 +242,3 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:GetOptions()
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
175
Frame.lua
175
Frame.lua
@ -26,13 +26,18 @@ Gladdy.BUTTON_DEFAULTS = {
|
|||||||
damaged = 0,
|
damaged = 0,
|
||||||
click = false,
|
click = false,
|
||||||
stealthed = false,
|
stealthed = false,
|
||||||
|
classColors = {},
|
||||||
|
lastState = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
function Gladdy:CreateFrame()
|
function Gladdy:CreateFrame()
|
||||||
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
||||||
|
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
||||||
|
--self.frame.texture:SetAllPoints(self.frame)
|
||||||
|
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||||
|
|
||||||
self.frame:SetClampedToScreen(true)
|
self.frame:SetClampedToScreen(true)
|
||||||
self.frame:EnableMouse(true)
|
self.frame:EnableMouse(false)
|
||||||
self.frame:SetMovable(true)
|
self.frame:SetMovable(true)
|
||||||
self.frame:RegisterForDrag("LeftButton")
|
self.frame:RegisterForDrag("LeftButton")
|
||||||
|
|
||||||
@ -104,53 +109,79 @@ end
|
|||||||
|
|
||||||
function Gladdy:UpdateFrame()
|
function Gladdy:UpdateFrame()
|
||||||
|
|
||||||
|
if (InCombatLockdown()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if (not self.frame) then
|
if (not self.frame) then
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
end
|
end
|
||||||
local teamSize = self.curBracket or 0
|
local teamSize = self.curBracket or 0
|
||||||
|
|
||||||
local iconSize = self.db.healthBarHeight
|
local highlightBorderSize = (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2)
|
||||||
local margin = 0
|
local powerBarHeight = self.db.powerBarEnabled and (self.db.powerBarHeight + 1) or 0
|
||||||
local width = self.db.barWidth + self.db.padding * 2 + 5
|
local leftSize = 0
|
||||||
local height = self.db.healthBarHeight * teamSize + margin * (teamSize - 1) + self.db.padding * 2 + 5
|
local rightSize = 0
|
||||||
local extraBarWidth = 0
|
--Trinket + Racial
|
||||||
local extraBarHeight = 0
|
if self.db.trinketEnabled and self.db.trinketPos == "LEFT" then
|
||||||
|
leftSize = leftSize + self.db.trinketSize * self.db.trinketWidthFactor + self.db.padding
|
||||||
|
if self.db.racialEnabled and self.db.racialAnchor == "trinket" and self.db.racialPos == "LEFT" then
|
||||||
|
leftSize = leftSize + self.db.racialSize * self.db.racialWidthFactor + self.db.padding
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self.db.trinketEnabled and self.db.trinketPos == "RIGHT" then
|
||||||
|
rightSize = rightSize + self.db.trinketSize * self.db.trinketWidthFactor + self.db.padding
|
||||||
|
if self.db.racialEnabled and self.db.racialAnchor == "trinket" and self.db.racialPos == "RIGHT" then
|
||||||
|
rightSize = rightSize + self.db.racialSize * self.db.racialWidthFactor + self.db.padding
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--ClassIcon
|
||||||
|
if self.db.classIconPos == "LEFT" then
|
||||||
|
leftSize = leftSize + self.db.classIconSize * self.db.classIconWidthFactor + self.db.padding
|
||||||
|
else
|
||||||
|
rightSize = rightSize + self.db.classIconSize * self.db.classIconWidthFactor + self.db.padding
|
||||||
|
end
|
||||||
|
--Highlight
|
||||||
|
if not self.db.highlightInset then
|
||||||
|
leftSize = leftSize + self.db.highlightBorderSize
|
||||||
|
rightSize = rightSize + self.db.highlightBorderSize
|
||||||
|
end
|
||||||
|
|
||||||
-- Powerbar
|
local margin = powerBarHeight
|
||||||
iconSize = iconSize + self.db.powerBarHeight
|
local width = self.db.barWidth + leftSize + rightSize
|
||||||
margin = margin + self.db.powerBarHeight
|
local height = (self.db.healthBarHeight + powerBarHeight) * teamSize
|
||||||
height = height + self.db.powerBarHeight * teamSize
|
+ (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2 * teamSize)
|
||||||
extraBarHeight = extraBarHeight + self.db.powerBarHeight
|
+ self.db.bottomMargin * (teamSize - 1)
|
||||||
|
|
||||||
-- Cooldown
|
-- Highlight
|
||||||
margin = margin + 1 + self.db.highlightBorderSize * 2 + 1 -- + 1 space between health and power bar
|
margin = margin + highlightBorderSize
|
||||||
height = height + self.db.highlightBorderSize * teamSize
|
|
||||||
|
|
||||||
if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then
|
if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then
|
||||||
margin = margin + self.db.cooldownSize
|
margin = margin + self.db.cooldownSize
|
||||||
height = height + self.db.cooldownSize * teamSize
|
height = height + self.db.cooldownSize * (teamSize - 1)
|
||||||
end
|
end
|
||||||
if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
||||||
margin = margin + self.db.buffsIconSize
|
margin = margin + self.db.buffsIconSize
|
||||||
height = height + self.db.buffsIconSize * teamSize
|
height = height + self.db.buffsIconSize * (teamSize - 1)
|
||||||
end
|
end
|
||||||
if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
||||||
margin = margin + self.db.buffsBuffsIconSize
|
margin = margin + self.db.buffsBuffsIconSize
|
||||||
height = height + self.db.buffsBuffsIconSize * teamSize
|
height = height + self.db.buffsBuffsIconSize * (teamSize - 1)
|
||||||
end
|
end
|
||||||
if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then
|
if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then
|
||||||
margin = margin + 1
|
margin = margin + 1
|
||||||
|
height = height + (teamSize - 1)
|
||||||
end
|
end
|
||||||
if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then
|
if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then
|
||||||
margin = margin + 1
|
margin = margin + 1
|
||||||
|
height = height + (teamSize - 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Classicon
|
-- GrowDirection
|
||||||
width = width + iconSize
|
if (self.db.growDirection == "LEFT" or self.db.growDirection == "RIGHT") then
|
||||||
extraBarWidth = extraBarWidth + iconSize
|
width = self.db.barWidth * teamSize + (leftSize + rightSize) * teamSize + self.db.bottomMargin * (teamSize - 1)
|
||||||
|
height = self.db.healthBarHeight + powerBarHeight
|
||||||
-- Trinket
|
end
|
||||||
width = width + iconSize
|
|
||||||
|
|
||||||
self.frame:SetScale(self.db.frameScale)
|
self.frame:SetScale(self.db.frameScale)
|
||||||
self.frame:SetWidth(width)
|
self.frame:SetWidth(width)
|
||||||
@ -161,61 +192,79 @@ function Gladdy:UpdateFrame()
|
|||||||
self.frame:SetPoint("CENTER")
|
self.frame:SetPoint("CENTER")
|
||||||
else
|
else
|
||||||
local scale = self.frame:GetEffectiveScale()
|
local scale = self.frame:GetEffectiveScale()
|
||||||
if (self.db.growUp) then
|
if (self.db.growDirection == "TOP") then
|
||||||
self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
||||||
else
|
else
|
||||||
self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Anchor
|
||||||
self.anchor:SetWidth(width)
|
self.anchor:SetWidth(width)
|
||||||
self.anchor:ClearAllPoints()
|
self.anchor:ClearAllPoints()
|
||||||
if (self.db.growUp) then
|
if (self.db.growDirection == "TOP") then
|
||||||
self.anchor:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
|
self.anchor:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
|
||||||
else
|
elseif self.growDirection == "BOTTOM" or self.growDirection == "RIGHT" then
|
||||||
self.anchor:SetPoint("BOTTOMLEFT", self.frame, "TOPLEFT")
|
self.anchor:SetPoint("BOTTOMLEFT", self.frame, "TOPLEFT")
|
||||||
|
else
|
||||||
|
self.anchor:SetPoint("BOTTOMRIGHT", self.frame, "TOPRIGHT")
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.db.locked) then
|
if (self.db.locked) then
|
||||||
self.anchor:Hide()
|
self.anchor:Hide()
|
||||||
self.anchor:Hide()
|
|
||||||
else
|
else
|
||||||
self.anchor:Show()
|
self.anchor:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, teamSize do
|
for i = 1, teamSize do
|
||||||
local button = self.buttons["arena" .. i]
|
local button = self.buttons["arena" .. i]
|
||||||
button:SetWidth(self.db.barWidth + extraBarWidth)
|
button:SetWidth(self.db.barWidth)
|
||||||
button:SetHeight(self.db.healthBarHeight)
|
button:SetHeight(self.db.healthBarHeight)
|
||||||
button.secure:SetWidth(self.db.barWidth + extraBarWidth)
|
button.secure:SetWidth(self.db.barWidth)
|
||||||
button.secure:SetHeight(self.db.healthBarHeight + extraBarHeight)
|
button.secure:SetHeight(self.db.healthBarHeight + powerBarHeight)
|
||||||
|
|
||||||
button:ClearAllPoints()
|
button:ClearAllPoints()
|
||||||
button.secure:ClearAllPoints()
|
button.secure:ClearAllPoints()
|
||||||
if (self.db.growUp) then
|
if (self.db.growDirection == "TOP") then
|
||||||
if (i == 1) then
|
if (i == 1) then
|
||||||
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", leftSize, powerBarHeight)
|
||||||
button.secure:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
else
|
else
|
||||||
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
||||||
button.secure:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
end
|
end
|
||||||
else
|
elseif (self.db.growDirection == "BOTTOM") then
|
||||||
if (i == 1) then
|
if (i == 1) then
|
||||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0)
|
||||||
button.secure:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
else
|
else
|
||||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
||||||
button.secure:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
|
end
|
||||||
|
elseif (self.db.growDirection == "LEFT") then
|
||||||
|
if (i == 1) then
|
||||||
|
button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -rightSize, 0)
|
||||||
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
|
else
|
||||||
|
button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", -rightSize - leftSize - self.db.bottomMargin, 0)
|
||||||
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
|
end
|
||||||
|
elseif (self.db.growDirection == "RIGHT") then
|
||||||
|
if (i == 1) then
|
||||||
|
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0)
|
||||||
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
|
else
|
||||||
|
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", leftSize + rightSize + self.db.bottomMargin, 0)
|
||||||
|
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
for k, v in self:IterModules() do
|
for _, v in self:IterModules() do
|
||||||
self:Call(v, "UpdateFrame", button.unit)
|
self:Call(v, "UpdateFrame", "arena" .. i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for k, v in self:IterModules() do
|
for _, v in self:IterModules() do
|
||||||
self:Call(v, "UpdateFrameOnce")
|
self:Call(v, "UpdateFrameOnce")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -229,7 +278,6 @@ end
|
|||||||
|
|
||||||
function Gladdy:ToggleFrame(i)
|
function Gladdy:ToggleFrame(i)
|
||||||
self:Reset()
|
self:Reset()
|
||||||
|
|
||||||
if (self.frame and self.frame:IsShown() and i == self.curBracket) then
|
if (self.frame and self.frame:IsShown() and i == self.curBracket) then
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
else
|
else
|
||||||
@ -245,6 +293,8 @@ function Gladdy:ToggleFrame(i)
|
|||||||
self:CreateButton(o)
|
self:CreateButton(o)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
self:Reset()
|
||||||
|
self.curBracket = i
|
||||||
self:UpdateFrame()
|
self:UpdateFrame()
|
||||||
self:Test()
|
self:Test()
|
||||||
self.frame:Show()
|
self.frame:Show()
|
||||||
@ -257,33 +307,44 @@ function Gladdy:CreateButton(i)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local button = CreateFrame("Frame", "GladdyButtonFrame" .. i, self.frame)
|
local button = CreateFrame("Frame", "GladdyButtonFrame" .. i, self.frame)
|
||||||
button:SetAlpha(0)
|
button:EnableMouse(false)
|
||||||
|
--button:SetAlpha(0)
|
||||||
|
--button.texture = button:CreateTexture(nil, "OVERLAY")
|
||||||
|
--button.texture:SetAllPoints(button)
|
||||||
|
--button.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||||
|
|
||||||
local secure = CreateFrame("Button", "GladdyButton" .. i, button, "SecureActionButtonTemplate")
|
local secure = CreateFrame("Button", "GladdyButton" .. i, button, "SecureActionButtonTemplate, SecureHandlerEnterLeaveTemplate")
|
||||||
secure:RegisterForClicks("AnyUp")
|
secure:RegisterForClicks("AnyUp")
|
||||||
secure:RegisterForClicks("AnyUp")
|
secure:RegisterForClicks("AnyDown")
|
||||||
secure:SetAttribute("*type1", "target")
|
|
||||||
secure:SetAttribute("*type2", "focus")
|
secure:SetAttribute("target", "arena" .. i)
|
||||||
|
secure:SetAttribute("focus", "arena" .. i)
|
||||||
secure:SetAttribute("unit", "arena" .. i)
|
secure:SetAttribute("unit", "arena" .. i)
|
||||||
|
|
||||||
button:RegisterEvent("UNIT_NAME_UPDATE")
|
--[[
|
||||||
button:RegisterEvent("ARENA_OPPONENT_UPDATE")
|
secure:SetAttribute("target", i == 1 and "player" or "focus")
|
||||||
button:RegisterEvent("ARENA_COOLDOWNS_UPDATE")
|
secure:SetAttribute("focus", i == 1 and "player" or "focus")
|
||||||
button:RegisterEvent("ARENA_CROWD_CONTROL_SPELL_UPDATE")
|
secure:SetAttribute("unit", i == 1 and "player" or "focus")
|
||||||
button:RegisterUnitEvent("UNIT_CONNECTION", "arena" .. i)
|
--]]
|
||||||
|
|
||||||
|
--secure.texture = secure:CreateTexture(nil, "OVERLAY")
|
||||||
|
--secure.texture:SetAllPoints(secure)
|
||||||
|
--secure.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||||
|
|
||||||
button.id = i
|
button.id = i
|
||||||
|
--button.unit = i == 1 and "player" or "focus"
|
||||||
button.unit = "arena" .. i
|
button.unit = "arena" .. i
|
||||||
button.secure = secure
|
button.secure = secure
|
||||||
|
|
||||||
|
|
||||||
self:ResetButton(button.unit)
|
self:ResetButton("arena" .. i)
|
||||||
|
|
||||||
self.buttons[button.unit] = button
|
self.buttons["arena" .. i] = button
|
||||||
|
|
||||||
for k, v in self:IterModules() do
|
for _, v in self:IterModules() do
|
||||||
self:Call(v, "CreateFrame", button.unit)
|
self:Call(v, "CreateFrame", "arena" .. i)
|
||||||
end
|
end
|
||||||
|
self:ResetButton("arena" .. i)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:GetAnchor(unit, position)
|
function Gladdy:GetAnchor(unit, position)
|
||||||
|
21
Gladdy.lua
21
Gladdy.lua
@ -25,7 +25,7 @@ local MAJOR, MINOR = "Gladdy", 4
|
|||||||
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
local L
|
local L
|
||||||
Gladdy.version_major_num = 1
|
Gladdy.version_major_num = 1
|
||||||
Gladdy.version_minor_num = 0.05
|
Gladdy.version_minor_num = 0.15
|
||||||
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
||||||
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
||||||
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
||||||
@ -200,6 +200,7 @@ function Gladdy:OnInitialize()
|
|||||||
self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade")
|
self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade")
|
||||||
self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade")
|
self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade")
|
||||||
self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF")
|
self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF")
|
||||||
|
self.LSM:Register("border", "Square Full White", "Interface\\AddOns\\Gladdy\\Images\\Square_FullWhite.tga")
|
||||||
|
|
||||||
L = self.L
|
L = self.L
|
||||||
|
|
||||||
@ -227,6 +228,9 @@ function Gladdy:OnInitialize()
|
|||||||
self:Call(v, "Initialize") -- B.E > A.E :D
|
self:Call(v, "Initialize") -- B.E > A.E :D
|
||||||
end
|
end
|
||||||
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||||
|
if Gladdy.db.hideBlizzard == "always" then
|
||||||
|
SetCVar("showArenaEnemyFrames", 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:OnProfileChanged()
|
function Gladdy:OnProfileChanged()
|
||||||
@ -266,6 +270,7 @@ function Gladdy:OnEnable()
|
|||||||
|
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
self:ToggleFrame(3)
|
self:ToggleFrame(3)
|
||||||
|
self.showConfig = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -285,7 +290,7 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Gladdy:Test()
|
function Gladdy:Test()
|
||||||
Gladdy.frame.testing = true
|
self.frame.testing = true
|
||||||
for i = 1, self.curBracket do
|
for i = 1, self.curBracket do
|
||||||
local unit = "arena" .. i
|
local unit = "arena" .. i
|
||||||
if (not self.buttons[unit]) then
|
if (not self.buttons[unit]) then
|
||||||
@ -312,6 +317,10 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Gladdy:PLAYER_ENTERING_WORLD()
|
function Gladdy:PLAYER_ENTERING_WORLD()
|
||||||
|
if self.showConfig then
|
||||||
|
LibStub("AceConfigDialog-3.0"):Open("Gladdy", nil, LibStub("AceConfigDialog-3.0"):SelectGroup("Gladdy", "XiconProfiles"))
|
||||||
|
self.showConfig = nil
|
||||||
|
end
|
||||||
local instance = select(2, IsInInstance())
|
local instance = select(2, IsInInstance())
|
||||||
if (instance ~= "arena" and self.frame and self.frame:IsVisible() and not self.frame.testing) then
|
if (instance ~= "arena" and self.frame and self.frame:IsVisible() and not self.frame.testing) then
|
||||||
self:Reset()
|
self:Reset()
|
||||||
@ -355,6 +364,9 @@ function Gladdy:Reset()
|
|||||||
for unit in pairs(self.buttons) do
|
for unit in pairs(self.buttons) do
|
||||||
self:ResetUnit(unit)
|
self:ResetUnit(unit)
|
||||||
end
|
end
|
||||||
|
if Gladdy.db.hideBlizzard == "never" or Gladdy.db.hideBlizzard == "arena" then
|
||||||
|
SetCVar("showArenaEnemyFrames", 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:ResetUnit(unit)
|
function Gladdy:ResetUnit(unit)
|
||||||
@ -381,7 +393,7 @@ function Gladdy:ResetButton(unit)
|
|||||||
button[k1] = nil
|
button[k1] = nil
|
||||||
elseif (type(v1) == "number") then
|
elseif (type(v1) == "number") then
|
||||||
button[k1] = 0
|
button[k1] = 0
|
||||||
elseif (type(v1) == "array") then
|
elseif (type(v1) == "table") then
|
||||||
button[k1] = {}
|
button[k1] = {}
|
||||||
elseif (type(v1) == "boolean") then
|
elseif (type(v1) == "boolean") then
|
||||||
button[k1] = false
|
button[k1] = false
|
||||||
@ -412,4 +424,7 @@ function Gladdy:JoinedArena()
|
|||||||
for i=1, self.curBracket do
|
for i=1, self.curBracket do
|
||||||
self.buttons["arena" .. i]:SetAlpha(1)
|
self.buttons["arena" .. i]:SetAlpha(1)
|
||||||
end
|
end
|
||||||
|
if Gladdy.db.hideBlizzard == "arena" or Gladdy.db.hideBlizzard == "always" then
|
||||||
|
SetCVar("showArenaEnemyFrames", 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## Interface: 20501
|
## Interface: 20501
|
||||||
## Title: Gladdy - TBC
|
## Title: Gladdy - TBC
|
||||||
## Version: 1.0.5-Beta
|
## Version: 1.15-Beta
|
||||||
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
## Author: XiconQoo, DnB_Junkee, Knall
|
||||||
## X-Email: contact me on discord Knall#1751
|
## X-Email: contact me on discord Knall#1751
|
||||||
@ -22,6 +22,7 @@ Modules\Powerbar.lua
|
|||||||
Modules\Auras.lua
|
Modules\Auras.lua
|
||||||
Modules\Castbar.lua
|
Modules\Castbar.lua
|
||||||
Modules\Classicon.lua
|
Modules\Classicon.lua
|
||||||
|
Modules\Clicks.lua
|
||||||
Modules\Diminishings.lua
|
Modules\Diminishings.lua
|
||||||
Modules\Highlight.lua
|
Modules\Highlight.lua
|
||||||
Modules\TotemPlates.lua
|
Modules\TotemPlates.lua
|
||||||
@ -34,4 +35,7 @@ Modules\VersionCheck.lua
|
|||||||
Modules\XiconProfiles.lua
|
Modules\XiconProfiles.lua
|
||||||
Modules\Pets.lua
|
Modules\Pets.lua
|
||||||
Modules\ExportImport.lua
|
Modules\ExportImport.lua
|
||||||
|
Modules\CombatIndicator.lua
|
||||||
|
Modules\RangeCheck.lua
|
||||||
|
Modules\ShadowsightTimer.lua
|
||||||
EventListener.lua
|
EventListener.lua
|
||||||
|
BIN
Images/BasicProfiles/Blizz1.blp
Normal file
BIN
Images/BasicProfiles/Blizz1.blp
Normal file
Binary file not shown.
Binary file not shown.
BIN
Images/BasicProfiles/Classic2.blp
Normal file
BIN
Images/BasicProfiles/Classic2.blp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Images/Square_FullWhite.tga
Normal file
BIN
Images/Square_FullWhite.tga
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Images/mask.blp
Normal file
BIN
Images/mask.blp
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
593
Lang.lua
593
Lang.lua
@ -1,33 +1,34 @@
|
|||||||
local setmetatable = setmetatable
|
local setmetatable = setmetatable
|
||||||
|
local C_CreatureInfo = C_CreatureInfo
|
||||||
|
|
||||||
local GetLocale = GetLocale
|
local GetLocale = GetLocale
|
||||||
|
|
||||||
local L = {}
|
local L = {}
|
||||||
|
|
||||||
|
-- Classes
|
||||||
|
L["Druid"] = C_CreatureInfo.GetClassInfo(11).className
|
||||||
|
L["Hunter"] = C_CreatureInfo.GetClassInfo(3).className
|
||||||
|
L["Mage"] = C_CreatureInfo.GetClassInfo(8).className
|
||||||
|
L["Paladin"] = C_CreatureInfo.GetClassInfo(2).className
|
||||||
|
L["Priest"] = C_CreatureInfo.GetClassInfo(5).className
|
||||||
|
L["Rogue"] = C_CreatureInfo.GetClassInfo(4).className
|
||||||
|
L["Shaman"] = C_CreatureInfo.GetClassInfo(7).className
|
||||||
|
L["Warlock"] = C_CreatureInfo.GetClassInfo(9).className
|
||||||
|
L["Warrior"] = C_CreatureInfo.GetClassInfo(1).className
|
||||||
|
|
||||||
|
-- Races
|
||||||
|
L["Human"] = C_CreatureInfo.GetRaceInfo(1).raceName
|
||||||
|
L["Orc"] = C_CreatureInfo.GetRaceInfo(2).raceName
|
||||||
|
L["Dwarf"] = C_CreatureInfo.GetRaceInfo(3).raceName
|
||||||
|
L["Night Elf"] = C_CreatureInfo.GetRaceInfo(4).raceName
|
||||||
|
L["Undead"] = C_CreatureInfo.GetRaceInfo(5).raceName
|
||||||
|
L["Tauren"] = C_CreatureInfo.GetRaceInfo(6).raceName
|
||||||
|
L["Gnome"] = C_CreatureInfo.GetRaceInfo(7).raceName
|
||||||
|
L["Troll"] = C_CreatureInfo.GetRaceInfo(8).raceName
|
||||||
|
L["Blood Elf"] = C_CreatureInfo.GetRaceInfo(10).raceName
|
||||||
|
L["Draenei"] = C_CreatureInfo.GetRaceInfo(11).raceName
|
||||||
|
|
||||||
if (GetLocale() == "ruRU") then
|
if (GetLocale() == "ruRU") then
|
||||||
-- Races
|
|
||||||
L["Human"] = "Человек"
|
|
||||||
L["Dwarf"] = "Дворф"
|
|
||||||
L["Night Elf"] = "Ночной эльф"
|
|
||||||
L["Gnome"] = "Гном"
|
|
||||||
L["Draenei"] = "Дреней"
|
|
||||||
L["Orc"] = "Орк"
|
|
||||||
L["Undead"] = "Нежить"
|
|
||||||
L["Tauren"] = "Таурен"
|
|
||||||
L["Troll"] = "Тролль"
|
|
||||||
L["Blood Elf"] = "Эльф крови"
|
|
||||||
|
|
||||||
-- Classes
|
|
||||||
L["Druid"] = "Друид"
|
|
||||||
L["Hunter"] = "Охотник"
|
|
||||||
L["Mage"] = "Маг"
|
|
||||||
L["Paladin"] = "Паладин"
|
|
||||||
L["Priest"] = "Жрец"
|
|
||||||
L["Rogue"] = "Разбойник"
|
|
||||||
L["Shaman"] = "Шаман"
|
|
||||||
L["Warlock"] = "Чернокнижник"
|
|
||||||
L["Warrior"] = "Воин"
|
|
||||||
|
|
||||||
-- Specs
|
-- Specs
|
||||||
L["Balance"] = "Баланс"
|
L["Balance"] = "Баланс"
|
||||||
L["Feral"] = "Сила зверя"
|
L["Feral"] = "Сила зверя"
|
||||||
@ -157,40 +158,7 @@ if (GetLocale() == "ruRU") then
|
|||||||
L["Color of the cast bar"] = "Цвет полосы применений"
|
L["Color of the cast bar"] = "Цвет полосы применений"
|
||||||
L["Background color"] = "Цвет фона полосы"
|
L["Background color"] = "Цвет фона полосы"
|
||||||
L["Color of the cast bar background"] = "Цвет фона полосы применений"
|
L["Color of the cast bar background"] = "Цвет фона полосы применений"
|
||||||
L["Icon position"] "Расположение значка трансляции"
|
L["Icon position"] = "Расположение значка трансляции"
|
||||||
|
|
||||||
-- Clicks.lua
|
|
||||||
L["Action #%d"] = "Действие #%d"
|
|
||||||
L["Left Click Enemy 1"] = "Левый клик по цели 1"
|
|
||||||
L["Left Click Enemy 2"] = "Левый клик по цели 2"
|
|
||||||
L["Left Click Enemy 3"] = "Левый клик по цели 3"
|
|
||||||
L["Left Click Enemy 4"] = "Левый клик по цели 4"
|
|
||||||
L["Left Click Enemy 5"] = "Левый клик по цели 5"
|
|
||||||
L["Right Click Enemy 1"] = "Правый клик по цели 1"
|
|
||||||
L["Right Click Enemy 2"] = "Правый клик по цели 2"
|
|
||||||
L["Right Click Enemy 3"] = "Правый клик по цели 3"
|
|
||||||
L["Right Click Enemy 4"] = "Правый клик по цели 4"
|
|
||||||
L["Right Click Enemy 5"] = "Правый клик по цели 5"
|
|
||||||
L["Left button"] = "Левая кнопка"
|
|
||||||
L["Right button"] = "Правая кнопка"
|
|
||||||
L["Middle button"] = "Средняя кнопка"
|
|
||||||
L["Button 4"] = "Кнопка 4"
|
|
||||||
L["Button 5"] = "Кнопка 5"
|
|
||||||
L["None"] = "Не назначено"
|
|
||||||
L["CTRL"] = "CTRL"
|
|
||||||
L["SHIFT"] = "SHIFT"
|
|
||||||
L["ALT"] = "ALT"
|
|
||||||
L["Cast Spell"] = "Применить заклинание"
|
|
||||||
L["Name"] = "Название"
|
|
||||||
L["Select the name of the click option"] = "Выбрать название опции клика"
|
|
||||||
L["Button"] = "Кнопка"
|
|
||||||
L["Select which mouse button to use"] = "Выбрать кнопку мыши для использования"
|
|
||||||
L["Modifier"] = "Модификатор"
|
|
||||||
L["Select which modifier to use"] = "Выбрать модификатор для использования"
|
|
||||||
L["Action"] = "Действите"
|
|
||||||
L["Select what action this mouse button does"] = "Выбрать действие, производимое данной кнопкой мыши"
|
|
||||||
L["Spell name / Macro text"] = "Название заклинания / Текст макроса"
|
|
||||||
L["Use *name* as unit's name. Like a '/rofl *name*'"] = "Используйте *name* в качестве имени игрока. Например, '/rofl *name*'"
|
|
||||||
|
|
||||||
-- Diminishings.lua
|
-- Diminishings.lua
|
||||||
L["DR Cooldown position"] = "Позиция ДР таймеров"
|
L["DR Cooldown position"] = "Позиция ДР таймеров"
|
||||||
@ -237,31 +205,146 @@ if (GetLocale() == "ruRU") then
|
|||||||
-- Trinket.lua
|
-- Trinket.lua
|
||||||
L["No cooldown count (OmniCC)"] = "Не показывать кулдаун (OmniCC)"
|
L["No cooldown count (OmniCC)"] = "Не показывать кулдаун (OmniCC)"
|
||||||
L["Disable cooldown timers by addons (reload UI to take effect)"] = "Отключить таймер кулдаунов для аддонов (необходима перезагрузка интерфейса)"
|
L["Disable cooldown timers by addons (reload UI to take effect)"] = "Отключить таймер кулдаунов для аддонов (необходима перезагрузка интерфейса)"
|
||||||
elseif (GetLocale() == "deDE") then
|
elseif GetLocale() == "deDE" then
|
||||||
-- Races
|
-- Announcements.lua
|
||||||
L["Human"] = "Mensch"
|
L["Announcements"] = "Meldungen"
|
||||||
L["Dwarf"] = "Zwerg"
|
L["RESURRECTING: %s (%s)"] = "Wiederbeleben: %s (%s) "
|
||||||
L["Night Elf"] = "Nachtelf"
|
L["SPEC DETECTED: %s - %s (%s)"] = "Talenspezalisierung entdeckt: %s - %s (%s)"
|
||||||
L["Gnome"] = "Gnom"
|
L["LOW HEALTH: %s (%s)"] = "Niedriges Leben: %s (%s)"
|
||||||
L["Draenei"] = "Draenei"
|
L["TRINKET USED: %s (%s)"] = "Insiginie benutzt: %s (%s)"
|
||||||
L["Orc"] = "Ork"
|
L["TRINKET READY: %s (%s)"] = "Insignie bereit: %s (%s)"
|
||||||
L["Undead"] = "Untoter"
|
L["DRINKING: %s (%s)"] = "Trinken: %s (%s)"
|
||||||
L["Tauren"] = "Taure"
|
L["Self"] = "Selbst"
|
||||||
L["Troll"] = "Тroll"
|
L["Party"] = "Gruppe"
|
||||||
L["Blood Elf"] = "Blutelf"
|
L["Raid Warning"] = "Schlachtzugwarnung"
|
||||||
|
L["Blizzard's Floating Combat Text"] = "Blizzard Kampftext"
|
||||||
|
L["Trinket used"] = "Insignie benutzt"
|
||||||
|
L["Announce when an enemy's trinket is used"] = "Warnt, wenn ein Gegner seine Insignie benutzt"
|
||||||
|
L["Trinket ready"] = "Insignie bereit"
|
||||||
|
L["Announce when an enemy's trinket is ready again"] = "Warnt wenn die Insignie eines Gegner wieder bereit ist"
|
||||||
|
L["Drinking"] = "Trinken"
|
||||||
|
L["Announces when enemies sit down to drink"] = "Warnt wenn Gegner sich zum Trinken hinsetzen"
|
||||||
|
L["Resurrection"] = "Wiederbelebung"
|
||||||
|
L["Announces when an enemy tries to resurrect a teammate"] = "Warnt wenn Gegner versuchen Teammitglieder wiederzubeleben"
|
||||||
|
L["New enemies"] = "Neue Gegner"
|
||||||
|
L["Announces when new enemies are discovered"] = "Gibt an, wenn neue Gegner entdeckt wurden"
|
||||||
|
L["Spec Detection"] = "Talent Entdeckung"
|
||||||
|
L["Announces when the spec of an enemy was detected"] = "Gibt an, wenn Talente eines Gegners entdeckt wurden"
|
||||||
|
L["Low health"] = "Wenig Leben"
|
||||||
|
L["Announces when an enemy drops below a certain health threshold"] = "Warnt, wenn das Leben eines Gegners unter einen bestimmten Prozentwert fällt"
|
||||||
|
L["Low health threshold"] = "Prozentwert: Wenig Leben"
|
||||||
|
L["Choose how low an enemy must be before low health is announced"] = "Bestimme wie wenig Leben ein Gegner haben muss, damit vor wenig Leben gewarnt wird"
|
||||||
|
L["Destination"] = "Ziel"
|
||||||
|
L["Choose how your announcements are displayed"] = "Bestimme wo Warnungen dargestellt werden"
|
||||||
|
|
||||||
-- Classes
|
-- ArenaCountDown.lua
|
||||||
L["Druid"] = "Druide"
|
L["Arena Countdown"] = "Arena Countdown"
|
||||||
L["Hunter"] = "Jäger"
|
L["Turns countdown before the start of an arena match on/off."] = ""
|
||||||
L["Mage"] = "Magier"
|
L["Size"] = "Größe"
|
||||||
L["Paladin"] = "Paladin"
|
|
||||||
L["Priest"] = "Priester"
|
|
||||||
L["Rogue"] = "Schurke"
|
|
||||||
L["Shaman"] = "Schamane"
|
|
||||||
L["Warlock"] = "Hexenmeister"
|
|
||||||
L["Warrior"] = "Krieger"
|
|
||||||
|
|
||||||
-- Specs
|
-- Auras.lua
|
||||||
|
L["Auras"] = "Auren"
|
||||||
|
L["Frame"] = "Frame"
|
||||||
|
L["Cooldown"] = "Abklingzeit"
|
||||||
|
L["No Cooldown Circle"] = "Verstecke Abklingzeitzirkel"
|
||||||
|
L["Cooldown circle alpha"] = "Abklingzeitzirkel Alpha"
|
||||||
|
L["Font"] = "Schrift"
|
||||||
|
L["Font of the cooldown"] = "Schrift der Abklingzeit"
|
||||||
|
L["Font scale"] = "Schriftskalierung"
|
||||||
|
L["Scale of the text"] = "Skalierungfaktor des Texts"
|
||||||
|
L["Font color"] = "Schriftfarbe"
|
||||||
|
L["Color of the text"] = "Farbe des Texts"
|
||||||
|
L["Border"] = "Rahmen"
|
||||||
|
L["Border style"] = "Rahmen Stil"
|
||||||
|
L["Buff color"] = "Buff Farbe"
|
||||||
|
L["Debuff color"] = "Debuff Farbe"
|
||||||
|
L["Check All"] = "Alle auswählen"
|
||||||
|
L["Uncheck All"] = "Alle abwählen"
|
||||||
|
L["Enabled"] = "Eingeschaltet"
|
||||||
|
L["Priority"] = "Priorität"
|
||||||
|
|
||||||
|
-- BuffsDebuffs.lua
|
||||||
|
L["Buffs and Debuffs"] = "Buffs und Debuffs"
|
||||||
|
L["Enabled Buffs and Debuffs module"] = "Buffs und Debuffs Modul einschalten"
|
||||||
|
L["Show CC"] = "Zeige Crowdcontrol"
|
||||||
|
L["Shows all debuffs, which are displayed on the ClassIcon as well"] = "Zeigt alle Buffs & Debuffs, die auch auf dem Klassensymbol dargestellt werden"
|
||||||
|
L["Buffs"] = "Buffs"
|
||||||
|
L["Size & Padding"] = "Größe und Abstand"
|
||||||
|
L["Icon Size"] = "Symbol Größe"
|
||||||
|
L["Size of the DR Icons"] = "Größe der DR Symbole"
|
||||||
|
L["Icon Width Factor"] = "Symbol Breitenfaktor"
|
||||||
|
L["Stretches the icon"] = "Streckt das Symbol"
|
||||||
|
L["Icon Padding"] = "Symbol Abstand"
|
||||||
|
L["Space between Icons"] = "Abstand zwischen den Symbolen"
|
||||||
|
L["Position"] = "Position"
|
||||||
|
L["Aura Position"] = "Aura Position"
|
||||||
|
L["Position of the aura icons"] = "Position der Aura Symbole"
|
||||||
|
L["Top"] = "Oben"
|
||||||
|
L["Bottom"] = "Unten"
|
||||||
|
L["Left"] = "Links"
|
||||||
|
L["Right"] = "Rechts"
|
||||||
|
L["Grow Direction"] = "Richtung"
|
||||||
|
L["Grow Direction of the aura icons"] = "In welche Richtung die Symbole wachsen"
|
||||||
|
L["Horizontal offset"] = "Horizontaler Offset"
|
||||||
|
L["Vertical offset"] = "Vertikaler Offset"
|
||||||
|
L["Alpha"] = "Alpha"
|
||||||
|
L["Debuffs"] = "Debuffs"
|
||||||
|
L["Dynamic Timer Color"] = "Dynamische Textfarbe"
|
||||||
|
L["Show dynamic color on cooldown numbers"] = "Verändert die Farbe des Textes dynamisch"
|
||||||
|
L["Color of the cooldown timer and stacks"] = "Farbe der Abklingzeit und Stapel"
|
||||||
|
L["Spell School Colors"] = "Zauberart Farbe"
|
||||||
|
L["Spell School Colors Enabled"] = "Zauberart Farbe Eingeschaltet"
|
||||||
|
L["Show border colors by spell school"] = "Färbt den Rahmen entspechend der Zauberart"
|
||||||
|
L["Curse"] = "Fluch"
|
||||||
|
L["Color of the border"] = "Farbe des Rahmens"
|
||||||
|
L["Magic"] = "Magie"
|
||||||
|
L["Poison"] = "Gift"
|
||||||
|
L["Physical"] = "Physisch"
|
||||||
|
L["Immune"] = "Immun"
|
||||||
|
L["Disease"] = "Erkrankung"
|
||||||
|
L["Aura"] = "Aura"
|
||||||
|
L["Form"] = "Form"
|
||||||
|
|
||||||
|
-- Castbar.lua
|
||||||
|
L["Cast Bar"] = "Zauberleiste"
|
||||||
|
L["Bar"] = "Balken"
|
||||||
|
L["Bar Size"] = "Balken Größe"
|
||||||
|
L["Bar height"] = "Balken Höhe"
|
||||||
|
L["Height of the bar"] = "Höhe des Balken"
|
||||||
|
L["Bar width"] = "Balken Weite"
|
||||||
|
L["Width of the bars"] = "Weite des Balken"
|
||||||
|
L["Texture"] = "Textur"
|
||||||
|
L["Bar texture"] = "Balken Textur"
|
||||||
|
L["Texture of the bar"] = "Textur des Balken"
|
||||||
|
L["Bar color"] = "Balken Farbe"
|
||||||
|
L["Color of the cast bar"] = "Farbe des Balken"
|
||||||
|
L["Background color"] = "Hintergrundfarbe"
|
||||||
|
L["Color of the cast bar background"] = "Hinergrundfarbe des Zauberbalkens"
|
||||||
|
L["Border size"] = "Rahmen Größe"
|
||||||
|
L["Status Bar border"] = "Balken Rahmen"
|
||||||
|
L["Status Bar border color"] = "Balken Rahmen Farbe"
|
||||||
|
L["Icon"] = "Symbol"
|
||||||
|
L["Icon size"] = "Symbolgröße"
|
||||||
|
L["Icon border"] = "Symbolrahmen"
|
||||||
|
L["Icon border color"] = "Farbe Symbolrahmen"
|
||||||
|
L["Spark"] = "Funke"
|
||||||
|
L["Spark enabled"] = "Funke eingeschaltet"
|
||||||
|
L["Spark color"] = "Funkenfarbe"
|
||||||
|
L["Color of the cast bar spark"] = "Farbe des Zauberleisten Funke"
|
||||||
|
L["Font of the castbar"] = "Schriftart der Zauberleiste"
|
||||||
|
L["Font size"] = "Schriftgröße"
|
||||||
|
L["Size of the text"] = "Schriftgröße"
|
||||||
|
L["Format"] = "Darstellung"
|
||||||
|
L["Timer Format"] = "Zeitdarstellung"
|
||||||
|
L["Remaining"] = "Verbleibend"
|
||||||
|
L["Total"] = "Total"
|
||||||
|
L["Both"] = "Beides"
|
||||||
|
L["Castbar position"] = "Zauberleistenposition"
|
||||||
|
L["Icon position"] = "Symbolposition"
|
||||||
|
L["Offsets"] = "Offsets"
|
||||||
|
|
||||||
|
-- Classicon.lua
|
||||||
|
L["Class Icon"] = "Klassensymbol"
|
||||||
L["Balance"] = "Gleichgewicht"
|
L["Balance"] = "Gleichgewicht"
|
||||||
L["Feral"] = "Wilder Kampf"
|
L["Feral"] = "Wilder Kampf"
|
||||||
L["Restoration"] = "Wiederherstellung"
|
L["Restoration"] = "Wiederherstellung"
|
||||||
@ -286,6 +369,145 @@ elseif (GetLocale() == "deDE") then
|
|||||||
L["Destruction"] = "Zerstörung"
|
L["Destruction"] = "Zerstörung"
|
||||||
L["Arms"] = "Waffen"
|
L["Arms"] = "Waffen"
|
||||||
L["Fury"] = "Furor"
|
L["Fury"] = "Furor"
|
||||||
|
L["Show Spec Icon"] = "Zeige Spezialisierungssymbol"
|
||||||
|
L["Shows Spec Icon once spec is detected"] = "Zeigt das Talentspezialisierungs Symbol sobald die Spezialisierung erkannt wurde"
|
||||||
|
L["Icon width factor"] = "Symbol Breitenfaktor"
|
||||||
|
L["This changes positions with trinket"] = "Das tauscht die Position mit dem Trinket, wenn auf der gleichen Seite."
|
||||||
|
L["Border color"] = "Rahmenfarbe"
|
||||||
|
|
||||||
|
--CombatIndicator.lua
|
||||||
|
L["Combat Indicator"] = "Kampfindikator"
|
||||||
|
L["Enable Combat Indicator icon"] = "Schalte Kampfindikator ein"
|
||||||
|
L["Anchor"] = "Anker"
|
||||||
|
L["This changes the anchor of the ci icon"] = "Dies ändert den Anker des Kampfindikatorsymbols"
|
||||||
|
L["This changes position relative to its anchor of the ci icon"] = "Dies ändert die Position relativ zum Anker"
|
||||||
|
|
||||||
|
-- Cooldowns.lua
|
||||||
|
L["Cooldowns"] = "Abklingzeiten"
|
||||||
|
L["Enabled cooldown module"] = ""
|
||||||
|
L["Cooldown size"] = "Abklingzeit Größe"
|
||||||
|
L["Size of each cd icon"] = "Größe eines einzelnen Symbols"
|
||||||
|
L["Max Icons per row"] = "Maximale Anzahl an Symbolen pro Reihe"
|
||||||
|
L["Scale of the font"] = "Skalierung der Schrift"
|
||||||
|
L["Anchor of the cooldown icons"] = "Anker der Abklingzeiten Symbole"
|
||||||
|
L["Grow Direction of the cooldown icons"] = "Richtung der Abklingzeiten Symbole"
|
||||||
|
L["Offset"] = "Offset"
|
||||||
|
|
||||||
|
-- Diminishings.lua
|
||||||
|
L["Diminishings"] = "DR"
|
||||||
|
L["Enabled DR module"] = "DR einschalten"
|
||||||
|
L["DR Cooldown position"] = "DR Position"
|
||||||
|
L["Position of the cooldown icons"] = "Position der Symbole"
|
||||||
|
L["DR Border Colors"] = "DR Rahmen Farbe"
|
||||||
|
L["Dr Border Colors Enabled"] = "DR Rahmen Farben eingeschaltet"
|
||||||
|
L["Colors borders of DRs in respective DR-color below"] = "Färbt die Rahmen der DR Symbole je nach Stärke der Verminderung"
|
||||||
|
L["Half"] = "Hälfte"
|
||||||
|
L["Quarter"] = "Viertel"
|
||||||
|
L["Categories"] = "Kategorien"
|
||||||
|
L["Force Icon"] = "Erzwinge Symbol"
|
||||||
|
L["Icon of the DR"] = "Symbol des DR"
|
||||||
|
|
||||||
|
-- ExportImport.lua
|
||||||
|
L["Export Import"] = "Exportieren Importieren"
|
||||||
|
L["Profile Export Import"] = "Profile Exportieren Importieren"
|
||||||
|
|
||||||
|
-- Healthbar.lua
|
||||||
|
L["Health Bar"] = "Lebensbalken"
|
||||||
|
L["DEAD"] = "TOT"
|
||||||
|
L["LEAVE"] = "VERLASSEN"
|
||||||
|
L["General"] = "Allgemein"
|
||||||
|
L["Color of the status bar background"] = "Farbe des Balkenhintergrunds"
|
||||||
|
L["Font of the bar"] = "Schriftart des Balken"
|
||||||
|
L["Name font size"] = "Schriftgröße des Namen"
|
||||||
|
L["Size of the name text"] = "Schriftgröße des Namen"
|
||||||
|
L["Health font size"] = "Schriftgröße der Gesundheit"
|
||||||
|
L["Size of the health text"] = "Schriftgröße der Gesundheit"
|
||||||
|
L["Size of the border"] = "Rahmengröße"
|
||||||
|
L["Health Bar Text"] = "Lebensbalken Text"
|
||||||
|
L["Show name text"] = "Namen zeigen"
|
||||||
|
L["Show the units name"] = "Zeige den Namen des Gegners"
|
||||||
|
L["Show ArenaX"] = "ArenaX zeigen"
|
||||||
|
L["Show Arena1-5 as name instead"] = "Zeigt Arena1-5 anstatt des Namens"
|
||||||
|
L["Show the actual health"] = "Zeige die momentane Gesundheit"
|
||||||
|
L["Show the actual health on the health bar"] = "Zeigt die momentane Gesundheit"
|
||||||
|
L["Show max health"] = "Zeige maximale Gesundheit"
|
||||||
|
L["Show max health on the health bar"] = "Zeige maximale Gesundheit"
|
||||||
|
L["Show health percentage"] = "Zeige Prozentwert"
|
||||||
|
L["Show health percentage on the health bar"] = "Zeige Prozentwert der Gesundheit"
|
||||||
|
|
||||||
|
-- Highlight.lua
|
||||||
|
L["Highlight"] = "Hervorhebung"
|
||||||
|
L["Show Inside"] = "Zeige innen"
|
||||||
|
L["Show Highlight border inside of frame"] = "Zeige die Hervorhebung innerhalb des Frames"
|
||||||
|
L["Colors"] = "Farben"
|
||||||
|
L["Target border color"] = "Rahmenfarbe deines Ziels"
|
||||||
|
L["Color of the selected targets border"] = "Rahmenfarbe deines momentanen Ziels"
|
||||||
|
L["Focus border color"] = "Rahmenfarbe deines Fokus"
|
||||||
|
L["Color of the focus border"] = "Rahmenfarbe deines momentanen Fokus"
|
||||||
|
L["Highlight target"] = "Hervorhebung des Ziels"
|
||||||
|
L["Toggle if the selected target should be highlighted"] = "Ziel hervorheben ein/ausschalten"
|
||||||
|
L["Show border around target"] = "Zeige Rahmen um dein Ziel"
|
||||||
|
L["Toggle if a border should be shown around the selected target"] = "Zeigt Rahmen um dein momentanes Ziel"
|
||||||
|
L["Show border around focus"] = "Zeige Rahmen um dein Fokus"
|
||||||
|
L["Toggle of a border should be shown around the current focus"] = "Zeigt Rahmen um dein Fokusziel"
|
||||||
|
|
||||||
|
-- Pets.lua
|
||||||
|
L["Pets"] = "Begleiter"
|
||||||
|
L["Enables Pets module"] = "Schaltet das Begleiter Modul ein"
|
||||||
|
L["Width of the bar"] = "Breite des Balkens"
|
||||||
|
L["Health color"] = "Gesundheitsfarbe"
|
||||||
|
L["Color of the status bar"] = "Farbe des Balkens"
|
||||||
|
L["Portrait"] = "Portrait"
|
||||||
|
L["Health Values"] = "Gesundheitswerte"
|
||||||
|
|
||||||
|
-- Powerbar.lua
|
||||||
|
L["Power Bar"] = "Mana/Energie Balken"
|
||||||
|
L["Power Bar Text"] = "Mana/Energie Balken Text"
|
||||||
|
L["Power Texts"] = "Mana/Energie Balken Texte"
|
||||||
|
L["Show race"] = "Rasse zeigen"
|
||||||
|
L["Show spec"] = "Spezialisierung zeigen"
|
||||||
|
L["Show the actual power"] = "Zeige das momentane Mana"
|
||||||
|
L["Show the actual power on the power bar"] = "Zeige das momentane Mana"
|
||||||
|
L["Show max power"] = "Zeige das maximale Mana"
|
||||||
|
L["Show max power on the power bar"] = "Zeige das maximale Mana"
|
||||||
|
L["Show power percentage"] = "Zeige Prozentwert"
|
||||||
|
L["Show power percentage on the power bar"] = "Zeige Prozentwert"
|
||||||
|
|
||||||
|
-- Racial.lua
|
||||||
|
L["Racial"] = "Rassenfertigkeit"
|
||||||
|
L["Enable racial icon"] = "Rassenfertigkeit einschalten"
|
||||||
|
L["This changes the anchor of the racial icon"] = "Dies ändert den Anker des Rassenfertigkeitssymbols"
|
||||||
|
L["This changes position relative to its anchor of the racial icon"] = "Dies ändert doe Position relativ zu seinem Anker"
|
||||||
|
|
||||||
|
-- TotemPlates.lua
|
||||||
|
L["Totem Plates"] = "Totem Symbole"
|
||||||
|
L["Customize Totems"] = "Individuelle Totemeinstellungen"
|
||||||
|
L["Custom totem name"] = "Individueller Totem Name"
|
||||||
|
L["Totem General"] = "Totems Allgemein"
|
||||||
|
L["Turns totem icons instead of nameplates on or off. (Requires reload)"] = ""
|
||||||
|
L["Show friendly"] = "Zeige für freundliche"
|
||||||
|
L["Show enemy"] = "Zeige für feindliche"
|
||||||
|
L["Totem size"] = "Totem Größe"
|
||||||
|
L["Size of totem icons"] = "Größe der Totemsymbole"
|
||||||
|
L["Font of the custom totem name"] = "Schriftart der benutzerdefinierten Totem Namen"
|
||||||
|
L["Apply alpha when no target"] = "Wende den Alpha-Wert an, wenn kein Ziel anvisiert ist"
|
||||||
|
L["Always applies alpha, even when you don't have a target. Else it is 1."] = "Alpha immer anwenden, auch wenn man kein Ziel anvisiert hat. Sonst ist der Alpha-Wert 1"
|
||||||
|
L["Apply alpha when targeted"] = "Wende den Alpha-Wert an, wenn das Totem als Ziel anvisiert ist"
|
||||||
|
L["Always applies alpha, even when you target the totem. Else it is 1."] = "Alpha immer anwenden, auch wenn das Totem als Ziel anvisiert ist. Sonst ist der Alpha-Wert 1"
|
||||||
|
L["All totem border alphas (configurable per totem)"] = "Alpha aller Totems"
|
||||||
|
L["Totem icon border style"] = "Totem Rahmenstil"
|
||||||
|
L["All totem border color"] = "Rahmenfarbe aller Totems"
|
||||||
|
|
||||||
|
-- Trinket.lua
|
||||||
|
L["Trinket"] = "Insignie"
|
||||||
|
L["Enable trinket icon"] = "Insignie einschalten"
|
||||||
|
L["This changes positions of the trinket"] = "Dies ändert die Position der Insignie"
|
||||||
|
|
||||||
|
-- XiconProfiles.lua
|
||||||
|
L["Profile"] = "Profil"
|
||||||
|
|
||||||
|
-- Frame.lua
|
||||||
|
L["Gladdy - drag to move"] = "Gladdy - ziehe um zu bewegen"
|
||||||
|
|
||||||
-- Gladdy.lua
|
-- Gladdy.lua
|
||||||
L["Welcome to Gladdy!"] = "Willkommen bei Gladdy!"
|
L["Welcome to Gladdy!"] = "Willkommen bei Gladdy!"
|
||||||
@ -293,185 +515,50 @@ elseif (GetLocale() == "deDE") then
|
|||||||
L["Valid slash commands are:"] = "Gültige slash Befehle sind:"
|
L["Valid slash commands are:"] = "Gültige slash Befehle sind:"
|
||||||
L["If this is not your first run please lock or move the frame to prevent this from happening."] = "Wenn dies nicht dein erster Start ist, sperre oder bewege das Bild um diese Meldung zu verhindern."
|
L["If this is not your first run please lock or move the frame to prevent this from happening."] = "Wenn dies nicht dein erster Start ist, sperre oder bewege das Bild um diese Meldung zu verhindern."
|
||||||
|
|
||||||
-- Frame.lua
|
|
||||||
L["Gladdy - drag to move"] = "Gladdy - ziehe um zu bewegen"
|
|
||||||
|
|
||||||
-- Options.lua
|
-- Options.lua
|
||||||
L["Announcements"] = "Meldungen"
|
L["settings"] = "Einstellungen"
|
||||||
L["Announcement settings"] = "Meldungseinstellungen"
|
L["Reset module"] = "Modul zurücksetzen"
|
||||||
L["Auras"] = "Auren"
|
L["Reset module to defaults"] = "Setze das Modul auf seine Standardwerte zurück"
|
||||||
L["Auras settings"] = "Aureneinstellungen"
|
|
||||||
L["Castbar"] = "Zauberleiste"
|
|
||||||
L["Castbar settings"] = "Zauberleisteneinstellungen"
|
|
||||||
L["Classicon"] = "Klassensymbol"
|
|
||||||
L["Classicon settings"] = "Klassensymboleinstellungen"
|
|
||||||
L["Clicks"] = "Klicks"
|
|
||||||
L["Clicks settings"] = "Klickeinstellungen"
|
|
||||||
L["Diminishings"] = "DR"
|
|
||||||
L["Diminishings settings"] = "DR Einstellungen"
|
|
||||||
L["Healthbar"] = "Lebensleiste"
|
|
||||||
L["Healthbar settings"] = "Lebensleisteneinstellungen"
|
|
||||||
L["Highlight"] = "warnung"
|
|
||||||
L["Highlight settings"] = "Warnungseinstellungen"
|
|
||||||
L["Nameplates"] = "Namensplaketten"
|
|
||||||
L["Nameplates settings"] = "Namensplaketteneinstellungen"
|
|
||||||
L["Powerbar"] = "Powerleiste"
|
|
||||||
L["Powerbar settings"] = "Powerleisteneinstellungen"
|
|
||||||
L["Score"] = "Score"
|
|
||||||
L["Score settings"] = "Scoreeinstellungen"
|
|
||||||
L["Trinket"] = "Insignie"
|
|
||||||
L["Trinket settings"] = "Insignieneinstellungen"
|
|
||||||
L["Reset module"] = "Model zurücksetzen"
|
|
||||||
L["Reset module to defaults"] = "Modul auf Standardeinstellungen zurücksetzen"
|
|
||||||
L["No settings"] = "Keine Einstellungen"
|
L["No settings"] = "Keine Einstellungen"
|
||||||
L["Module has no settings"] = "Modul hat keine Einstellungen"
|
L["Module has no settings"] = "Modul hat keine Einstellungen"
|
||||||
L["General"] = "ОAllgemein"
|
|
||||||
L["General settings"] = "Allgemeine Einstellungen"
|
L["General settings"] = "Allgemeine Einstellungen"
|
||||||
L["Lock frame"] = "Sperre Bild"
|
L["Lock frame"] = "Sperre Frame"
|
||||||
L["Toggle if frame can be moved"] = "Aktivieren falls das Bild bewegt werden kann"
|
L["Toggle if frame can be moved"] = "Aktivieren falls das Frame bewegt werden kann"
|
||||||
L["Grow frame upwards"] = "Bild von unten nach oben aufbauen"
|
L["Grow frame upwards"] = "Frame von unten nach oben aufbauen"
|
||||||
L["If enabled the frame will grow upwards instead of downwards"] = "Falls aktiviert, wird das Bild von unten nach oben aufgebaut"
|
L["If enabled the frame will grow upwards instead of downwards"] = "Falls aktiviert, wird das Frame von unten nach oben aufgebaut"
|
||||||
L["Frame scale"] = "Bildskalierung"
|
L["Down"] = "Runter"
|
||||||
L["Scale of the frame"] = "Skalierung des Bildes"
|
L["Up"] = "Hoch"
|
||||||
L["Frame padding"] = "Bild Unterlage"
|
L["Frame General"] = "Frame Allgemein"
|
||||||
L["Padding of the frame"] = "Unterlage des Bildes"
|
L["Frame scale"] = "Frame Skalierung"
|
||||||
L["Frame color"] = "Bildfarbe"
|
L["Scale of the frame"] = "Skalierung des Frames"
|
||||||
L["Color of the frame"] = "Farbe des Bildes"
|
L["Frame padding"] = "Symbolabstand"
|
||||||
L["Bar width"] = "Leistenbreite"
|
L["Padding of the frame"] = "Abstand zwischen den Elementen des Frames"
|
||||||
L["Width of the bars"] = "Breite der Leisten"
|
L["Frame width"] = "Frame Breite"
|
||||||
L["Bottom margin"] = "Unterer Abstand"
|
L["Margin"] = "Frame Abstand"
|
||||||
L["Margin between each button"] = "Abstand zwischen jedem Buttom"
|
L["Margin between each button"] = "Abstand zwischen den Arena Einheiten"
|
||||||
|
L["Cooldown General"] = "Abklingzeiten Allgemein"
|
||||||
-- Announcements.lua
|
L["Font General"] = "Schriftart Allgemein"
|
||||||
L["RESURRECTING: %s (%s)"] = "Wiederbeleben: %s (%s) "
|
L["General Font"] = "Allgemeine Schriftart"
|
||||||
L["SPEC DETECTED: %s - %s (%s)"] = "Talenspezalisierung entdeckt: %s - %s (%s)"
|
L["Font color text"] = "Schriftfarbe von text"
|
||||||
L["LOW HEALTH: %s (%s)"] = "Niedriges Leben: %s (%s)"
|
L["Font color timer"] = "Schriftfarbe von Abklingzeiten"
|
||||||
L["TRINKET USED: %s (%s)"] = "Insiginie benutzt: %s (%s)"
|
L["Color of the timers"] = "Farbe der Abklingzeiten"
|
||||||
L["TRINKET READY: %s (%s)"] = "Insignie bereit: %s (%s)"
|
L["Icons General"] = "Symbol Allgemein"
|
||||||
L["DRINKING: %s (%s)"] = "Trinken: %s (%s)"
|
L["Icon border style"] = "Rahmenstil"
|
||||||
L["Self"] = "Selbst"
|
L["This changes the border style of all icons"] = "Dies ändert den Rahmenstil aller Symbole"
|
||||||
L["Party"] = "Gruppe"
|
L["This changes the border color of all icons"] = "Dies ändert die Rahmenfarbe aller Symbole"
|
||||||
L["Raid Warning"] = "Schlachtzugwarnung"
|
L["Statusbar General"] = "Balken Allgemein"
|
||||||
L["Blizzard's Floating Combat Text"] = "Blizzard Kampftext"
|
L["Statusbar texture"] = "Balken Textur"
|
||||||
L["MikScrollingBattleText"] = "MikScrollingBattleText"
|
L["This changes the texture of all statusbar frames"] = "Dies ändert die Textur aller Balken"
|
||||||
L["Scrolling Combat Text"] = "Scrolling Combat Text"
|
L["Statusbar border style"] = "Balken Rahmenstil"
|
||||||
L["Parrot"] = "Parrot"
|
L["This changes the border style of all statusbar frames"] = "Dies ändert den Rahmenstil aller Balken"
|
||||||
L["Drinking"] = "Trinken"
|
L["Statusbar border offset divider (smaller is higher offset)"] = "Rahmenstil offset Quotient"
|
||||||
L["Announces when enemies sit down to drink"] = "Warnt wenn Gegner sich zum Trinken hinsetzen"
|
L["Offset of border to statusbar (in case statusbar shows beyond the border)"] = "Offset des Rahmens zur Statusbar (falls der Balken hinter dem Rahmen erscheint)"
|
||||||
L["Resurrection"] = "Wiederbelebung"
|
L["Statusbar border color"] = "Balken Rahmenfarbe"
|
||||||
L["Announces when an enemy tries to resurrect a teammate"] = "Warnt wenn Gegner versuchen Teammitglieder wiederzubeleben"
|
L["This changes the border color of all statusbar frames"] = "Dies ändert die Rahmenfarbe aller Balken"
|
||||||
L["New enemies"] = "Neue Gegner"
|
|
||||||
L["Announces when new enemies are discovered"] = "Gibt an, wenn neue Gegner entdeckt wurden"
|
|
||||||
L["Spec Detection"] = "Talent Entdeckung"
|
|
||||||
L["Announces when the spec of an enemy was detected"] = "Gibt an, wenn Talente eines Gegners entdeckt wurden"
|
|
||||||
L["Low health"] = "Wenig Leben"
|
|
||||||
L["Announces when an enemy drops below a certain health threshold"] = "Warnt, wenn das Leben eines Gegners unter einen bestimmten Prozentwert fällt"
|
|
||||||
L["Low health threshold"] = "Prozentwert: Wenig Leben"
|
|
||||||
L["Choose how low an enemy must be before low health is announced"] = "Bestimme wie wenig Leben ein Gegner haben muss, damit vor wenig Leben gewarnt wird"
|
|
||||||
L["Trinket used"] = "Insignie benutzt"
|
|
||||||
L["Announce when an enemy's trinket is used"] = "Warnt, wenn ein Gegner seine Insignie benutzt"
|
|
||||||
L["Trinket ready"] = "Insignie bereit"
|
|
||||||
L["Announce when an enemy's trinket is ready again"] = "Warnt wenn die Insignie eines Gegner wieder bereit ist"
|
|
||||||
L["Destination"] = "Ziel"
|
|
||||||
L["Choose how your announcements are displayed"] = "Bestimme wo Warnungen dargestellt werden"
|
|
||||||
|
|
||||||
-- Auras.lua
|
|
||||||
L["Font color"] = "Schriftfarbe"
|
|
||||||
L["Color of the text"] = "Farbe der Schrift"
|
|
||||||
L["Font size"] = "Schriftgröße"
|
|
||||||
L["Size of the text"] = "Größe der Schrift"
|
|
||||||
|
|
||||||
-- Castbar.lua
|
|
||||||
L["Bar height"] = "Leistenhöhe"
|
|
||||||
L["Height of the bar"] = "Höhe der Leiste"
|
|
||||||
L["Bar texture"] = "Leistentextur"
|
|
||||||
L["Texture of the bar"] = "Textur der Leiste"
|
|
||||||
L["Bar color"] = "Leistenfarbe"
|
|
||||||
L["Color of the cast bar"] = "Farbe der Zauberleiste"
|
|
||||||
L["Background color"] = "Hintergrundfarbe"
|
|
||||||
L["Color of the cast bar background"] = "Hintergrundfarbe der Zauberleiste"
|
|
||||||
L["Icon position"] "Position des Zauberleistensymbols"
|
|
||||||
|
|
||||||
-- Clicks.lua
|
|
||||||
L["Action #%d"] = "Aktion #%d"
|
|
||||||
L["Left Click Enemy 1"] = "Linksklick Gegner 1"
|
|
||||||
L["Left Click Enemy 2"] = "Linksklick Gegner 2"
|
|
||||||
L["Left Click Enemy 3"] = "Linksklick Gegner 3"
|
|
||||||
L["Left Click Enemy 4"] = "Linksklick Gegner 4"
|
|
||||||
L["Left Click Enemy 5"] = "Linksklick Gegner 5"
|
|
||||||
L["Right Click Enemy 1"] = "Rechtsklick Gegner 1"
|
|
||||||
L["Right Click Enemy 2"] = "Rechtsklick Gegner 2"
|
|
||||||
L["Right Click Enemy 3"] = "Rechtsklick Gegner 3"
|
|
||||||
L["Right Click Enemy 4"] = "Rechtsklick Gegner 4"
|
|
||||||
L["Right Click Enemy 5"] = "Rechtsklick Gegner 5"
|
|
||||||
L["Left button"] = "Linke Taste"
|
|
||||||
L["Right button"] = "Rechte Taste"
|
|
||||||
L["Middle button"] = "Mittlere Taste"
|
|
||||||
L["Button 4"] = "Maus 4"
|
|
||||||
L["Button 5"] = "Maus 5"
|
|
||||||
L["None"] = "Keine"
|
|
||||||
L["CTRL"] = "STRG"
|
|
||||||
L["SHIFT"] = "SHIFT"
|
|
||||||
L["ALT"] = "ALT"
|
|
||||||
L["Cast Spell"] = "Wirke Zauber"
|
|
||||||
L["Name"] = "Name"
|
|
||||||
L["Select the name of the click option"] = "Wähle einen Namen für die Klickoption"
|
|
||||||
L["Button"] = "Taste"
|
|
||||||
L["Select which mouse button to use"] = "Wähle welche Maustaste genutzt werden soll"
|
|
||||||
L["Modifier"] = "Modifier"
|
|
||||||
L["Select which modifier to use"] = "Wähle welcher Modifier benutzt werdne soll"
|
|
||||||
L["Action"] = "Aktion"
|
|
||||||
L["Select what action this mouse button does"] = "Wähle welche Aktion die Maustaste durchführt"
|
|
||||||
L["Spell name / Macro text"] = "Zaubername / Makrotext"
|
|
||||||
L["Use *name* as unit's name. Like a '/rofl *name*'"] = "Benutzt *name* als Gegnername. Zum Beispiel '/rofl *name*'"
|
|
||||||
|
|
||||||
-- Diminishings.lua
|
|
||||||
L["DR Cooldown position"] = "Position des DR Cooldowns"
|
|
||||||
L["Position of the cooldown icons"] = "Position des DR Cooldowns"
|
|
||||||
L["Left"] = "Links"
|
|
||||||
L["Right"] = "Rechts"
|
|
||||||
L["Icon Size"] = "Symbolgröße"
|
|
||||||
L["Size of the DR Icons"] = "Größe des DR Symbols"
|
|
||||||
|
|
||||||
-- Healthbar.lua
|
|
||||||
L["Show the actual health"] = "Zeige das Leben an"
|
|
||||||
L["Show the actual health on the health bar"] = "Zeige das Leben auf der Lebensanzeige an"
|
|
||||||
L["Show max health"] = "Zeige Maximalleben an"
|
|
||||||
L["Show max health on the health bar"] = "Zeige Maximalleben auf der Lebensanzeige an"
|
|
||||||
L["Show health percentage"] = "Zeige prozentuales Leben"
|
|
||||||
L["Show health percentage on the health bar"] = "Zeige prozentuales Leben auf der Lebensanzeige an"
|
|
||||||
|
|
||||||
-- Highlight.lua
|
|
||||||
L["Border size"] = "Rahmengröße"
|
|
||||||
L["Target border color"] = "Zielrahmenfarbe"
|
|
||||||
L["Color of the selected targets border"] = "Farbe des Rahmens des gewählten Ziels"
|
|
||||||
L["Focus border color"] = "Focusrahmenfarbe"
|
|
||||||
L["Color of the focus border"] = "Farbe des Focusrahmens"
|
|
||||||
L["Raid leader border color"] = "Schlachtzugleiterrahmenfarbe"
|
|
||||||
L["Color of the raid leader border"] = "Farbe des Rahmens für den Schlachtzugleiter"
|
|
||||||
L["Highlight target"] = "Highlight Ziel"
|
|
||||||
L["Toggle if the selected target should be highlighted"] = "Включите, если необходима подсветка цели"
|
|
||||||
L["Show border around target"] = "Zeige Rahmen um das Ziel an"
|
|
||||||
L["Toggle if a border should be shown around the selected target"] = "Auswählen wenn ein Ramhen um das ausgewählte Ziel angezeigt werden soll"
|
|
||||||
L["Show border around focus"] = "Zeige Rahmen um Focus"
|
|
||||||
L["Toggle of a border should be shown around the current focus"] = "Auswählen wenn ein Ramhen um das ausgewählte Focusziel angezeigt werden soll"
|
|
||||||
L["Show border around raid leader"] = "Zeige Rahmen um Schlachtzugleiter"
|
|
||||||
L["Toggle if a border should be shown around the raid leader"] = "Auswählen wenn ein Ramhen um den ausgewählten SChlachtzugleiter angezeigt werden soll"
|
|
||||||
|
|
||||||
-- Powerbar.lua
|
|
||||||
L["Show the actual power"] = "Zeige genaue Power"
|
|
||||||
L["Show the actual power on the power bar"] = "Zeige die genaue Power in der Powerleiste "
|
|
||||||
L["Show max power"] = "Zeige Maximalpower"
|
|
||||||
L["Show max power on the power bar"] = "Zeige Maximalpower in der Powerbau"
|
|
||||||
L["Show power percentage"] = "Zeige prozentuale Power"
|
|
||||||
L["Show power percentage on the power bar"] = "Zeige prozentuale Power in der Powerbau"
|
|
||||||
L["Color of the status bar background"] = "Hintergrundfarbe der Statusleiste"
|
|
||||||
|
|
||||||
-- Trinket.lua
|
|
||||||
L["No cooldown count (OmniCC)"] = "Keine Cooldownanzeige (OmniCC)"
|
|
||||||
L["Disable cooldown timers by addons (reload UI to take effect)"] = "Deaktiviere Cooldownanzeige durch Addons (UI neu laden um zu wirken)"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Superhack allowing use key as value if not present in table
|
-- Superhack allowing use key as value if not present in table
|
||||||
LibStub("Gladdy").L = setmetatable(L, {
|
LibStub("Gladdy").L = setmetatable(L, {
|
||||||
__index = function(t, k)
|
__index = function(t, k)
|
||||||
|
@ -6,8 +6,6 @@ assert(LibStub, string.format("%s requires LibStub.", major))
|
|||||||
local Data = LibStub:NewLibrary(major, minor)
|
local Data = LibStub:NewLibrary(major, minor)
|
||||||
if( not Data ) then return end
|
if( not Data ) then return end
|
||||||
|
|
||||||
if( IS_WRATH_BUILD == nil ) then IS_WRATH_BUILD = (select(4, GetBuildInfo()) >= 30000) end
|
|
||||||
|
|
||||||
-- How long before DR resets
|
-- How long before DR resets
|
||||||
Data.RESET_TIME = 18
|
Data.RESET_TIME = 18
|
||||||
|
|
||||||
@ -234,42 +232,6 @@ Data.spells = {
|
|||||||
[10912] = "charm",
|
[10912] = "charm",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Add WoTLK spells
|
|
||||||
if( IS_WRATH_BUILD ) then
|
|
||||||
-- Death Coil
|
|
||||||
Data.spells[47859] = "dc"
|
|
||||||
Data.spells[47860] = "dc"
|
|
||||||
|
|
||||||
-- Wyvern Sting
|
|
||||||
Data.spells[49011] = "sleep"
|
|
||||||
Data.spells[49012] = "sleep"
|
|
||||||
|
|
||||||
-- Entangling Roots
|
|
||||||
Data.spells[53308] = "root"
|
|
||||||
|
|
||||||
-- Frost Nova
|
|
||||||
Data.spells[42917] = "root"
|
|
||||||
|
|
||||||
-- Intercept (Remove all except this one come WoTLK)
|
|
||||||
Data.spells[20252] = "ctrlstun"
|
|
||||||
|
|
||||||
-- Pounce
|
|
||||||
Data.spells[49803] = "ctrlstun"
|
|
||||||
|
|
||||||
-- Polymorph
|
|
||||||
Data.spells[61305] = "disorient"
|
|
||||||
Data.spells[61025] = "disorient"
|
|
||||||
|
|
||||||
-- Sap
|
|
||||||
Data.spells[51724] = "disorient"
|
|
||||||
|
|
||||||
-- Maim
|
|
||||||
Data.spells[49802] = "disorient"
|
|
||||||
|
|
||||||
-- Hex (Guessing)
|
|
||||||
Data.spells[51514] = "disorient"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- DR Category names
|
-- DR Category names
|
||||||
Data.typeNames = {
|
Data.typeNames = {
|
||||||
["disorient"] = "Disorients",
|
["disorient"] = "Disorients",
|
||||||
|
@ -59,41 +59,107 @@ Buff({ 33891 }, { buffType = "form"}, "DRUID") -- Tree of Life
|
|||||||
Buff({ 16864 }, { buffType = "magic"}, "DRUID") -- Omen of Clarity
|
Buff({ 16864 }, { buffType = "magic"}, "DRUID") -- Omen of Clarity
|
||||||
Buff({ 16689, 16810, 16811, 16812, 16813, 17329, 27009 }, { buffType = "magic"}, "DRUID") -- Nature's Grasp
|
Buff({ 16689, 16810, 16811, 16812, 16813, 17329, 27009 }, { buffType = "magic"}, "DRUID") -- Nature's Grasp
|
||||||
Buff({ 45281, 45282, 45283 }, { buffType = "magic"}, "DRUID") -- Natural Perfection
|
Buff({ 45281, 45282, 45283 }, { buffType = "magic"}, "DRUID") -- Natural Perfection
|
||||||
Buff({ 16188 }, { buffType = "magic"}, "DRUID") -- Nature's Swiftness
|
Buff({ 17116 }, { buffType = "magic"}, "DRUID") -- Nature's Swiftness
|
||||||
Buff({ 17007 }, { buffType = "aura"}, "DRUID") -- Leader of the Pack
|
Buff({ 17007 }, { buffType = "aura"}, "DRUID") -- Leader of the Pack
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- WARRIOR
|
-- WARRIOR -- TODO
|
||||||
-------------
|
-------------
|
||||||
--Buff({ 29703 }, { buffType = "physical"}, "WARRIOR") -- Dazed
|
Buff({ 29838 }, { buffType = "physical"}, "WARRIOR") -- Second Wind
|
||||||
|
Buff({ 12292 }, { buffType = "physical"}, "WARRIOR") -- Death Wish
|
||||||
|
Buff({ 6673 }, { buffType = "physical"}, "WARRIOR") -- Battle Shout
|
||||||
|
Buff({ 469 }, { buffType = "physical"}, "WARRIOR") -- Commanding Shout
|
||||||
|
Buff({ 12328 }, { buffType = "physical"}, "WARRIOR") -- Sweeping Strikes
|
||||||
|
Buff({ 30032 }, { buffType = "physical"}, "WARRIOR") -- Rampage
|
||||||
|
Buff({ 2687 }, { buffType = "physical"}, "WARRIOR") -- Blood Rage
|
||||||
|
Buff({ 20230 }, { buffType = "physical"}, "WARRIOR") -- Retaliation
|
||||||
|
Buff({ 871 }, { buffType = "physical"}, "WARRIOR") -- Shield Wall
|
||||||
|
Buff({ 18499 }, { buffType = "physical"}, "WARRIOR") -- Berserker Rage
|
||||||
|
Buff({ 23885 }, { buffType = "physical"}, "WARRIOR") -- Bloodthirst
|
||||||
|
Buff({ 3411 }, { buffType = "physical"}, "WARRIOR") -- Intervene
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- ROGUE
|
-- ROGUE -- TODO
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Buff({ 2983 }, { buffType = "physical" }, "ROGUE") -- Sprint
|
Buff({ 2983 }, { buffType = "physical" }, "ROGUE") -- Sprint
|
||||||
Buff({ 5277 }, { buffType = "physical" }, "ROGUE") -- Evasion
|
Buff({ 5277 }, { buffType = "physical" }, "ROGUE") -- Evasion
|
||||||
|
Buff({ 31224 }, { buffType = "physical" }, "ROGUE") -- Cloak of Shadows
|
||||||
|
Buff({ 14278 }, { buffType = "physical" }, "ROGUE") -- Ghostly Strike
|
||||||
|
|
||||||
|
|
||||||
------------
|
------------
|
||||||
-- WARLOCK
|
-- WARLOCK --TODO
|
||||||
------------
|
------------
|
||||||
Buff({ 19028 }, { buffType = "immune"}, "WARLOCK") -- Soul Link
|
Buff({ 19028 }, { buffType = "aura"}, "WARLOCK") -- Soul Link
|
||||||
Buff({ 23759 }, { buffType = "immune"}, "WARLOCK") -- Master Demonologist
|
Buff({ 696 }, { buffType = "aura"}, "WARLOCK") -- Demon Skin
|
||||||
|
Buff({ 706 }, { buffType = "aura"}, "WARLOCK") -- Demon Armor
|
||||||
|
Buff({ 28176 }, { buffType = "aura"}, "WARLOCK") -- Fel Armor
|
||||||
|
Buff({ 23759 }, { buffType = "aura"}, "WARLOCK") -- Master Demonologist
|
||||||
|
Buff({ 34936 }, { buffType = "magic"}, "WARLOCK") -- Backlash
|
||||||
|
Buff({ 5697 }, { buffType = "magic"}, "WARLOCK") -- Unending Breath
|
||||||
|
Buff({ 132 }, { buffType = "magic"}, "WARLOCK") -- Detect Invisibility
|
||||||
|
Buff({ 1949 }, { buffType = "aura"}, "WARLOCK") -- Hellfire
|
||||||
|
Buff({ 6229 }, { buffType = "magic"}, "WARLOCK") -- Shadow Ward
|
||||||
|
Buff({ 19480 }, { buffType = "magic"}, "WARLOCK") -- Paranoia
|
||||||
|
Buff({ 7812 }, { buffType = "magic"}, "WARLOCK") -- Sacrifice
|
||||||
|
Buff({ 2947 }, { buffType = "magic"}, "WARLOCK") -- Fire Shield
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- SHAMAN
|
-- SHAMAN
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Buff({ 8178 } ,{ buffType = "magic" }, "SHAMAN") -- Grounding Totem Effect
|
Buff({ 8178 } ,{ buffType = "magic" }, "SHAMAN") -- Grounding Totem Effect
|
||||||
|
Buff({ 30823 } ,{ buffType = "magic" }, "SHAMAN") -- Shamanistic Rage
|
||||||
|
Buff({ 32182 } ,{ buffType = "magic" }, "SHAMAN") -- Heroism
|
||||||
|
Buff({ 2825 } ,{ buffType = "magic" }, "SHAMAN") -- Bloodlust
|
||||||
|
Buff({ 974 } ,{ buffType = "magic" }, "SHAMAN") -- Earth Shield
|
||||||
|
Buff({ 24398 } ,{ buffType = "magic" }, "SHAMAN") -- Water Shield
|
||||||
|
Buff({ 324 } ,{ buffType = "magic" }, "SHAMAN") -- Lightning Shield
|
||||||
|
Buff({ 16188 } ,{ buffType = "magic" }, "SHAMAN") -- Nature's Swiftness
|
||||||
|
Buff({ 16166 } ,{ buffType = "magic" }, "SHAMAN") -- Elemental Mastery
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- PALADIN
|
-- PALADIN --TODO
|
||||||
--------------
|
--------------
|
||||||
|
--Blessings
|
||||||
--Buff( { 25771 }, { buffType = "immune"}, "PALADIN") -- Forbearance
|
Buff( { 1022, 5599, 10278 }, { buffType = "magic"}, "PALADIN") -- Blessing of Protection
|
||||||
|
Buff( { 6940 }, { buffType = "magic"}, "PALADIN") -- Blessing of Sacrifice
|
||||||
|
Buff( { 1044 }, { buffType = "magic"}, "PALADIN") -- Blessing of Freedom
|
||||||
|
Buff( { 19740, 19834, 19835, 19836, 19837, 19838, 25291, 27140 }, { buffType = "magic"}, "PALADIN") -- Blessing of Might
|
||||||
|
Buff( { 19742 }, { buffType = "magic"}, "PALADIN") -- Blessing of Wisdom
|
||||||
|
Buff( { 20217 }, { buffType = "magic"}, "PALADIN") -- Blessing of Kings
|
||||||
|
Buff( { 19977 }, { buffType = "magic"}, "PALADIN") -- Blessing of Light
|
||||||
|
Buff( { 1038 }, { buffType = "magic"}, "PALADIN") -- Blessing of Salvation
|
||||||
|
Buff( { 20911 }, { buffType = "magic"}, "PALADIN") -- Blessing of Sanctuary
|
||||||
|
Buff( { 25898 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Kings
|
||||||
|
Buff( { 25890 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Light
|
||||||
|
Buff( { 25782 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Might
|
||||||
|
Buff( { 25895 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Salvation
|
||||||
|
Buff( { 25899 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Sanctuary
|
||||||
|
Buff( { 25894 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Wisdom
|
||||||
|
Buff( { 642 }, { buffType = "magic"}, "PALADIN") -- Divine Shield
|
||||||
|
--Auras
|
||||||
|
Buff( { 465, 10290, 643, 10291, 1032, 10292, 10293, 27149 }, { buffType = "aura"}, "PALADIN") -- Devotion Aura
|
||||||
|
Buff( { 7294 }, { buffType = "aura"}, "PALADIN") -- Retribution Aura
|
||||||
|
Buff( { 19746 }, { buffType = "aura"}, "PALADIN") -- Concentration Aura
|
||||||
|
Buff( { 19876 }, { buffType = "aura"}, "PALADIN") -- Shadow Resistance Aura
|
||||||
|
Buff( { 20218 }, { buffType = "aura"}, "PALADIN") -- Sanctity Aura
|
||||||
|
Buff( { 19888 }, { buffType = "aura"}, "PALADIN") -- Frost Resistance Aura
|
||||||
|
Buff( { 19891 }, { buffType = "aura"}, "PALADIN") -- Fire Resistance Aura
|
||||||
|
Buff( { 32223 }, { buffType = "aura"}, "PALADIN") -- Crusader Aura
|
||||||
|
--Seals
|
||||||
|
Buff( { 20154, 20287, 20288, 20289, 20290, 20291, 20292, 20293, 27155 }, { buffType = "magic"}, "PALADIN") -- Seal of Righteousness
|
||||||
|
Buff( { 31892 }, { buffType = "magic"}, "PALADIN") -- Seal of Blood
|
||||||
|
Buff( { 20375 }, { buffType = "magic"}, "PALADIN") -- Seal of Command
|
||||||
|
Buff( { 20164 }, { buffType = "magic"}, "PALADIN") -- Seal of Justice
|
||||||
|
Buff( { 20165 }, { buffType = "magic"}, "PALADIN") -- Seal of Light
|
||||||
|
Buff( { 15277 }, { buffType = "magic"}, "PALADIN") -- Seal of Reckoning
|
||||||
|
Buff( { 31801 }, { buffType = "magic"}, "PALADIN") -- Seal of Vengeance
|
||||||
|
Buff( { 20166 }, { buffType = "magic"}, "PALADIN") -- Seal of Wisdom
|
||||||
|
Buff( { 21082 }, { buffType = "magic"}, "PALADIN") -- Seal of the Crusade
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local type, ipairs, pairs, tinsert = type, ipairs, pairs, tinsert
|
local type, ipairs, pairs, tinsert = type, ipairs, pairs, tinsert
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
local LibClassAuras = LibStub:NewLibrary("LibClassAuras-1.0", 1)
|
local LibClassAuras = LibStub:NewLibrary("LibClassAuras-1.0", 1)
|
||||||
LibClassAuras.debuffs = {}
|
LibClassAuras.debuffs = {}
|
||||||
@ -71,4 +72,14 @@ local function getClassBuffs(class)
|
|||||||
end
|
end
|
||||||
return classSpells
|
return classSpells
|
||||||
end
|
end
|
||||||
LibClassAuras.GetClassBuffs = getClassBuffs
|
LibClassAuras.GetClassBuffs = getClassBuffs
|
||||||
|
|
||||||
|
local function getSpellNameToId(auraType)
|
||||||
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
|
return LibClassAuras.debuffToId
|
||||||
|
else
|
||||||
|
return LibClassAuras.buffToId
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
LibClassAuras.GetSpellNameToId = getSpellNameToId
|
232
Libs/LibSpellRange-1.0/LibSpellRange-1.0.lua
Normal file
232
Libs/LibSpellRange-1.0/LibSpellRange-1.0.lua
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
--- = Background =
|
||||||
|
-- Blizzard's IsSpellInRange API has always been very limited - you either must have the name of the spell, or its spell book ID. Checking directly by spellID is simply not possible.
|
||||||
|
-- Now, in Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work - instead of giving you a new spell when leaned, they replace existing spells. These replacement spells do not work with Blizzard's IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.
|
||||||
|
-- = Usage =
|
||||||
|
-- **LibSpellRange-1.0** exposes an enhanced version of IsSpellInRange that:
|
||||||
|
-- * Allows ranged checking based on both spell name and spellID.
|
||||||
|
-- * Works correctly with replacement spells that will not work using Blizzard's IsSpellInRange method alone.
|
||||||
|
--
|
||||||
|
-- @class file
|
||||||
|
-- @name LibSpellRange-1.0.lua
|
||||||
|
|
||||||
|
local major = "SpellRange-1.0"
|
||||||
|
local minor = 15
|
||||||
|
|
||||||
|
assert(LibStub, format("%s requires LibStub.", major))
|
||||||
|
|
||||||
|
local Lib = LibStub:NewLibrary(major, minor)
|
||||||
|
if not Lib then return end
|
||||||
|
|
||||||
|
local tonumber = _G.tonumber
|
||||||
|
local strlower = _G.strlower
|
||||||
|
local wipe = _G.wipe
|
||||||
|
local type = _G.type
|
||||||
|
|
||||||
|
local GetSpellTabInfo = _G.GetSpellTabInfo
|
||||||
|
local GetNumSpellTabs = _G.GetNumSpellTabs
|
||||||
|
local GetSpellBookItemInfo = _G.GetSpellBookItemInfo
|
||||||
|
local GetSpellBookItemName = _G.GetSpellBookItemName
|
||||||
|
local GetSpellLink = _G.GetSpellLink
|
||||||
|
local GetSpellInfo = _G.GetSpellInfo
|
||||||
|
|
||||||
|
local IsSpellInRange = _G.IsSpellInRange
|
||||||
|
local SpellHasRange = _G.SpellHasRange
|
||||||
|
|
||||||
|
-- isNumber is basically a tonumber cache for maximum efficiency
|
||||||
|
Lib.isNumber = Lib.isNumber or setmetatable({}, {
|
||||||
|
__mode = "kv",
|
||||||
|
__index = function(t, i)
|
||||||
|
local o = tonumber(i) or false
|
||||||
|
t[i] = o
|
||||||
|
return o
|
||||||
|
end})
|
||||||
|
local isNumber = Lib.isNumber
|
||||||
|
|
||||||
|
-- strlower cache for maximum efficiency
|
||||||
|
Lib.strlowerCache = Lib.strlowerCache or setmetatable(
|
||||||
|
{}, {
|
||||||
|
__index = function(t, i)
|
||||||
|
if not i then return end
|
||||||
|
local o
|
||||||
|
if type(i) == "number" then
|
||||||
|
o = i
|
||||||
|
else
|
||||||
|
o = strlower(i)
|
||||||
|
end
|
||||||
|
t[i] = o
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
}) local strlowerCache = Lib.strlowerCache
|
||||||
|
|
||||||
|
-- Matches lowercase player spell names to their spellBookID
|
||||||
|
Lib.spellsByName_spell = Lib.spellsByName_spell or {}
|
||||||
|
local spellsByName_spell = Lib.spellsByName_spell
|
||||||
|
|
||||||
|
-- Matches player spellIDs to their spellBookID
|
||||||
|
Lib.spellsByID_spell = Lib.spellsByID_spell or {}
|
||||||
|
local spellsByID_spell = Lib.spellsByID_spell
|
||||||
|
|
||||||
|
-- Matches lowercase pet spell names to their spellBookID
|
||||||
|
Lib.spellsByName_pet = Lib.spellsByName_pet or {}
|
||||||
|
local spellsByName_pet = Lib.spellsByName_pet
|
||||||
|
|
||||||
|
-- Matches pet spellIDs to their spellBookID
|
||||||
|
Lib.spellsByID_pet = Lib.spellsByID_pet or {}
|
||||||
|
local spellsByID_pet = Lib.spellsByID_pet
|
||||||
|
|
||||||
|
-- Updates spellsByName and spellsByID
|
||||||
|
local function UpdateBook(bookType)
|
||||||
|
local max = 0
|
||||||
|
for i = 1, GetNumSpellTabs() do
|
||||||
|
local _, _, offs, numspells, _, specId = GetSpellTabInfo(i)
|
||||||
|
if specId == 0 then
|
||||||
|
max = offs + numspells
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local spellsByName = Lib["spellsByName_" .. bookType]
|
||||||
|
local spellsByID = Lib["spellsByID_" .. bookType]
|
||||||
|
|
||||||
|
wipe(spellsByName)
|
||||||
|
wipe(spellsByID)
|
||||||
|
|
||||||
|
for spellBookID = 1, max do
|
||||||
|
local type, baseSpellID = GetSpellBookItemInfo(spellBookID, bookType)
|
||||||
|
|
||||||
|
if type == "SPELL" or type == "PETACTION" then
|
||||||
|
local currentSpellName = GetSpellBookItemName(spellBookID, bookType)
|
||||||
|
local link = GetSpellLink(currentSpellName)
|
||||||
|
local currentSpellID = tonumber(link and link:gsub("|", "||"):match("spell:(%d+)"))
|
||||||
|
|
||||||
|
-- For each entry we add to a table,
|
||||||
|
-- only add it if there isn't anything there already.
|
||||||
|
-- This prevents weird passives from overwriting real, legit spells.
|
||||||
|
-- For example, in WoW 7.3.5 the ret paladin mastery
|
||||||
|
-- was coming back with a base spell named "Judgement",
|
||||||
|
-- which was overwriting the real "Judgement".
|
||||||
|
-- Passives usually come last in the spellbook,
|
||||||
|
-- so this should work just fine as a workaround.
|
||||||
|
-- This issue with "Judgement" is gone in BFA because the mastery changed.
|
||||||
|
|
||||||
|
if currentSpellName and not spellsByName[strlower(currentSpellName)] then
|
||||||
|
spellsByName[strlower(currentSpellName)] = spellBookID
|
||||||
|
end
|
||||||
|
if currentSpellID and not spellsByID[currentSpellID] then
|
||||||
|
spellsByID[currentSpellID] = spellBookID
|
||||||
|
end
|
||||||
|
|
||||||
|
if type == "SPELL" then
|
||||||
|
-- PETACTION (pet abilities) don't return a spellID for baseSpellID,
|
||||||
|
-- so base spells only work for proper player spells.
|
||||||
|
local baseSpellName = GetSpellInfo(baseSpellID)
|
||||||
|
if baseSpellName and not spellsByName[strlower(baseSpellName)] then
|
||||||
|
spellsByName[strlower(baseSpellName)] = spellBookID
|
||||||
|
end
|
||||||
|
if baseSpellID and not spellsByID[baseSpellID] then
|
||||||
|
spellsByID[baseSpellID] = spellBookID
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Handles updating spellsByName and spellsByID
|
||||||
|
if not Lib.updaterFrame then
|
||||||
|
Lib.updaterFrame = CreateFrame("Frame")
|
||||||
|
end
|
||||||
|
Lib.updaterFrame:UnregisterAllEvents()
|
||||||
|
Lib.updaterFrame:RegisterEvent("SPELLS_CHANGED")
|
||||||
|
|
||||||
|
local function UpdateSpells()
|
||||||
|
UpdateBook("spell")
|
||||||
|
UpdateBook("pet")
|
||||||
|
end
|
||||||
|
|
||||||
|
Lib.updaterFrame:SetScript("OnEvent", UpdateSpells)
|
||||||
|
UpdateSpells()
|
||||||
|
|
||||||
|
--- Improved spell range checking function.
|
||||||
|
-- @name SpellRange.IsSpellInRange
|
||||||
|
-- @paramsig spell, unit
|
||||||
|
-- @param spell Name or spellID of a spell that you wish to check the range of. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
||||||
|
-- @param unit UnitID of the spell that you wish to check the range on.
|
||||||
|
-- @return Exact same returns as http://wowprogramming.com/docs/api/IsSpellInRange
|
||||||
|
-- @usage
|
||||||
|
-- -- Check spell range by spell name on unit "target"
|
||||||
|
-- local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
-- local inRange = SpellRange.IsSpellInRange("Stormstrike", "target")
|
||||||
|
--
|
||||||
|
-- -- Check spell range by spellID on unit "mouseover"
|
||||||
|
-- local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
-- local inRange = SpellRange.IsSpellInRange(17364, "mouseover")
|
||||||
|
function Lib.IsSpellInRange(spellInput, unit)
|
||||||
|
if isNumber[spellInput] then
|
||||||
|
local spell = spellsByID_spell[spellInput]
|
||||||
|
if spell then
|
||||||
|
return IsSpellInRange(spell, "spell", unit)
|
||||||
|
else
|
||||||
|
local spell = spellsByID_pet[spellInput]
|
||||||
|
if spell then
|
||||||
|
return IsSpellInRange(spell, "pet", unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local spellInput = strlowerCache[spellInput]
|
||||||
|
|
||||||
|
local spell = spellsByName_spell[spellInput]
|
||||||
|
if spell then
|
||||||
|
return IsSpellInRange(spell, "spell", unit)
|
||||||
|
else
|
||||||
|
local spell = spellsByName_pet[spellInput]
|
||||||
|
if spell then
|
||||||
|
return IsSpellInRange(spell, "pet", unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return IsSpellInRange(spellInput, unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Improved SpellHasRange.
|
||||||
|
-- @name SpellRange.SpellHasRange
|
||||||
|
-- @paramsig spell
|
||||||
|
-- @param spell Name or spellID of a spell that you wish to check for a range. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
||||||
|
-- @return Exact same returns as http://wowprogramming.com/docs/api/SpellHasRange
|
||||||
|
-- @usage
|
||||||
|
-- -- Check if a spell has a range by spell name
|
||||||
|
-- local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
-- local hasRange = SpellRange.SpellHasRange("Stormstrike")
|
||||||
|
--
|
||||||
|
-- -- Check if a spell has a range by spellID
|
||||||
|
-- local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
-- local hasRange = SpellRange.SpellHasRange(17364)
|
||||||
|
function Lib.SpellHasRange(spellInput)
|
||||||
|
if isNumber[spellInput] then
|
||||||
|
local spell = spellsByID_spell[spellInput]
|
||||||
|
if spell then
|
||||||
|
return SpellHasRange(spell, "spell")
|
||||||
|
else
|
||||||
|
local spell = spellsByID_pet[spellInput]
|
||||||
|
if spell then
|
||||||
|
return SpellHasRange(spell, "pet")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local spellInput = strlowerCache[spellInput]
|
||||||
|
|
||||||
|
local spell = spellsByName_spell[spellInput]
|
||||||
|
if spell then
|
||||||
|
return SpellHasRange(spell, "spell")
|
||||||
|
else
|
||||||
|
local spell = spellsByName_pet[spellInput]
|
||||||
|
if spell then
|
||||||
|
return SpellHasRange(spell, "pet")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return SpellHasRange(spellInput)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
61
Libs/LibSpellRange-1.0/README.md
Normal file
61
Libs/LibSpellRange-1.0/README.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# LibSpellRange-1.0
|
||||||
|
|
||||||
|
## Background
|
||||||
|
|
||||||
|
Blizzard's `IsSpellInRange` API has always been very limited - you either must have the name of the spell,
|
||||||
|
or its spell book ID. Checking directly by spellID is simply not possible.
|
||||||
|
Now, since Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work -
|
||||||
|
instead of giving you a new spell when leaned, they replace existing spells. These replacement spells do
|
||||||
|
not work with Blizzard's IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
**LibSpellRange-1.0** exposes an enhanced version of IsSpellInRange that:
|
||||||
|
|
||||||
|
* Allows ranged checking based on both spell name and spellID.
|
||||||
|
* Works correctly with replacement spells that will not work using Blizzard's IsSpellInRange method alone.
|
||||||
|
|
||||||
|
### `SpellRange.IsSpellInRange(spell, unit)` - Improved `IsSpellInRange`
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- `spell` - Name or spellID of a spell that you wish to check the range of. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
||||||
|
- `unit` - UnitID of the spell that you wish to check the range on.
|
||||||
|
|
||||||
|
#### Return value
|
||||||
|
|
||||||
|
Exact same returns as [the built-in `IsSpellInRange`](http://wowprogramming.com/docs/api/IsSpellInRange.html)
|
||||||
|
|
||||||
|
#### Usage
|
||||||
|
|
||||||
|
``` lua
|
||||||
|
-- Check spell range by spell name on unit "target"
|
||||||
|
local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
local inRange = SpellRange.IsSpellInRange("Stormstrike", "target")
|
||||||
|
|
||||||
|
-- Check spell range by spellID on unit "mouseover"
|
||||||
|
local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
local inRange = SpellRange.IsSpellInRange(17364, "mouseover")
|
||||||
|
```
|
||||||
|
|
||||||
|
### `SpellRange.SpellHasRange(spell)` - Improved `SpellHasRange`
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
- `spell` - Name or spellID of a spell that you wish to check for a range. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
||||||
|
|
||||||
|
#### Return value
|
||||||
|
|
||||||
|
Exact same returns as [the built-in `SpellHasRange`](http://wowprogramming.com/docs/api/SpellHasRange.html)
|
||||||
|
|
||||||
|
#### Usage
|
||||||
|
|
||||||
|
``` lua
|
||||||
|
-- Check if a spell has a range by spell name
|
||||||
|
local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
local hasRange = SpellRange.SpellHasRange("Stormstrike")
|
||||||
|
|
||||||
|
-- Check if a spell has a range by spellID
|
||||||
|
local SpellRange = LibStub("SpellRange-1.0")
|
||||||
|
local hasRange = SpellRange.SpellHasRange(17364)
|
||||||
|
```
|
3
Libs/LibSpellRange-1.0/lib.xml
Normal file
3
Libs/LibSpellRange-1.0/lib.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<Ui>
|
||||||
|
<Script file="LibSpellRange-1.0.lua"/>
|
||||||
|
</Ui>
|
@ -21,12 +21,12 @@ local Announcements = Gladdy:NewModule("Announcements", nil, {
|
|||||||
drinks = true,
|
drinks = true,
|
||||||
resurrections = true,
|
resurrections = true,
|
||||||
enemy = false,
|
enemy = false,
|
||||||
spec = false,
|
spec = true,
|
||||||
health = false,
|
health = false,
|
||||||
healthThreshold = 20,
|
healthThreshold = 20,
|
||||||
trinketUsed = true,
|
trinketUsed = true,
|
||||||
trinketReady = false,
|
trinketReady = false,
|
||||||
dest = "self",
|
dest = "party",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -47,6 +47,7 @@ function Announcements:Initialize()
|
|||||||
self:RegisterMessage("UNIT_HEALTH")
|
self:RegisterMessage("UNIT_HEALTH")
|
||||||
self:RegisterMessage("TRINKET_USED")
|
self:RegisterMessage("TRINKET_USED")
|
||||||
self:RegisterMessage("TRINKET_READY")
|
self:RegisterMessage("TRINKET_READY")
|
||||||
|
self:RegisterMessage("SHADOWSIGHT")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:Reset()
|
function Announcements:Reset()
|
||||||
@ -148,6 +149,10 @@ function Announcements:CheckDrink(unit, aura)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Announcements:SHADOWSIGHT(msg)
|
||||||
|
self:Send(msg, 2)
|
||||||
|
end
|
||||||
|
|
||||||
function Announcements:Send(msg, throttle, color)
|
function Announcements:Send(msg, throttle, color)
|
||||||
if (throttle and throttle > 0) then
|
if (throttle and throttle > 0) then
|
||||||
if (not self.throttled[msg]) then
|
if (not self.throttled[msg]) then
|
||||||
@ -206,9 +211,6 @@ function Announcements:GetOptions()
|
|||||||
["party"] = L["Party"],
|
["party"] = L["Party"],
|
||||||
["rw"] = L["Raid Warning"],
|
["rw"] = L["Raid Warning"],
|
||||||
["fct"] = L["Blizzard's Floating Combat Text"],
|
["fct"] = L["Blizzard's Floating Combat Text"],
|
||||||
--["msbt"] = L["MikScrollingBattleText"],
|
|
||||||
--["sct"] = L["Scrolling Combat Text"],
|
|
||||||
--["parrot"] = L["Parrot"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -1,157 +1,156 @@
|
|||||||
local select, floor, str_len, tostring, str_sub, str_find = select, math.floor, string.len, tostring, string.sub, string.find
|
local floor, str_len, tostring, str_sub, str_find, pairs = math.floor, string.len, tostring, string.sub, string.find, pairs
|
||||||
local IsInInstance = IsInInstance
|
local CreateFrame = CreateFrame
|
||||||
|
local GetLocale = GetLocale
|
||||||
|
local GetTime = GetTime
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local ACDFrame = Gladdy:NewModule("Countdown", nil, {
|
local ACDFrame = Gladdy:NewModule("Arena Countdown", nil, {
|
||||||
countdown = true,
|
countdown = true,
|
||||||
arenaCountdownSize = 256
|
arenaCountdownSize = 256
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function ACDFrame:OnEvent(event, ...)
|
||||||
|
self[event](self, ...)
|
||||||
|
end
|
||||||
|
|
||||||
function ACDFrame:Initialize()
|
function ACDFrame:Initialize()
|
||||||
|
self.locale = Gladdy:GetArenaTimer()
|
||||||
self.hidden = false
|
self.hidden = false
|
||||||
self.countdown = -1
|
self.countdown = -1
|
||||||
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
|
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
|
||||||
ACDFrame:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
|
||||||
ACDFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
|
local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent)
|
||||||
|
ACDNumFrame:EnableMouse(false)
|
||||||
|
ACDNumFrame:SetHeight(256)
|
||||||
|
ACDNumFrame:SetWidth(256)
|
||||||
|
ACDNumFrame:SetPoint("CENTER", 0, 128)
|
||||||
|
ACDNumFrame:Show()
|
||||||
|
self.ACDNumFrame = ACDNumFrame
|
||||||
|
|
||||||
|
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH")
|
||||||
|
ACDNumTens:SetWidth(256)
|
||||||
|
ACDNumTens:SetHeight(128)
|
||||||
|
ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -48, 0)
|
||||||
|
self.ACDNumTens = ACDNumTens
|
||||||
|
|
||||||
|
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH")
|
||||||
|
ACDNumOnes:SetWidth(256)
|
||||||
|
ACDNumOnes:SetHeight(128)
|
||||||
|
ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 48, 0)
|
||||||
|
self.ACDNumOnes = ACDNumOnes
|
||||||
|
|
||||||
|
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH")
|
||||||
|
ACDNumOne:SetWidth(256)
|
||||||
|
ACDNumOne:SetHeight(128)
|
||||||
|
ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0)
|
||||||
|
self.ACDNumOne = ACDNumOne
|
||||||
|
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
|
self:RegisterMessage("ENEMY_SPOTTED")
|
||||||
|
self:RegisterMessage("UNIT_SPEC")
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:OnEvent(event, ...)
|
function ACDFrame.OnUpdate(self, elapse)
|
||||||
-- functions created in "object:method"-style have an implicit first parameter of "self", which points to object
|
if (self.countdown > 0 and Gladdy.db.countdown) then
|
||||||
self[event](self, ...) -- route event parameters to LoseControl:event methods
|
self.hidden = false;
|
||||||
end
|
|
||||||
ACDFrame:SetScript("OnEvent", ACDFrame.OnEvent)
|
|
||||||
|
|
||||||
|
if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then
|
||||||
|
local str = tostring(floor(self.countdown - elapse));
|
||||||
|
|
||||||
local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent)
|
if (floor(self.countdown - elapse) == 0) then
|
||||||
ACDNumFrame:SetHeight(256)
|
self.ACDNumTens:Hide();
|
||||||
ACDNumFrame:SetWidth(256)
|
self.ACDNumOnes:Hide();
|
||||||
ACDNumFrame:SetPoint("CENTER", 0, 128)
|
self.ACDNumOne:Hide();
|
||||||
ACDNumFrame:Show()
|
elseif (str_len(str) == 2) then
|
||||||
|
-- Display has 2 digits
|
||||||
|
self.ACDNumOne:Hide();
|
||||||
|
self.ACDNumTens:Show();
|
||||||
|
self.ACDNumOnes:Show();
|
||||||
|
|
||||||
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH")
|
self.ACDNumTens:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
||||||
ACDNumTens:SetWidth(256)
|
self.ACDNumOnes:SetTexture(self.texturePath .. str_sub(str, 2, 2));
|
||||||
ACDNumTens:SetHeight(128)
|
self.ACDNumFrame:SetScale(0.7)
|
||||||
ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -48, 0)
|
elseif (str_len(str) == 1) then
|
||||||
|
-- Display has 1 digit
|
||||||
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH")
|
self.ACDNumOne:Show();
|
||||||
ACDNumOnes:SetWidth(256)
|
self.ACDNumOne:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
||||||
ACDNumOnes:SetHeight(128)
|
self.ACDNumOnes:Hide();
|
||||||
ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 48, 0)
|
self.ACDNumTens:Hide();
|
||||||
|
self.ACDNumFrame:SetScale(1.0)
|
||||||
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH")
|
|
||||||
ACDNumOne:SetWidth(256)
|
|
||||||
ACDNumOne:SetHeight(128)
|
|
||||||
ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0)
|
|
||||||
|
|
||||||
function ACDFrame:PLAYER_ENTERING_WORLD()
|
|
||||||
|
|
||||||
local instanceType = select(2, IsInInstance())
|
|
||||||
if (( instanceType == "arena" )) then
|
|
||||||
ACDFrame:SetScript("OnUpdate", function(self, elapse)
|
|
||||||
if (self.countdown > 0 and Gladdy.db.countdown) then
|
|
||||||
self.hidden = false;
|
|
||||||
|
|
||||||
if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then
|
|
||||||
local str = tostring(floor(self.countdown - elapse));
|
|
||||||
|
|
||||||
if (floor(self.countdown - elapse) == 0) then
|
|
||||||
ACDNumTens:Hide();
|
|
||||||
ACDNumOnes:Hide();
|
|
||||||
ACDNumOne:Hide();
|
|
||||||
elseif (str_len(str) == 2) then
|
|
||||||
-- Display has 2 digits
|
|
||||||
ACDNumOne:Hide();
|
|
||||||
ACDNumTens:Show();
|
|
||||||
ACDNumOnes:Show();
|
|
||||||
|
|
||||||
ACDNumTens:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
|
||||||
ACDNumOnes:SetTexture(self.texturePath .. str_sub(str, 2, 2));
|
|
||||||
ACDNumFrame:SetScale(0.7)
|
|
||||||
elseif (str_len(str) == 1) then
|
|
||||||
-- Display has 1 digit
|
|
||||||
ACDNumOne:Show();
|
|
||||||
ACDNumOne:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
|
||||||
ACDNumOnes:Hide();
|
|
||||||
ACDNumTens:Hide();
|
|
||||||
ACDNumFrame:SetScale(1.0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.countdown = self.countdown - elapse;
|
|
||||||
else
|
|
||||||
self.hidden = true;
|
|
||||||
ACDNumTens:Hide();
|
|
||||||
ACDNumOnes:Hide();
|
|
||||||
ACDNumOne:Hide();
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
self.countdown = self.countdown - elapse;
|
||||||
|
else
|
||||||
|
self.hidden = true;
|
||||||
|
self.ACDNumTens:Hide();
|
||||||
|
self.ACDNumOnes:Hide();
|
||||||
|
self.ACDNumOne:Hide();
|
||||||
end
|
end
|
||||||
|
if (GetTime() > self.endTime) then
|
||||||
|
self:SetScript("OnUpdate", nil)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ACDFrame:JOINED_ARENA()
|
||||||
|
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||||
|
self:SetScript("OnEvent", ACDFrame.OnEvent)
|
||||||
|
self.endTime = GetTime() + 70
|
||||||
|
self:SetScript("OnUpdate", ACDFrame.OnUpdate)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ACDFrame:ENEMY_SPOTTED()
|
||||||
|
ACDFrame:Reset()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ACDFrame:UNIT_SPEC()
|
||||||
|
ACDFrame:Reset()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
||||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 60 secondes !")) then
|
for k,v in pairs(self.locale) do
|
||||||
self.countdown = 61
|
if str_find(msg, v) then
|
||||||
return
|
if k == 0 then
|
||||||
end
|
ACDFrame:Reset()
|
||||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 30 secondes !")) then
|
else
|
||||||
self.countdown = 31
|
self.countdown = k
|
||||||
return
|
end
|
||||||
end
|
end
|
||||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 15 secondes !")) then
|
|
||||||
self.countdown = 16
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 10 secondes !")) then
|
|
||||||
self.countdown = 11
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "One minute until the Arena battle begins!")) then
|
|
||||||
self.countdown = 61
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "Thirty seconds until the Arena battle begins!")) then
|
|
||||||
self.countdown = 31
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "Fifteen seconds until the Arena battle begins!")) then
|
|
||||||
self.countdown = 16
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "Ten seconds until the Arena battle begins!")) then
|
|
||||||
self.countdown = 10
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if (str_find(msg, "The Arena battle has begun!")) then
|
|
||||||
ACDFrame:SetScript("OnUpdate", nil)
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:UpdateFrame()
|
function ACDFrame:UpdateFrame()
|
||||||
ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize)
|
self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize)
|
||||||
ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize)
|
self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
ACDNumFrame:SetPoint("CENTER", 0, 128)
|
self.ACDNumFrame:SetPoint("CENTER", 0, 128)
|
||||||
|
|
||||||
ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
|
self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
||||||
|
|
||||||
ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
|
self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
||||||
|
|
||||||
ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
|
self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0)
|
self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:Test()
|
function ACDFrame:Test()
|
||||||
self.countdown = 30
|
self.countdown = 30
|
||||||
|
self:JOINED_ARENA()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:Reset()
|
function ACDFrame:Reset()
|
||||||
|
self.endTime = 0
|
||||||
self.countdown = 0
|
self.countdown = 0
|
||||||
|
self:UnregisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||||
|
self:SetScript("OnUpdate", nil)
|
||||||
|
self.hidden = true;
|
||||||
|
self.ACDNumTens:Hide();
|
||||||
|
self.ACDNumOnes:Hide();
|
||||||
|
self.ACDNumOne:Hide();
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:GetOptions()
|
function ACDFrame:GetOptions()
|
||||||
@ -163,7 +162,7 @@ function ACDFrame:GetOptions()
|
|||||||
},
|
},
|
||||||
countdown = Gladdy:option({
|
countdown = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Turn on/off"],
|
name = L["Enabled"],
|
||||||
desc = L["Turns countdown before the start of an arena match on/off."],
|
desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
@ -175,6 +174,7 @@ function ACDFrame:GetOptions()
|
|||||||
min = 64,
|
min = 64,
|
||||||
max = 512,
|
max = 512,
|
||||||
step = 16,
|
step = 16,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -13,10 +13,21 @@ local function defaultSpells(auraType)
|
|||||||
spells[tostring(v.spellID)] = {}
|
spells[tostring(v.spellID)] = {}
|
||||||
spells[tostring(v.spellID)].enabled = true
|
spells[tostring(v.spellID)].enabled = true
|
||||||
spells[tostring(v.spellID)].priority = v.priority
|
spells[tostring(v.spellID)].priority = v.priority
|
||||||
|
spells[tostring(v.spellID)].track = v.track
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return spells
|
return spells
|
||||||
end
|
end
|
||||||
|
local function defaultInterrupts()
|
||||||
|
local spells = {}
|
||||||
|
for k,v in pairs(Gladdy:GetInterrupts()) do
|
||||||
|
spells[tostring(v.spellID)] = {}
|
||||||
|
spells[tostring(v.spellID)].enabled = true
|
||||||
|
spells[tostring(v.spellID)].priority = v.priority
|
||||||
|
end
|
||||||
|
return spells
|
||||||
|
end
|
||||||
|
|
||||||
local Auras = Gladdy:NewModule("Auras", nil, {
|
local Auras = Gladdy:NewModule("Auras", nil, {
|
||||||
auraFont = "DorisPP",
|
auraFont = "DorisPP",
|
||||||
auraFontSizeScale = 1,
|
auraFontSizeScale = 1,
|
||||||
@ -26,7 +37,10 @@ local Auras = Gladdy:NewModule("Auras", nil, {
|
|||||||
auraDebuffBorderColor = { r = 0, g = 1, b = 0, a = 1 },
|
auraDebuffBorderColor = { r = 0, g = 1, b = 0, a = 1 },
|
||||||
auraDisableCircle = false,
|
auraDisableCircle = false,
|
||||||
auraCooldownAlpha = 1,
|
auraCooldownAlpha = 1,
|
||||||
auraListDefault = defaultSpells()
|
auraListDefault = defaultSpells(),
|
||||||
|
auraListInterrupts = defaultInterrupts(),
|
||||||
|
auraInterruptColorsEnabled = true,
|
||||||
|
auraInterruptColors = Gladdy:GetSpellSchoolColors()
|
||||||
})
|
})
|
||||||
|
|
||||||
function Auras:Initialize()
|
function Auras:Initialize()
|
||||||
@ -38,10 +52,12 @@ function Auras:Initialize()
|
|||||||
self:RegisterMessage("UNIT_DEATH")
|
self:RegisterMessage("UNIT_DEATH")
|
||||||
self:RegisterMessage("AURA_GAIN")
|
self:RegisterMessage("AURA_GAIN")
|
||||||
self:RegisterMessage("AURA_FADE")
|
self:RegisterMessage("AURA_FADE")
|
||||||
|
self:RegisterMessage("SPELL_INTERRUPT")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:CreateFrame(unit)
|
function Auras:CreateFrame(unit)
|
||||||
local auraFrame = CreateFrame("Frame", nil, Gladdy.modules.Classicon.frames[unit])
|
local auraFrame = CreateFrame("Frame", nil, Gladdy.modules["Class Icon"].frames[unit])
|
||||||
|
auraFrame:EnableMouse(false)
|
||||||
auraFrame:SetFrameStrata("MEDIUM")
|
auraFrame:SetFrameStrata("MEDIUM")
|
||||||
auraFrame:SetFrameLevel(3)
|
auraFrame:SetFrameLevel(3)
|
||||||
|
|
||||||
@ -59,25 +75,16 @@ function Auras:CreateFrame(unit)
|
|||||||
auraFrame.cooldownFrame:SetFrameLevel(5)
|
auraFrame.cooldownFrame:SetFrameLevel(5)
|
||||||
|
|
||||||
auraFrame.icon = auraFrame:CreateTexture(nil, "BACKGROUND")
|
auraFrame.icon = auraFrame:CreateTexture(nil, "BACKGROUND")
|
||||||
|
auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
auraFrame.icon:SetAllPoints(auraFrame)
|
auraFrame.icon:SetAllPoints(auraFrame)
|
||||||
|
|
||||||
auraFrame.icon.overlay = auraFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
auraFrame.icon.overlay = auraFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
||||||
auraFrame.icon.overlay:SetAllPoints(auraFrame)
|
auraFrame.icon.overlay:SetAllPoints(auraFrame)
|
||||||
auraFrame.icon.overlay:SetTexture(Gladdy.db.buttonBorderStyle)
|
auraFrame.icon.overlay:SetTexture(Gladdy.db.buttonBorderStyle)
|
||||||
|
|
||||||
local classIcon = Gladdy.modules.Classicon.frames[unit]
|
local classIcon = Gladdy.modules["Class Icon"].frames[unit]
|
||||||
auraFrame:ClearAllPoints()
|
auraFrame:ClearAllPoints()
|
||||||
auraFrame:SetAllPoints(classIcon)
|
auraFrame:SetAllPoints(classIcon)
|
||||||
auraFrame:SetScript("OnUpdate", function(self, elapsed)
|
|
||||||
if (self.active) then
|
|
||||||
if (self.timeLeft <= 0) then
|
|
||||||
Auras:AURA_FADE(unit)
|
|
||||||
else
|
|
||||||
self.timeLeft = self.timeLeft - elapsed
|
|
||||||
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
auraFrame.text = auraFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
auraFrame.text = auraFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
auraFrame.text:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.auraFont), 10, "OUTLINE")
|
auraFrame.text:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.auraFont), 10, "OUTLINE")
|
||||||
@ -88,7 +95,94 @@ function Auras:CreateFrame(unit)
|
|||||||
auraFrame.text:SetPoint("CENTER")
|
auraFrame.text:SetPoint("CENTER")
|
||||||
auraFrame.unit = unit
|
auraFrame.unit = unit
|
||||||
|
|
||||||
|
auraFrame:SetScript("OnUpdate", function(self, elapsed)
|
||||||
|
if (self.active) then
|
||||||
|
if (self.interruptFrame.priority and self.priority < self.interruptFrame.priority) then
|
||||||
|
self:SetAlpha(0.01)
|
||||||
|
else
|
||||||
|
self:SetAlpha(1)
|
||||||
|
end
|
||||||
|
if (self.timeLeft <= 0) then
|
||||||
|
Auras:AURA_FADE(self.unit, self.track)
|
||||||
|
else
|
||||||
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
|
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:SetAlpha(0.01)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Gladdy.buttons[unit].aura = auraFrame
|
||||||
self.frames[unit] = auraFrame
|
self.frames[unit] = auraFrame
|
||||||
|
self:CreateInterrupt(unit)
|
||||||
|
self:ResetUnit(unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Auras:CreateInterrupt(unit)
|
||||||
|
local interruptFrame = CreateFrame("Frame", nil, Gladdy.modules["Class Icon"].frames[unit])
|
||||||
|
interruptFrame:EnableMouse(false)
|
||||||
|
interruptFrame:SetFrameStrata("MEDIUM")
|
||||||
|
interruptFrame:SetFrameLevel(3)
|
||||||
|
|
||||||
|
interruptFrame.cooldown = CreateFrame("Cooldown", nil, interruptFrame, "CooldownFrameTemplate")
|
||||||
|
interruptFrame.cooldown.noCooldownCount = true
|
||||||
|
interruptFrame.cooldown:SetFrameStrata("MEDIUM")
|
||||||
|
interruptFrame.cooldown:SetFrameLevel(4)
|
||||||
|
interruptFrame.cooldown:SetReverse(true)
|
||||||
|
interruptFrame.cooldown:SetHideCountdownNumbers(true)
|
||||||
|
|
||||||
|
interruptFrame.cooldownFrame = CreateFrame("Frame", nil, interruptFrame)
|
||||||
|
interruptFrame.cooldownFrame:ClearAllPoints()
|
||||||
|
interruptFrame.cooldownFrame:SetAllPoints(interruptFrame)
|
||||||
|
interruptFrame.cooldownFrame:SetFrameStrata("MEDIUM")
|
||||||
|
interruptFrame.cooldownFrame:SetFrameLevel(5)
|
||||||
|
|
||||||
|
interruptFrame.icon = interruptFrame:CreateTexture(nil, "BACKGROUND")
|
||||||
|
interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
interruptFrame.icon:SetAllPoints(interruptFrame)
|
||||||
|
|
||||||
|
interruptFrame.icon.overlay = interruptFrame.cooldownFrame:CreateTexture(nil, "OVERLAY")
|
||||||
|
interruptFrame.icon.overlay:SetAllPoints(interruptFrame)
|
||||||
|
interruptFrame.icon.overlay:SetTexture(Gladdy.db.buttonBorderStyle)
|
||||||
|
|
||||||
|
local classIcon = Gladdy.modules["Class Icon"].frames[unit]
|
||||||
|
interruptFrame:ClearAllPoints()
|
||||||
|
interruptFrame:SetAllPoints(classIcon)
|
||||||
|
|
||||||
|
interruptFrame.text = interruptFrame.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||||
|
interruptFrame.text:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.auraFont), 10, "OUTLINE")
|
||||||
|
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
|
--auraFrame.text:SetShadowOffset(1, -1)
|
||||||
|
--auraFrame.text:SetShadowColor(0, 0, 0, 1)
|
||||||
|
interruptFrame.text:SetJustifyH("CENTER")
|
||||||
|
interruptFrame.text:SetPoint("CENTER")
|
||||||
|
interruptFrame.unit = unit
|
||||||
|
|
||||||
|
interruptFrame:SetScript("OnUpdate", function(self, elapsed)
|
||||||
|
if (self.active) then
|
||||||
|
if (Auras.frames[self.unit].priority and self.priority <= Auras.frames[self.unit].priority) then
|
||||||
|
self:SetAlpha(0.01)
|
||||||
|
else
|
||||||
|
self:SetAlpha(1)
|
||||||
|
end
|
||||||
|
if (self.timeLeft <= 0) then
|
||||||
|
self.active = false
|
||||||
|
self.priority = nil
|
||||||
|
self.spellSchool = nil
|
||||||
|
self.cooldown:SetCooldown(GetTime(), 0)
|
||||||
|
self:SetAlpha(0.01)
|
||||||
|
else
|
||||||
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
|
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:SetAlpha(0.01)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Gladdy.buttons[unit].interruptFrame = interruptFrame
|
||||||
|
self.frames[unit].interruptFrame = interruptFrame
|
||||||
self:ResetUnit(unit)
|
self:ResetUnit(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -102,7 +196,7 @@ function Auras:UpdateFrame(unit)
|
|||||||
|
|
||||||
auraFrame:SetWidth(width)
|
auraFrame:SetWidth(width)
|
||||||
auraFrame:SetHeight(height)
|
auraFrame:SetHeight(height)
|
||||||
auraFrame:SetAllPoints(Gladdy.modules.Classicon.frames[unit])
|
auraFrame:SetAllPoints(Gladdy.modules["Class Icon"].frames[unit])
|
||||||
|
|
||||||
auraFrame.cooldown:SetWidth(width - width/16)
|
auraFrame.cooldown:SetWidth(width - width/16)
|
||||||
auraFrame.cooldown:SetHeight(height - height/16)
|
auraFrame.cooldown:SetHeight(height - height/16)
|
||||||
@ -121,28 +215,79 @@ function Auras:UpdateFrame(unit)
|
|||||||
else
|
else
|
||||||
auraFrame.icon.overlay:SetVertexColor(0, 0, 0, 1)
|
auraFrame.icon.overlay:SetVertexColor(0, 0, 0, 1)
|
||||||
end
|
end
|
||||||
|
if not auraFrame.active then
|
||||||
|
auraFrame.icon.overlay:Hide()
|
||||||
|
end
|
||||||
if Gladdy.db.auraDisableCircle then
|
if Gladdy.db.auraDisableCircle then
|
||||||
auraFrame.cooldown:SetAlpha(0)
|
auraFrame.cooldown:SetAlpha(0)
|
||||||
end
|
end
|
||||||
|
self:UpdateInterruptFrame(unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Auras:UpdateInterruptFrame(unit)
|
||||||
|
local interruptFrame = self.frames[unit] and self.frames[unit].interruptFrame
|
||||||
|
if (not interruptFrame) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize
|
||||||
|
|
||||||
|
interruptFrame:SetWidth(width)
|
||||||
|
interruptFrame:SetHeight(height)
|
||||||
|
interruptFrame:SetAllPoints(Gladdy.modules["Class Icon"].frames[unit])
|
||||||
|
|
||||||
|
interruptFrame.cooldown:SetWidth(width - width/16)
|
||||||
|
interruptFrame.cooldown:SetHeight(height - height/16)
|
||||||
|
interruptFrame.cooldown:ClearAllPoints()
|
||||||
|
interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER")
|
||||||
|
interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha)
|
||||||
|
|
||||||
|
interruptFrame.text:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.auraFont), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE")
|
||||||
|
interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a)
|
||||||
|
|
||||||
|
interruptFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
||||||
|
if interruptFrame.spellSchool then
|
||||||
|
interruptFrame.icon.overlay:SetVertexColor(self:GetInterruptColor(interruptFrame.spellSchool))
|
||||||
|
else
|
||||||
|
interruptFrame.icon.overlay:SetVertexColor(0, 0, 0, 1)
|
||||||
|
end
|
||||||
|
if not interruptFrame.active then
|
||||||
|
interruptFrame.icon.overlay:Hide()
|
||||||
|
end
|
||||||
|
if Gladdy.db.auraDisableCircle then
|
||||||
|
interruptFrame.cooldown:SetAlpha(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:ResetUnit(unit)
|
function Auras:ResetUnit(unit)
|
||||||
self.frames[unit]:UnregisterAllEvents()
|
self.frames[unit]:UnregisterAllEvents()
|
||||||
self:AURA_FADE(unit)
|
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:Test(unit)
|
function Auras:Test(unit)
|
||||||
local aura, _, icon
|
local spellName, _, icon
|
||||||
|
|
||||||
if (unit == "arena1") then
|
if (unit == "arena1") then
|
||||||
aura, _, icon = GetSpellInfo(12826)
|
spellName, _, icon = GetSpellInfo(7922)
|
||||||
self:AURA_GAIN(unit,nil, 12826, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
|
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 7922, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
|
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
||||||
elseif (unit == "arena2") then
|
elseif (unit == "arena2") then
|
||||||
aura, _, icon = GetSpellInfo(6770)
|
spellName = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))
|
||||||
self:AURA_GAIN(unit,nil, 6770, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
_, _, icon = GetSpellInfo(27010)
|
||||||
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
self:AURA_FADE(unit,AURA_TYPE_DEBUFF)
|
||||||
|
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 27010, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
|
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
||||||
elseif (unit == "arena3") then
|
elseif (unit == "arena3") then
|
||||||
aura, _, icon = GetSpellInfo(31224)
|
spellName, _, icon = GetSpellInfo(31224)
|
||||||
self:AURA_GAIN(unit,nil, 31224, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
self:AURA_GAIN(unit,AURA_TYPE_BUFF, 31224, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
|
spellName, _, icon = GetSpellInfo(18425)
|
||||||
|
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
|
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 18425, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -153,35 +298,40 @@ function Auras:JOINED_ARENA()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:AURA_GAIN(unit, auraType, spellID, aura, icon, duration, expirationTime, count, debuffType)
|
function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, expirationTime, count, debuffType)
|
||||||
local auraFrame = self.frames[unit]
|
local auraFrame = self.frames[unit]
|
||||||
if (not auraFrame) then
|
if (not auraFrame) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not self.auras[aura] then
|
|
||||||
|
if spellID == 31117 then
|
||||||
|
spellName = "Unstable Affliction Silence"
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.auras[spellName] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- don't use spellId from combatlog, in case of different spellrank
|
-- don't use spellId from combatlog, in case of different spellrank
|
||||||
if not Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)] or not Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].enabled then
|
if not Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)] or not Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)].enabled then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if (auraFrame.priority and auraFrame.priority > Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].priority) then
|
if (auraFrame.priority and auraFrame.priority > Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)].priority) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
auraFrame.startTime = expirationTime - duration
|
auraFrame.startTime = expirationTime - duration
|
||||||
auraFrame.endTime = expirationTime
|
auraFrame.endTime = expirationTime
|
||||||
auraFrame.name = aura
|
auraFrame.name = spellName
|
||||||
auraFrame.timeLeft = expirationTime - GetTime()
|
auraFrame.timeLeft = expirationTime - GetTime()
|
||||||
auraFrame.priority = Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].priority
|
auraFrame.priority = Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)].priority
|
||||||
auraFrame.icon:SetTexture(icon)
|
auraFrame.icon:SetTexture(Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)] and Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)].texture or icon)
|
||||||
auraFrame.track = self.auras[aura].track
|
auraFrame.track = auraType
|
||||||
auraFrame.active = true
|
auraFrame.active = true
|
||||||
auraFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle)
|
auraFrame.icon.overlay:Show()
|
||||||
auraFrame.cooldownFrame:Show()
|
auraFrame.cooldownFrame:Show()
|
||||||
if auraFrame.track and auraFrame.track == AURA_TYPE_DEBUFF then
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a)
|
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a)
|
||||||
elseif auraFrame.track and auraFrame.track == AURA_TYPE_BUFF then
|
elseif auraType == AURA_TYPE_BUFF then
|
||||||
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraBuffBorderColor.r, Gladdy.db.auraBuffBorderColor.g, Gladdy.db.auraBuffBorderColor.b, Gladdy.db.auraBuffBorderColor.a)
|
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraBuffBorderColor.r, Gladdy.db.auraBuffBorderColor.g, Gladdy.db.auraBuffBorderColor.b, Gladdy.db.auraBuffBorderColor.a)
|
||||||
else
|
else
|
||||||
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.frameBorderColor.r, Gladdy.db.frameBorderColor.g, Gladdy.db.frameBorderColor.b, Gladdy.db.frameBorderColor.a)
|
auraFrame.icon.overlay:SetVertexColor(Gladdy.db.frameBorderColor.r, Gladdy.db.frameBorderColor.g, Gladdy.db.frameBorderColor.b, Gladdy.db.frameBorderColor.a)
|
||||||
@ -192,15 +342,15 @@ function Auras:AURA_GAIN(unit, auraType, spellID, aura, icon, duration, expirati
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:AURA_FADE(unit)
|
function Auras:AURA_FADE(unit, auraType)
|
||||||
local auraFrame = self.frames[unit]
|
local auraFrame = self.frames[unit]
|
||||||
if (not auraFrame) then
|
if (not auraFrame or auraFrame.track ~= auraType) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if auraFrame.active then
|
if auraFrame.active then
|
||||||
auraFrame.cooldown:SetCooldown(GetTime(), 0)
|
auraFrame.cooldown:SetCooldown(GetTime(), 0)
|
||||||
end
|
end
|
||||||
auraFrame.cooldown:Hide()
|
--auraFrame.cooldown:Hide()
|
||||||
auraFrame.active = false
|
auraFrame.active = false
|
||||||
auraFrame.name = nil
|
auraFrame.name = nil
|
||||||
auraFrame.timeLeft = 0
|
auraFrame.timeLeft = 0
|
||||||
@ -209,11 +359,123 @@ function Auras:AURA_FADE(unit)
|
|||||||
auraFrame.endTime = nil
|
auraFrame.endTime = nil
|
||||||
auraFrame.icon:SetTexture("")
|
auraFrame.icon:SetTexture("")
|
||||||
auraFrame.text:SetText("")
|
auraFrame.text:SetText("")
|
||||||
auraFrame.icon.overlay:SetTexture("")
|
--auraFrame.icon.overlay:Hide()
|
||||||
auraFrame.cooldownFrame:Hide()
|
--auraFrame.cooldownFrame:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Auras:GetInterruptColor(extraSpellSchool)
|
||||||
|
if not Gladdy.db.auraInterruptColorsEnabled then
|
||||||
|
return Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a
|
||||||
|
else
|
||||||
|
local color = Gladdy.db.auraInterruptColors[extraSpellSchool] or Gladdy.db.auraInterruptColors["unknown"]
|
||||||
|
return color.r, color.g, color.b, color.a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Auras:SPELL_INTERRUPT(unit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool)
|
||||||
|
local auraFrame = self.frames[unit]
|
||||||
|
local interruptFrame = auraFrame and auraFrame.interruptFrame
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if (not interruptFrame) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not Gladdy.db.auraListInterrupts[tostring(Gladdy:GetInterrupts()[spellName].spellID)] or not Gladdy.db.auraListInterrupts[tostring(Gladdy:GetInterrupts()[spellName].spellID)].enabled then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (interruptFrame.priority and interruptFrame.priority > Gladdy.db.auraListInterrupts[tostring(Gladdy:GetInterrupts()[spellName].spellID)].priority) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local multiplier = ((button.spec == L["Restoration"] and button.class == "SHAMAN") or (button.spec == L["Holy"] and button.class == "PALADIN")) and 0.7 or 1
|
||||||
|
|
||||||
|
local duration = Gladdy:GetInterrupts()[spellName].duration * multiplier
|
||||||
|
|
||||||
|
interruptFrame.startTime = GetTime()
|
||||||
|
interruptFrame.endTime = GetTime() + duration
|
||||||
|
interruptFrame.name = spellName
|
||||||
|
interruptFrame.timeLeft = duration
|
||||||
|
interruptFrame.priority = Gladdy.db.auraListInterrupts[tostring(Gladdy:GetInterrupts()[spellName].spellID)].priority
|
||||||
|
interruptFrame.icon:SetTexture(Gladdy:GetInterrupts()[spellName].texture)
|
||||||
|
interruptFrame.spellSchool = extraSpellSchool
|
||||||
|
interruptFrame.active = true
|
||||||
|
interruptFrame.icon.overlay:Show()
|
||||||
|
interruptFrame.cooldownFrame:Show()
|
||||||
|
|
||||||
|
interruptFrame.icon.overlay:SetVertexColor(self:GetInterruptColor(extraSpellSchool))
|
||||||
|
|
||||||
|
if not Gladdy.db.auraDisableCircle then
|
||||||
|
interruptFrame.cooldown:Show()
|
||||||
|
interruptFrame.cooldown:SetCooldown(interruptFrame.startTime, duration)
|
||||||
|
end
|
||||||
|
--interruptFrame:SetAlpha(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Auras:GetOptions()
|
function Auras:GetOptions()
|
||||||
|
local borderArgs = {
|
||||||
|
headerAuras = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Border"],
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
auraBorderStyle = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Border style"],
|
||||||
|
order = 9,
|
||||||
|
values = Gladdy:GetIconStyles(),
|
||||||
|
}),
|
||||||
|
auraBuffBorderColor = Gladdy:colorOption({
|
||||||
|
type = "color",
|
||||||
|
name = L["Buff color"],
|
||||||
|
desc = L["Color of the text"],
|
||||||
|
order = 10,
|
||||||
|
hasAlpha = true,
|
||||||
|
width = "0.8",
|
||||||
|
}),
|
||||||
|
auraDebuffBorderColor = Gladdy:colorOption({
|
||||||
|
type = "color",
|
||||||
|
name = L["Debuff color"],
|
||||||
|
desc = L["Color of the text"],
|
||||||
|
order = 11,
|
||||||
|
hasAlpha = true,
|
||||||
|
width = "0.8",
|
||||||
|
}),
|
||||||
|
headerColors = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Interrupt Spells School Colors"],
|
||||||
|
order = 12,
|
||||||
|
},
|
||||||
|
auraInterruptColorsEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enable Interrupt Spell School Colors"],
|
||||||
|
width = "full",
|
||||||
|
desc = L["Will use Debuff Color if disabled"],
|
||||||
|
order = 13,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
local list = {}
|
||||||
|
for k,v in pairs(Gladdy:GetSpellSchoolColors()) do
|
||||||
|
tinsert(list, { key = k, val = v})
|
||||||
|
end
|
||||||
|
tbl_sort(list, function(a, b) return a.val.type < b.val.type end)
|
||||||
|
for i,v in ipairs(list) do
|
||||||
|
borderArgs["auraSpellSchool" .. v.key] = {
|
||||||
|
type = "color",
|
||||||
|
name = v.val.type,
|
||||||
|
order = i + 13,
|
||||||
|
hasAlpha = true,
|
||||||
|
width = "0.8",
|
||||||
|
set = function(info, r, g, b, a)
|
||||||
|
Gladdy.db.auraInterruptColors[v.key].r = r
|
||||||
|
Gladdy.db.auraInterruptColors[v.key].g = g
|
||||||
|
Gladdy.db.auraInterruptColors[v.key].b = b
|
||||||
|
Gladdy.db.auraInterruptColors[v.key].a = a
|
||||||
|
end,
|
||||||
|
get = function()
|
||||||
|
local color = Gladdy.db.auraInterruptColors[v.key]
|
||||||
|
return color.r, color.g, color.b, color.a
|
||||||
|
end
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -223,12 +485,12 @@ function Auras:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
cooldown = {
|
cooldown = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Cooldown",
|
name = L["Cooldown"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
headerAuras = {
|
headerAuras = {
|
||||||
@ -249,7 +511,20 @@ function Auras:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 4,
|
order = 4,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
font = {
|
||||||
|
type = "group",
|
||||||
|
name = L["Font"],
|
||||||
|
order = 2,
|
||||||
|
args = {
|
||||||
|
headerAuras = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Font"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
auraFont = Gladdy:option({
|
auraFont = Gladdy:option({
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Font"],
|
name = L["Font"],
|
||||||
@ -266,6 +541,7 @@ function Auras:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
auraFontColor = Gladdy:colorOption({
|
auraFontColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
@ -274,41 +550,13 @@ function Auras:GetOptions()
|
|||||||
order = 7,
|
order = 7,
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
}),
|
}),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
border = {
|
border = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Border",
|
name = L["Border"],
|
||||||
order = 2,
|
order = 3,
|
||||||
args = {
|
args = borderArgs
|
||||||
headerAuras = {
|
|
||||||
type = "header",
|
|
||||||
name = L["Border"],
|
|
||||||
order = 2,
|
|
||||||
},
|
|
||||||
auraBorderStyle = Gladdy:option({
|
|
||||||
type = "select",
|
|
||||||
name = L["Border style"],
|
|
||||||
order = 9,
|
|
||||||
values = Gladdy:GetIconStyles(),
|
|
||||||
}),
|
|
||||||
auraBuffBorderColor = Gladdy:colorOption({
|
|
||||||
type = "color",
|
|
||||||
name = L["Buff color"],
|
|
||||||
desc = L["Color of the text"],
|
|
||||||
order = 10,
|
|
||||||
hasAlpha = true,
|
|
||||||
width = "0.8",
|
|
||||||
}),
|
|
||||||
auraDebuffBorderColor = Gladdy:colorOption({
|
|
||||||
type = "color",
|
|
||||||
name = L["Debuff color"],
|
|
||||||
desc = L["Color of the text"],
|
|
||||||
order = 11,
|
|
||||||
hasAlpha = true,
|
|
||||||
width = "0.8",
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -325,6 +573,13 @@ function Auras:GetOptions()
|
|||||||
name = "Buffs",
|
name = "Buffs",
|
||||||
order = 5,
|
order = 5,
|
||||||
args = Auras:GetAuraOptions(AURA_TYPE_BUFF)
|
args = Auras:GetAuraOptions(AURA_TYPE_BUFF)
|
||||||
|
},
|
||||||
|
interruptList = {
|
||||||
|
type = "group",
|
||||||
|
childGroups = "tree",
|
||||||
|
name = "Interrupts",
|
||||||
|
order = 6,
|
||||||
|
args = Auras:GetInterruptOptions()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -334,7 +589,7 @@ function Auras:GetAuraOptions(auraType)
|
|||||||
ckeckAll = {
|
ckeckAll = {
|
||||||
order = 1,
|
order = 1,
|
||||||
width = "0.7",
|
width = "0.7",
|
||||||
name = "Check All",
|
name = L["Check All"],
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(defaultSpells(auraType)) do
|
for k,v in pairs(defaultSpells(auraType)) do
|
||||||
@ -345,7 +600,7 @@ function Auras:GetAuraOptions(auraType)
|
|||||||
uncheckAll = {
|
uncheckAll = {
|
||||||
order = 2,
|
order = 2,
|
||||||
width = "0.7",
|
width = "0.7",
|
||||||
name = "Uncheck All",
|
name = L["Uncheck All"],
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(defaultSpells(auraType)) do
|
for k,v in pairs(defaultSpells(auraType)) do
|
||||||
@ -360,19 +615,25 @@ function Auras:GetAuraOptions(auraType)
|
|||||||
tinsert(auras, v.spellID)
|
tinsert(auras, v.spellID)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
tbl_sort(auras)
|
tbl_sort(auras, function(a, b) return GetSpellInfo(a) < GetSpellInfo(b) end)
|
||||||
for i,k in ipairs(auras) do
|
for i,k in ipairs(auras) do
|
||||||
options[tostring(k)] = {
|
options[tostring(k)] = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = GetSpellInfo(k),
|
name = (Gladdy:GetImportantAuras()["Unstable Affliction Silence"]
|
||||||
|
and Gladdy:GetImportantAuras()["Unstable Affliction Silence"].spellID == k
|
||||||
|
and Gladdy:GetImportantAuras()["Unstable Affliction Silence"].altName)
|
||||||
|
or (Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))]
|
||||||
|
and Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))].spellID == k
|
||||||
|
and Gladdy:GetImportantAuras()[select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))].altName)
|
||||||
|
or GetSpellInfo(k),
|
||||||
order = i+2,
|
order = i+2,
|
||||||
icon = select(3, GetSpellInfo(k)),
|
icon = Gladdy:GetImportantAuras()[GetSpellInfo(k)] and Gladdy:GetImportantAuras()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)),
|
||||||
args = {
|
args = {
|
||||||
enabled = {
|
enabled = {
|
||||||
order = 1,
|
order = 1,
|
||||||
name = L["Enabled"],
|
name = L["Enabled"],
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
image = select(3, GetSpellInfo(k)),
|
image = Gladdy:GetImportantAuras()[GetSpellInfo(k)] and Gladdy:GetImportantAuras()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)),
|
||||||
width = "2",
|
width = "2",
|
||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
Gladdy.db.auraListDefault[tostring(k)].enabled = value
|
Gladdy.db.auraListDefault[tostring(k)].enabled = value
|
||||||
@ -395,6 +656,82 @@ function Auras:GetAuraOptions(auraType)
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
Gladdy.db.auraListDefault[tostring(k)].priority = value
|
Gladdy.db.auraListDefault[tostring(k)].priority = value
|
||||||
end,
|
end,
|
||||||
|
width = "full",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return options
|
||||||
|
end
|
||||||
|
|
||||||
|
function Auras:GetInterruptOptions()
|
||||||
|
local options = {
|
||||||
|
ckeckAll = {
|
||||||
|
order = 1,
|
||||||
|
width = "0.7",
|
||||||
|
name = L["Check All"],
|
||||||
|
type = "execute",
|
||||||
|
func = function(info)
|
||||||
|
for k,v in pairs(defaultInterrupts()) do
|
||||||
|
Gladdy.db.auraListInterrupts[k].enabled = true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
uncheckAll = {
|
||||||
|
order = 2,
|
||||||
|
width = "0.7",
|
||||||
|
name = L["Uncheck All"],
|
||||||
|
type = "execute",
|
||||||
|
func = function(info)
|
||||||
|
for k,v in pairs(defaultInterrupts()) do
|
||||||
|
Gladdy.db.auraListInterrupts[k].enabled = false
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
local auras = {}
|
||||||
|
for k,v in pairs(Gladdy:GetInterrupts()) do
|
||||||
|
tinsert(auras, v.spellID)
|
||||||
|
end
|
||||||
|
tbl_sort(auras, function(a, b) return GetSpellInfo(a) < GetSpellInfo(b) end)
|
||||||
|
for i,k in ipairs(auras) do
|
||||||
|
options[tostring(k)] = {
|
||||||
|
type = "group",
|
||||||
|
name = Gladdy:GetInterrupts()["Unstable Affliction Silence"]
|
||||||
|
and Gladdy:GetInterrupts()["Unstable Affliction Silence"].spellID == k
|
||||||
|
and Gladdy:GetInterrupts()["Unstable Affliction Silence"].altName
|
||||||
|
or GetSpellInfo(k),
|
||||||
|
order = i+2,
|
||||||
|
icon = Gladdy:GetInterrupts()[GetSpellInfo(k)] and Gladdy:GetInterrupts()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)),
|
||||||
|
args = {
|
||||||
|
enabled = {
|
||||||
|
order = 1,
|
||||||
|
name = L["Enabled"],
|
||||||
|
type = "toggle",
|
||||||
|
image = Gladdy:GetInterrupts()[GetSpellInfo(k)] and Gladdy:GetInterrupts()[GetSpellInfo(k)].texture or select(3, GetSpellInfo(k)),
|
||||||
|
width = "2",
|
||||||
|
set = function(info, value)
|
||||||
|
Gladdy.db.auraListInterrupts[tostring(k)].enabled = value
|
||||||
|
end,
|
||||||
|
get = function(info)
|
||||||
|
return Gladdy.db.auraListInterrupts[tostring(k)].enabled
|
||||||
|
end
|
||||||
|
},
|
||||||
|
priority = {
|
||||||
|
order = 2,
|
||||||
|
name = L["Priority"],
|
||||||
|
type = "range",
|
||||||
|
min = 0,
|
||||||
|
max = 50,
|
||||||
|
width = "2",
|
||||||
|
step = 1,
|
||||||
|
get = function(info)
|
||||||
|
return Gladdy.db.auraListInterrupts[tostring(k)].priority
|
||||||
|
end,
|
||||||
|
set = function(info, value)
|
||||||
|
Gladdy.db.auraListInterrupts[tostring(k)].priority = value
|
||||||
|
end,
|
||||||
|
width = "full",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,20 @@
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
local select, lower, ceil, tremove, tinsert, pairs, ipairs = select, string.lower, ceil, tremove, tinsert, pairs, ipairs
|
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring
|
||||||
local auraTypeColor = { }
|
|
||||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
||||||
|
|
||||||
auraTypeColor["none"] = { r = 0.80, g = 0, b = 0 , a = 1}
|
|
||||||
auraTypeColor["magic"] = { r = 0.20, g = 0.60, b = 1.00, a = 1}
|
|
||||||
auraTypeColor["curse"] = { r = 0.60, g = 0.00, b = 1.00, a = 1 }
|
|
||||||
auraTypeColor["disease"] = { r = 0.60, g = 0.40, b = 0, a = 1 }
|
|
||||||
auraTypeColor["poison"] = { r = 0.00, g = 0.60, b = 0, a = 1 }
|
|
||||||
auraTypeColor["immune"] = { r = 1.00, g = 0.02, b = 0.99, a = 1 }
|
|
||||||
auraTypeColor["form"] = auraTypeColor["none"]
|
|
||||||
auraTypeColor["aura"] = auraTypeColor["none"]
|
|
||||||
auraTypeColor[""] = auraTypeColor["none"]
|
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
-- Module init
|
-- Module init
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local defaultTrackedDebuffs = select(2, Gladdy:GetAuras("debuff"))
|
local defaultTrackedDebuffs = select(2, Gladdy:GetAuras(AURA_TYPE_DEBUFF))
|
||||||
local defaultTrackedBuffs = select(2, Gladdy:GetAuras("buff"))
|
local defaultTrackedBuffs = select(2, Gladdy:GetAuras(AURA_TYPE_BUFF))
|
||||||
local BuffsDebuffs = Gladdy:NewModule("BuffsDebuffs", nil, {
|
local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, {
|
||||||
buffsEnabled = true,
|
buffsEnabled = true,
|
||||||
buffsShowAuraDebuffs = false,
|
buffsShowAuraDebuffs = false,
|
||||||
buffsAlpha = 1,
|
buffsAlpha = 1,
|
||||||
@ -54,14 +44,14 @@ local BuffsDebuffs = Gladdy:NewModule("BuffsDebuffs", nil, {
|
|||||||
buffsBorderColorsEnabled = true,
|
buffsBorderColorsEnabled = true,
|
||||||
trackedDebuffs = defaultTrackedDebuffs,
|
trackedDebuffs = defaultTrackedDebuffs,
|
||||||
trackedBuffs = defaultTrackedBuffs,
|
trackedBuffs = defaultTrackedBuffs,
|
||||||
buffsBorderColorCurse = auraTypeColor["curse"],
|
buffsBorderColorCurse = Gladdy:GetAuraTypeColor()["curse"],
|
||||||
buffsBorderColorMagic = auraTypeColor["magic"],
|
buffsBorderColorMagic = Gladdy:GetAuraTypeColor()["magic"],
|
||||||
buffsBorderColorPoison = auraTypeColor["poison"],
|
buffsBorderColorPoison = Gladdy:GetAuraTypeColor()["poison"],
|
||||||
buffsBorderColorPhysical = auraTypeColor["none"],
|
buffsBorderColorPhysical = Gladdy:GetAuraTypeColor()["none"],
|
||||||
buffsBorderColorImmune = auraTypeColor["immune"],
|
buffsBorderColorImmune = Gladdy:GetAuraTypeColor()["immune"],
|
||||||
buffsBorderColorDisease = auraTypeColor["disease"],
|
buffsBorderColorDisease = Gladdy:GetAuraTypeColor()["disease"],
|
||||||
buffsBorderColorForm = auraTypeColor["form"],
|
buffsBorderColorForm = Gladdy:GetAuraTypeColor()["form"],
|
||||||
buffsBorderColorAura = auraTypeColor["aura"]
|
buffsBorderColorAura = Gladdy:GetAuraTypeColor()["aura"]
|
||||||
})
|
})
|
||||||
|
|
||||||
local spellSchoolToOptionValueTable
|
local spellSchoolToOptionValueTable
|
||||||
@ -145,18 +135,26 @@ end
|
|||||||
function BuffsDebuffs:Test(unit)
|
function BuffsDebuffs:Test(unit)
|
||||||
if Gladdy.db.buffsEnabled then
|
if Gladdy.db.buffsEnabled then
|
||||||
if unit == "arena1" or unit == "arena3" then
|
if unit == "arena1" or unit == "arena3" then
|
||||||
self:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 10, 10, 1,"physical", select(3, GetSpellInfo(1943)), 1)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
self:AddOrRefreshAura(unit, 18647, AURA_TYPE_DEBUFF, 10, 10,1, "immune", select(3, GetSpellInfo(18647)), 2)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
self:AddOrRefreshAura(unit, 27218, AURA_TYPE_DEBUFF, 24, 20,1, "curse", select(3, GetSpellInfo(27218)), 3)
|
|
||||||
self:AddOrRefreshAura(unit, 27216, AURA_TYPE_DEBUFF, 18, 18,1, "magic", select(3, GetSpellInfo(27216)), 4)
|
BuffsDebuffs:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 12, 12, 1, "physical", select(3, GetSpellInfo(1943)), 1)
|
||||||
self:AddOrRefreshAura(unit, 27189, AURA_TYPE_DEBUFF, 12, 12,5, "poison", select(3, GetSpellInfo(27189)), 5)
|
BuffsDebuffs:AddOrRefreshAura(unit, 18647, AURA_TYPE_DEBUFF, 10, 10, 1, "immune", select(3, GetSpellInfo(18647)), 2)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(32999)), 1)
|
BuffsDebuffs:AddOrRefreshAura(unit, 27218, AURA_TYPE_DEBUFF, 9, 9, 1, "curse", select(3, GetSpellInfo(27218)), 3)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(25389)), 2)
|
BuffsDebuffs:AddOrRefreshAura(unit, 27216, AURA_TYPE_DEBUFF, 9, 9, 1, "magic", select(3, GetSpellInfo(27216)), 4)
|
||||||
elseif unit == "arena2" then
|
BuffsDebuffs:AddOrRefreshAura(unit, 27189, AURA_TYPE_DEBUFF, 9, 9, 5, "poison", select(3, GetSpellInfo(27189)), 5)
|
||||||
self:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 10, 10, 1, "physical", select(3, GetSpellInfo(1943)), 1)
|
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_DEBUFF, 20, 20,5, "poison", select(3, GetSpellInfo(1)), 2)
|
BuffsDebuffs:AddOrRefreshAura(unit, 33076, AURA_TYPE_BUFF, 15, 15, 1, "magic", select(3, GetSpellInfo(33076)), 1)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(32999)), 1)
|
BuffsDebuffs:AddOrRefreshAura(unit, 26980, AURA_TYPE_BUFF, 12, 12, 5, "magic", select(3, GetSpellInfo(26980)), 2)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(25389)), 2)
|
else
|
||||||
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
|
||||||
|
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 12, 12, 1, "poison", select(3, GetSpellInfo(1943)), 1)
|
||||||
|
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 10, 10, 2, "magic", select(3, GetSpellInfo(1)), 2)
|
||||||
|
|
||||||
|
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 12, 12, 3, "physical", select(3, GetSpellInfo(27009)), 1)
|
||||||
|
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 11, 11, 4, "disease", select(3, GetSpellInfo(11426)), 2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -196,11 +194,13 @@ function BuffsDebuffs:AURA_GAIN(unit, auraType, spellID, spellName, texture, dur
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local auraFrame = self.frames[unit]
|
local auraFrame = self.frames[unit]
|
||||||
local aura = Gladdy.db.auraListDefault[spellName] and Gladdy.db.auraListDefault[spellName].enabled
|
local aura = Gladdy:GetImportantAuras()[spellName] and Gladdy.db.auraListDefault[tostring(Gladdy:GetImportantAuras()[spellName].spellID)].enabled
|
||||||
if aura and Gladdy.db.buffsShowAuraDebuffs then
|
if aura and Gladdy.db.buffsShowAuraDebuffs then
|
||||||
aura = false
|
aura = false
|
||||||
end
|
end
|
||||||
if not aura and spellID and expirationTime and (Gladdy.db.trackedBuffs[spellName] or Gladdy.db.trackedDebuffs[spellName]) then
|
local auraNames = LibClassAuras.GetSpellNameToId(auraType)
|
||||||
|
local spellId = auraNames[spellName] and auraNames[spellName].id[1]
|
||||||
|
if not aura and spellID and spellId and expirationTime and (Gladdy.db.trackedBuffs[tostring(spellId)] or Gladdy.db.trackedDebuffs[tostring(spellId)]) then
|
||||||
local index
|
local index
|
||||||
if auraType == AURA_TYPE_DEBUFF then
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
auraFrame.numDebuffs = auraFrame.numDebuffs + 1
|
auraFrame.numDebuffs = auraFrame.numDebuffs + 1
|
||||||
@ -218,15 +218,16 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function BuffsDebuffs:CreateFrame(unit)
|
function BuffsDebuffs:CreateFrame(unit)
|
||||||
|
local verticalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
local debuffFrame = CreateFrame("Frame", "GladdyDebuffs" .. unit, Gladdy.buttons[unit])
|
local debuffFrame = CreateFrame("Frame", "GladdyDebuffs" .. unit, Gladdy.buttons[unit])
|
||||||
debuffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
debuffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
||||||
debuffFrame:SetWidth(1)
|
debuffFrame:SetWidth(1)
|
||||||
debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, Gladdy.db.highlightBorderSize + Gladdy.db.padding)
|
debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin)
|
||||||
debuffFrame.unit = unit
|
debuffFrame.unit = unit
|
||||||
local buffFrame = CreateFrame("Frame", "GladdyBuffs" .. unit, Gladdy.buttons[unit])
|
local buffFrame = CreateFrame("Frame", "GladdyBuffs" .. unit, Gladdy.buttons[unit])
|
||||||
buffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
buffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
||||||
buffFrame:SetWidth(1)
|
buffFrame:SetWidth(1)
|
||||||
buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, Gladdy.db.highlightBorderSize + Gladdy.db.padding)
|
buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin)
|
||||||
buffFrame.unit = unit
|
buffFrame.unit = unit
|
||||||
self.frames[unit] = {}
|
self.frames[unit] = {}
|
||||||
self.frames[unit].buffFrame = buffFrame
|
self.frames[unit].buffFrame = buffFrame
|
||||||
@ -269,7 +270,10 @@ end
|
|||||||
function BuffsDebuffs:UpdateFrame(unit)
|
function BuffsDebuffs:UpdateFrame(unit)
|
||||||
self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize)
|
||||||
self.frames[unit].debuffFrame:ClearAllPoints()
|
self.frames[unit].debuffFrame:ClearAllPoints()
|
||||||
local horizontalMargin = Gladdy.db.highlightBorderSize
|
|
||||||
|
--DEBUFFS
|
||||||
|
local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0
|
||||||
|
local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize)
|
||||||
local verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
local verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
||||||
if Gladdy.db.buffsCooldownPos == "TOP" then
|
if Gladdy.db.buffsCooldownPos == "TOP" then
|
||||||
verticalMargin = horizontalMargin + 1
|
verticalMargin = horizontalMargin + 1
|
||||||
@ -287,12 +291,12 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
verticalMargin = verticalMargin + Gladdy.db.cooldownSize
|
verticalMargin = verticalMargin + Gladdy.db.cooldownSize
|
||||||
end
|
end
|
||||||
if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then
|
if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then
|
||||||
self.frames[unit].debuffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].powerBar, "BOTTOMRIGHT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin)
|
self.frames[unit].debuffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight)
|
||||||
else
|
else
|
||||||
self.frames[unit].debuffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].powerBar, "BOTTOMLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin)
|
self.frames[unit].debuffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight)
|
||||||
end
|
end
|
||||||
elseif Gladdy.db.buffsCooldownPos == "LEFT" then
|
elseif Gladdy.db.buffsCooldownPos == "LEFT" then
|
||||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
||||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
||||||
@ -310,9 +314,10 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--BUFFS
|
||||||
self.frames[unit].buffFrame:SetHeight(Gladdy.db.buffsBuffsIconSize)
|
self.frames[unit].buffFrame:SetHeight(Gladdy.db.buffsBuffsIconSize)
|
||||||
self.frames[unit].buffFrame:ClearAllPoints()
|
self.frames[unit].buffFrame:ClearAllPoints()
|
||||||
horizontalMargin = Gladdy.db.highlightBorderSize
|
horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize)
|
||||||
verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
||||||
if Gladdy.db.buffsBuffsCooldownPos == "TOP" then
|
if Gladdy.db.buffsBuffsCooldownPos == "TOP" then
|
||||||
verticalMargin = horizontalMargin + 1
|
verticalMargin = horizontalMargin + 1
|
||||||
@ -330,9 +335,9 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
verticalMargin = verticalMargin + Gladdy.db.cooldownSize
|
verticalMargin = verticalMargin + Gladdy.db.cooldownSize
|
||||||
end
|
end
|
||||||
if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then
|
if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then
|
||||||
self.frames[unit].buffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].powerBar, "BOTTOMRIGHT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin)
|
self.frames[unit].buffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight)
|
||||||
else
|
else
|
||||||
self.frames[unit].buffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].powerBar, "BOTTOMLEFT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin)
|
self.frames[unit].buffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight)
|
||||||
end
|
end
|
||||||
elseif Gladdy.db.buffsBuffsCooldownPos == "LEFT" then
|
elseif Gladdy.db.buffsBuffsCooldownPos == "LEFT" then
|
||||||
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
||||||
@ -361,7 +366,7 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
--self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
--self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||||
|
|
||||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||||
else
|
else
|
||||||
@ -395,7 +400,7 @@ function BuffsDebuffs:UpdateFrame(unit)
|
|||||||
--self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
--self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||||
|
|
||||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||||
else
|
else
|
||||||
@ -459,10 +464,6 @@ function BuffsDebuffs:UpdateAurasOnUnit(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BuffsDebuffs:UNIT_DEATH(destUnit)
|
|
||||||
self:RemoveAuras(destUnit)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function iconTimer(auraFrame, elapsed)
|
local function iconTimer(auraFrame, elapsed)
|
||||||
if auraFrame.endtime ~= "undefined" then
|
if auraFrame.endtime ~= "undefined" then
|
||||||
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
||||||
@ -502,8 +503,10 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack
|
|||||||
aura = tremove(self.framePool, #self.framePool)
|
aura = tremove(self.framePool, #self.framePool)
|
||||||
else
|
else
|
||||||
aura = CreateFrame("Frame")
|
aura = CreateFrame("Frame")
|
||||||
|
aura:EnableMouse(false)
|
||||||
aura:SetFrameLevel(3)
|
aura:SetFrameLevel(3)
|
||||||
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
||||||
|
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
aura.texture:SetAllPoints(aura)
|
aura.texture:SetAllPoints(aura)
|
||||||
aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
|
aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate")
|
||||||
aura.cooldowncircle:SetFrameLevel(4)
|
aura.cooldowncircle:SetFrameLevel(4)
|
||||||
@ -613,7 +616,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
},
|
},
|
||||||
buffsEnabled = Gladdy:option({
|
buffsEnabled = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Enable"],
|
name = L["Enabled"],
|
||||||
desc = L["Enabled Buffs and Debuffs module"],
|
desc = L["Enabled Buffs and Debuffs module"],
|
||||||
order = 3,
|
order = 3,
|
||||||
}),
|
}),
|
||||||
@ -626,7 +629,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 5,
|
order = 5,
|
||||||
args = {
|
args = {
|
||||||
buffs = {
|
buffs = {
|
||||||
@ -636,7 +639,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Size & Padding",
|
name = L["Size & Padding"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -652,6 +655,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 5,
|
min = 5,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsBuffsWidthFactor = Gladdy:option({
|
buffsBuffsWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -661,6 +665,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsBuffsIconPadding = Gladdy:option({
|
buffsBuffsIconPadding = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -670,12 +675,13 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
position = {
|
position = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Position",
|
name = L["Position"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -712,6 +718,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsBuffsYOffset = Gladdy:option({
|
buffsBuffsYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -720,6 +727,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -740,6 +748,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -752,7 +761,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Size & Padding",
|
name = L["Size & Padding"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -768,6 +777,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 5,
|
min = 5,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsWidthFactor = Gladdy:option({
|
buffsWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -777,6 +787,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsIconPadding = Gladdy:option({
|
buffsIconPadding = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -786,12 +797,13 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
position = {
|
position = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Position",
|
name = L["Position"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -828,6 +840,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsYOffset = Gladdy:option({
|
buffsYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -836,6 +849,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -856,6 +870,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -863,7 +878,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
},
|
},
|
||||||
cooldown = {
|
cooldown = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Cooldown",
|
name = L["Cooldown"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -875,6 +890,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
order = 9,
|
order = 9,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsCooldownAlpha = Gladdy:option({
|
buffsCooldownAlpha = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -883,6 +899,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 10,
|
order = 10,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -912,6 +929,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
buffsDynamicColor = Gladdy:option({
|
buffsDynamicColor = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
@ -1021,7 +1039,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
type = "group",
|
type = "group",
|
||||||
order = 11,
|
order = 11,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = select(1, Gladdy:GetAuras("debuff")),
|
args = select(1, Gladdy:GetAuras(AURA_TYPE_DEBUFF)),
|
||||||
set = function(info, state)
|
set = function(info, state)
|
||||||
local optionKey = info[#info]
|
local optionKey = info[#info]
|
||||||
Gladdy.dbi.profile.trackedDebuffs[optionKey] = state
|
Gladdy.dbi.profile.trackedDebuffs[optionKey] = state
|
||||||
@ -1036,7 +1054,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
type = "group",
|
type = "group",
|
||||||
order = 12,
|
order = 12,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = select(1, Gladdy:GetAuras("buffs")),
|
args = select(1, Gladdy:GetAuras(AURA_TYPE_BUFF)),
|
||||||
set = function(info, state)
|
set = function(info, state)
|
||||||
local optionKey = info[#info]
|
local optionKey = info[#info]
|
||||||
Gladdy.dbi.profile.trackedBuffs[optionKey] = state
|
Gladdy.dbi.profile.trackedBuffs[optionKey] = state
|
||||||
|
@ -18,7 +18,8 @@ local BackdropTemplateMixin = BackdropTemplateMixin
|
|||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||||
local Castbar = Gladdy:NewModule("Castbar", 70, {
|
local Castbar = Gladdy:NewModule("Cast Bar", 70, {
|
||||||
|
castBarEnabled = true,
|
||||||
castBarHeight = 20,
|
castBarHeight = 20,
|
||||||
castBarWidth = 160,
|
castBarWidth = 160,
|
||||||
castBarIconSize = 22,
|
castBarIconSize = 22,
|
||||||
@ -57,6 +58,7 @@ end
|
|||||||
|
|
||||||
function Castbar:CreateFrame(unit)
|
function Castbar:CreateFrame(unit)
|
||||||
local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
castBar:EnableMouse(false)
|
||||||
castBar.unit = unit
|
castBar.unit = unit
|
||||||
|
|
||||||
castBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.castBarBorderStyle),
|
castBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.castBarBorderStyle),
|
||||||
@ -85,6 +87,7 @@ function Castbar:CreateFrame(unit)
|
|||||||
|
|
||||||
castBar.icon = CreateFrame("Frame", nil, castBar)
|
castBar.icon = CreateFrame("Frame", nil, castBar)
|
||||||
castBar.icon.texture = castBar.icon:CreateTexture(nil, "BACKGROUND")
|
castBar.icon.texture = castBar.icon:CreateTexture(nil, "BACKGROUND")
|
||||||
|
castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
castBar.icon.texture:SetAllPoints(castBar.icon)
|
castBar.icon.texture:SetAllPoints(castBar.icon)
|
||||||
castBar.icon.texture.overlay = castBar.icon:CreateTexture(nil, "BORDER")
|
castBar.icon.texture.overlay = castBar.icon:CreateTexture(nil, "BORDER")
|
||||||
castBar.icon.texture.overlay:SetAllPoints(castBar.icon.texture)
|
castBar.icon.texture.overlay:SetAllPoints(castBar.icon.texture)
|
||||||
@ -163,7 +166,7 @@ function Castbar:UpdateFrame(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
castBar:ClearAllPoints()
|
castBar:ClearAllPoints()
|
||||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
if (Gladdy.db.castBarPos == "LEFT") then
|
if (Gladdy.db.castBarPos == "LEFT") then
|
||||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
@ -437,42 +440,41 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Castbar:JOINED_ARENA()
|
function Castbar:JOINED_ARENA()
|
||||||
for i=1, Gladdy.curBracket do
|
if Gladdy.db.castBarEnabled then
|
||||||
local unit = "arena" .. i
|
for i=1, Gladdy.curBracket do
|
||||||
local castBar = self.frames[unit]
|
local unit = "arena" .. i
|
||||||
castBar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
|
local castBar = self.frames[unit]
|
||||||
castBar:RegisterEvent("UNIT_SPELLCAST_DELAYED")
|
castBar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
|
||||||
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
castBar:RegisterEvent("UNIT_SPELLCAST_DELAYED")
|
||||||
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE")
|
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
||||||
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP")
|
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE")
|
||||||
castBar:RegisterUnitEvent("UNIT_SPELLCAST_START", unit)
|
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP")
|
||||||
castBar:RegisterUnitEvent("UNIT_SPELLCAST_STOP", unit)
|
castBar:RegisterUnitEvent("UNIT_SPELLCAST_START", unit)
|
||||||
castBar:RegisterUnitEvent("UNIT_SPELLCAST_FAILED", unit)
|
castBar:RegisterUnitEvent("UNIT_SPELLCAST_STOP", unit)
|
||||||
castBar:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", unit)
|
castBar:RegisterUnitEvent("UNIT_SPELLCAST_FAILED", unit)
|
||||||
castBar:SetScript("OnEvent", Castbar.OnEvent)
|
castBar:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", unit)
|
||||||
castBar:SetScript("OnUpdate", Castbar.OnUpdate)
|
castBar:SetScript("OnEvent", Castbar.OnEvent)
|
||||||
castBar.fadeOut = nil
|
castBar:SetScript("OnUpdate", Castbar.OnUpdate)
|
||||||
self:CAST_STOP(unit)
|
castBar.fadeOut = nil
|
||||||
--Castbar.OnEvent(castBar, "PLAYER_ENTERING_WORLD")
|
self:CAST_STOP(unit)
|
||||||
|
--Castbar.OnEvent(castBar, "PLAYER_ENTERING_WORLD")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Castbar:ResetUnit(unit)
|
function Castbar:ResetUnit(unit)
|
||||||
local castBar = self.frames[unit]
|
local castBar = self.frames[unit]
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_INTERRUPTED")
|
castBar:UnregisterAllEvents()
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_DELAYED")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_STOP")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_START")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_STOP")
|
|
||||||
castBar:UnregisterEvent("UNIT_SPELLCAST_FAILED")
|
|
||||||
castBar:SetScript("OnEvent", nil)
|
castBar:SetScript("OnEvent", nil)
|
||||||
castBar:SetScript("OnUpdate", nil)
|
castBar:SetScript("OnUpdate", nil)
|
||||||
castBar.fadeOut = nil
|
castBar.fadeOut = nil
|
||||||
self:CAST_STOP(unit)
|
self:CAST_STOP(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Castbar:Reset()
|
||||||
|
self.test = nil
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
-- TEST
|
-- TEST
|
||||||
@ -480,25 +482,30 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Castbar:Test(unit)
|
function Castbar:Test(unit)
|
||||||
local spell, _, icon, value, maxValue, event, endTime, startTime
|
self.test = true
|
||||||
|
if Gladdy.db.castBarEnabled then
|
||||||
|
local spell, _, icon, value, maxValue, event, endTime, startTime
|
||||||
|
|
||||||
if (unit == "arena2") then
|
if (unit == "arena2") then
|
||||||
spell, _, icon = GetSpellInfo(27072)
|
spell, _, icon = GetSpellInfo(27072)
|
||||||
value, maxValue, event = 0, 40, "cast"
|
value, maxValue, event = 0, 40, "cast"
|
||||||
elseif (unit == "arena1") then
|
elseif (unit == "arena1") then
|
||||||
spell, _, icon = GetSpellInfo(27220)
|
spell, _, icon = GetSpellInfo(27220)
|
||||||
endTime = GetTime() * 1000 + 60*1000
|
endTime = GetTime() * 1000 + 60*1000
|
||||||
startTime = GetTime() * 1000
|
startTime = GetTime() * 1000
|
||||||
value = (endTime / 1000) - GetTime()
|
value = (endTime / 1000) - GetTime()
|
||||||
maxValue = (endTime - startTime) / 1000
|
maxValue = (endTime - startTime) / 1000
|
||||||
event = "channel"
|
event = "channel"
|
||||||
elseif (unit == "arena3") then
|
else
|
||||||
spell, _, icon = GetSpellInfo(20770)
|
spell, _, icon = GetSpellInfo(20770)
|
||||||
value, maxValue, event = 0, 60, "cast"
|
value, maxValue, event = 0, 60, "cast"
|
||||||
end
|
end
|
||||||
|
|
||||||
if (spell) then
|
if (spell) then
|
||||||
self:CAST_START(unit, spell, icon, value, maxValue, event)
|
self:CAST_START(unit, spell, icon, value, maxValue, event)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:CAST_STOP(unit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -517,7 +524,7 @@ local function option(params)
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
local key = info.arg or info[#info]
|
local key = info.arg or info[#info]
|
||||||
Gladdy.dbi.profile[key] = value
|
Gladdy.dbi.profile[key] = value
|
||||||
Gladdy.options.args.Castbar.args.group.args.barFrame.args.castBarBorderSize.max = Gladdy.db.castBarHeight/2
|
Gladdy.options.args["Cast Bar"].args.group.args.barFrame.args.castBarBorderSize.max = Gladdy.db.castBarHeight/2
|
||||||
if Gladdy.db.castBarBorderSize > Gladdy.db.castBarHeight/2 then
|
if Gladdy.db.castBarBorderSize > Gladdy.db.castBarHeight/2 then
|
||||||
Gladdy.db.castBarBorderSize = Gladdy.db.castBarHeight/2
|
Gladdy.db.castBarBorderSize = Gladdy.db.castBarHeight/2
|
||||||
end
|
end
|
||||||
@ -539,15 +546,21 @@ function Castbar:GetOptions()
|
|||||||
name = L["Cast Bar"],
|
name = L["Cast Bar"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
castBarEnabled = option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enabled"],
|
||||||
|
desc = L["If test is running, type \"/gladdy test\" again"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
barFrame = {
|
barFrame = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Bar",
|
name = L["Bar"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
headerSize = {
|
headerSize = {
|
||||||
@ -563,6 +576,7 @@ function Castbar:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
castBarWidth = option({
|
castBarWidth = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -572,6 +586,7 @@ function Castbar:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 300,
|
max = 300,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
headerTexture = {
|
headerTexture = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -612,6 +627,7 @@ function Castbar:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = Gladdy.db.castBarHeight/2,
|
max = Gladdy.db.castBarHeight/2,
|
||||||
step = 0.5,
|
step = 0.5,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
castBarBorderStyle = option({
|
castBarBorderStyle = option({
|
||||||
type = "select",
|
type = "select",
|
||||||
@ -630,7 +646,7 @@ function Castbar:GetOptions()
|
|||||||
},
|
},
|
||||||
icon = {
|
icon = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Icon",
|
name = L["Icon"],
|
||||||
order = 2,
|
order = 2,
|
||||||
args = {
|
args = {
|
||||||
headerSize = {
|
headerSize = {
|
||||||
@ -645,6 +661,7 @@ function Castbar:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
headerBorder = {
|
headerBorder = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -667,7 +684,7 @@ function Castbar:GetOptions()
|
|||||||
},
|
},
|
||||||
spark = {
|
spark = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Spark",
|
name = L["Spark"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -691,7 +708,7 @@ function Castbar:GetOptions()
|
|||||||
},
|
},
|
||||||
font = {
|
font = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Font",
|
name = L["Font"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -721,6 +738,7 @@ function Castbar:GetOptions()
|
|||||||
order = 4,
|
order = 4,
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
headerFormat = {
|
headerFormat = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -741,7 +759,7 @@ function Castbar:GetOptions()
|
|||||||
},
|
},
|
||||||
position = {
|
position = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "Position",
|
name = L["Position"],
|
||||||
order = 5,
|
order = 5,
|
||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
@ -779,6 +797,7 @@ function Castbar:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
castBarYOffset = option({
|
castBarYOffset = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -787,6 +806,7 @@ function Castbar:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,27 +1,96 @@
|
|||||||
|
local select = select
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
|
local GetSpellInfo = GetSpellInfo
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local Classicon = Gladdy:NewModule("Classicon", 80, {
|
local Classicon = Gladdy:NewModule("Class Icon", 80, {
|
||||||
classIconPos = "LEFT",
|
classIconPos = "LEFT",
|
||||||
classIconSize = 60 + 20 + 1,
|
classIconSize = 60 + 20 + 1,
|
||||||
classIconWidthFactor = 0.9,
|
classIconWidthFactor = 0.9,
|
||||||
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
classIconBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
classIconBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
|
classIconSpecIcon = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\"
|
||||||
|
local classIcons = {
|
||||||
|
["DRUID"] = classIconPath .. "inv_misc_monsterclaw_04",
|
||||||
|
["HUNTER"] = classIconPath .. "inv_weapon_bow_07",
|
||||||
|
["MAGE"] = classIconPath .. "inv_staff_13",
|
||||||
|
["PALADIN"] = classIconPath .. "inv_hammer_01",
|
||||||
|
["PRIEST"] = classIconPath .. "inv_staff_30",
|
||||||
|
["ROGUE"] = classIconPath .. "inv_throwingknife_04",
|
||||||
|
["SHAMAN"] = classIconPath .. "inv_jewelry_talisman_04",
|
||||||
|
["WARLOCK"] = classIconPath .. "spell_nature_drowsy",
|
||||||
|
["WARRIOR"] = classIconPath .. "inv_sword_27",
|
||||||
|
}
|
||||||
|
|
||||||
|
local specIcons = {
|
||||||
|
--DRUID
|
||||||
|
["DRUID"] = {
|
||||||
|
[L["Balance"]] = select(3, GetSpellInfo(8921)), -- Moonfire
|
||||||
|
[L["Feral"]] = select(3, GetSpellInfo(27545)), -- Cat Form
|
||||||
|
[L["Restoration"]] = select(3, GetSpellInfo(5185)), -- Healing Touch
|
||||||
|
},
|
||||||
|
["HUNTER"] = {
|
||||||
|
[L["Beast Mastery"]] = select(3, GetSpellInfo(1515)), -- Tame Beast
|
||||||
|
[L["Marksmanship"]] = select(3, GetSpellInfo(42243)), -- Volley
|
||||||
|
[L["Survival"]] = select(3, GetSpellInfo(1495)), -- Mongoose Bite
|
||||||
|
},
|
||||||
|
["MAGE"] = {
|
||||||
|
[L["Arcane"]] = select(3, GetSpellInfo(1459)), -- Arcane Intellect
|
||||||
|
[L["Fire"]] = select(3, GetSpellInfo(133)), -- Fireball
|
||||||
|
[L["Frost"]] = select(3, GetSpellInfo(116)), -- Frostbolt
|
||||||
|
},
|
||||||
|
["PALADIN"] = {
|
||||||
|
[L["Holy"]] = select(3, GetSpellInfo(635)), -- Holy Light
|
||||||
|
[L["Retribution"]] = select(3, GetSpellInfo(7294)), -- Retribution Aura
|
||||||
|
[L["Protection"]] = select(3, GetSpellInfo(32828)), -- Protection Aura
|
||||||
|
},
|
||||||
|
["PRIEST"] = {
|
||||||
|
[L["Discipline"]] = select(3, GetSpellInfo(1243)), -- Power Word: Fortitude
|
||||||
|
[L["Shadow"]] = select(3, GetSpellInfo(589)), -- Shadow Word: Pain
|
||||||
|
[L["Holy"]] = select(3, GetSpellInfo(635)), -- Holy Light
|
||||||
|
},
|
||||||
|
["ROGUE"] = {
|
||||||
|
[L["Assassination"]] = select(3, GetSpellInfo(1329)), -- Mutilate (Eviscerate? 2098)
|
||||||
|
[L["Combat"]] = select(3, GetSpellInfo(53)), -- Backstab
|
||||||
|
[L["Subtlety"]] = select(3, GetSpellInfo(1784)), -- Stealth
|
||||||
|
},
|
||||||
|
["SHAMAN"] = {
|
||||||
|
[L["Elemental"]] = select(3, GetSpellInfo(403)), -- Lightning Bolt
|
||||||
|
[L["Enhancement"]] = select(3, GetSpellInfo(324)), -- Lightning Shield
|
||||||
|
[L["Restoration"]] = select(3, GetSpellInfo(331)), -- Healing Wave
|
||||||
|
},
|
||||||
|
["WARLOCK"] = {
|
||||||
|
[L["Affliction"]] = select(3, GetSpellInfo(6789)), -- Affliction
|
||||||
|
[L["Demonology"]] = select(3, GetSpellInfo(5500)), -- Sense Demons
|
||||||
|
[L["Destruction"]] = select(3, GetSpellInfo(5740)), -- Rain of Fire
|
||||||
|
},
|
||||||
|
["WARRIOR"] = {
|
||||||
|
[L["Arms"]] = select(3, GetSpellInfo(12294)), -- Mortal Strike
|
||||||
|
[L["Fury"]] = select(3, GetSpellInfo(12325)), -- Inner Rage
|
||||||
|
[L["Protection"]] = select(3, GetSpellInfo(71)), -- Defensive Stance
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
function Classicon:Initialize()
|
function Classicon:Initialize()
|
||||||
self.frames = {}
|
self.frames = {}
|
||||||
|
|
||||||
self:RegisterMessage("ENEMY_SPOTTED")
|
self:RegisterMessage("ENEMY_SPOTTED")
|
||||||
self:RegisterMessage("UNIT_DEATH")
|
self:RegisterMessage("UNIT_DEATH")
|
||||||
|
self:RegisterMessage("UNIT_SPEC")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Classicon:CreateFrame(unit)
|
function Classicon:CreateFrame(unit)
|
||||||
local classIcon = CreateFrame("Frame", nil, Gladdy.buttons[unit])
|
local classIcon = CreateFrame("Frame", nil, Gladdy.buttons[unit])
|
||||||
|
classIcon:EnableMouse(false)
|
||||||
classIcon:SetFrameStrata("MEDIUM")
|
classIcon:SetFrameStrata("MEDIUM")
|
||||||
classIcon:SetFrameLevel(1)
|
classIcon:SetFrameLevel(1)
|
||||||
classIcon.texture = classIcon:CreateTexture(nil, "BACKGROUND")
|
classIcon.texture = classIcon:CreateTexture(nil, "BACKGROUND")
|
||||||
classIcon.texture:SetAllPoints(classIcon)
|
classIcon.texture:SetAllPoints(classIcon)
|
||||||
|
classIcon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
|
||||||
classIcon.texture.overlay = classIcon:CreateTexture(nil, "BORDER")
|
classIcon.texture.overlay = classIcon:CreateTexture(nil, "BORDER")
|
||||||
classIcon.texture.overlay:SetAllPoints(classIcon)
|
classIcon.texture.overlay:SetAllPoints(classIcon)
|
||||||
@ -51,7 +120,7 @@ function Classicon:UpdateFrame(unit)
|
|||||||
classIcon:SetHeight(Gladdy.db.classIconSize)
|
classIcon:SetHeight(Gladdy.db.classIconSize)
|
||||||
|
|
||||||
classIcon:ClearAllPoints()
|
classIcon:ClearAllPoints()
|
||||||
local margin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
if (Gladdy.db.classIconPos == "LEFT") then
|
if (Gladdy.db.classIconPos == "LEFT") then
|
||||||
classIcon:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0)
|
classIcon:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0)
|
||||||
else
|
else
|
||||||
@ -65,6 +134,25 @@ function Classicon:UpdateFrame(unit)
|
|||||||
classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a)
|
classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Classicon:ENEMY_SPOTTED(unit)
|
||||||
|
local classIcon = self.frames[unit]
|
||||||
|
if (not classIcon) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
classIcon.texture:SetTexture(classIcons[Gladdy.buttons[unit].class])
|
||||||
|
--classIcon.texture:SetTexCoord(unpack(CLASS_BUTTONS[Gladdy.buttons[unit].class]))
|
||||||
|
classIcon.texture:SetAllPoints(classIcon)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Classicon:UNIT_SPEC(unit, spec)
|
||||||
|
local classIcon = self.frames[unit]
|
||||||
|
if (not Gladdy.db.classIconSpecIcon or not classIcon) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
classIcon.texture:SetTexture(specIcons[Gladdy.buttons[unit].class][spec])
|
||||||
|
end
|
||||||
|
|
||||||
function Classicon:Test(unit)
|
function Classicon:Test(unit)
|
||||||
self:ENEMY_SPOTTED(unit)
|
self:ENEMY_SPOTTED(unit)
|
||||||
end
|
end
|
||||||
@ -85,17 +173,41 @@ function Classicon:GetOptions()
|
|||||||
name = L["Class Icon"],
|
name = L["Class Icon"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
classIconSpecIcon = {
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Show Spec Icon"],
|
||||||
|
desc = L["Shows Spec Icon once spec is detected"],
|
||||||
|
order = 3,
|
||||||
|
get = function(info) return Gladdy.db.classIconSpecIcon end,
|
||||||
|
set = function(info, value)
|
||||||
|
Gladdy.db.classIconSpecIcon = value
|
||||||
|
if Gladdy.curBracket and Gladdy.curBracket > 0 then
|
||||||
|
for i=1,Gladdy.curBracket do
|
||||||
|
local unit = "arena" .. i
|
||||||
|
if (Gladdy.buttons[unit] and Gladdy.buttons[unit].spec) then
|
||||||
|
self:ENEMY_SPOTTED(unit)
|
||||||
|
self:UNIT_SPEC(unit, Gladdy.buttons[unit].spec)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
},
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
size = {
|
size = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L["Icon size"],
|
name = L["Icon size"],
|
||||||
order = 1,
|
order = 1,
|
||||||
args = {
|
args = {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Icon size"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
classIconSize = Gladdy:option({
|
classIconSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Icon size"],
|
name = L["Icon size"],
|
||||||
@ -103,6 +215,7 @@ function Classicon:GetOptions()
|
|||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 3,
|
order = 3,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
classIconWidthFactor = Gladdy:option({
|
classIconWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -111,6 +224,7 @@ function Classicon:GetOptions()
|
|||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 4,
|
order = 4,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -164,39 +278,4 @@ function Classicon:GetOptions()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
|
||||||
|
|
||||||
local function getClassIcon(class)
|
|
||||||
-- see https://wow.gamepedia.com/Class_icon
|
|
||||||
local classIcon = "Interface\\Addons\\Gladdy\\Images\\Classes\\"
|
|
||||||
if class == "DRUID" then
|
|
||||||
return classIcon .. "inv_misc_monsterclaw_04"
|
|
||||||
elseif class == "HUNTER" then
|
|
||||||
return classIcon .. "inv_weapon_bow_07"
|
|
||||||
elseif class == "MAGE" then
|
|
||||||
return classIcon .. "inv_staff_13"
|
|
||||||
elseif class == "PALADIN" then
|
|
||||||
return classIcon .. "inv_hammer_01"
|
|
||||||
elseif class == "PRIEST" then
|
|
||||||
return classIcon .. "inv_staff_30"
|
|
||||||
elseif class == "ROGUE" then
|
|
||||||
return classIcon .. "inv_throwingknife_04"
|
|
||||||
elseif class == "SHAMAN" then
|
|
||||||
return classIcon .. "inv_jewelry_talisman_04"
|
|
||||||
elseif class == "WARLOCK" then
|
|
||||||
return classIcon .. "spell_nature_drowsy"
|
|
||||||
elseif class == "WARRIOR" then
|
|
||||||
return classIcon .. "inv_sword_27"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Classicon:ENEMY_SPOTTED(unit)
|
|
||||||
local classIcon = self.frames[unit]
|
|
||||||
if (not classIcon) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
classIcon.texture:SetTexture(getClassIcon(Gladdy.buttons[unit].class))
|
|
||||||
--classIcon.texture:SetTexCoord(unpack(CLASS_BUTTONS[Gladdy.buttons[unit].class]))
|
|
||||||
classIcon.texture:SetAllPoints(classIcon)
|
|
||||||
end
|
end
|
229
Modules/Clicks.lua
Normal file
229
Modules/Clicks.lua
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
local tinsert = table.insert
|
||||||
|
local pairs = pairs
|
||||||
|
local tonumber = tonumber
|
||||||
|
local tostring = tostring
|
||||||
|
|
||||||
|
local GetBindingKey = GetBindingKey
|
||||||
|
local ClearOverrideBindings = ClearOverrideBindings
|
||||||
|
local SetOverrideBindingClick = SetOverrideBindingClick
|
||||||
|
local MACRO, TARGET, FOCUS, ADDON_DISABLED = MACRO, TARGET, FOCUS, ADDON_DISABLED
|
||||||
|
|
||||||
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local L = Gladdy.L
|
||||||
|
|
||||||
|
local attributes = {
|
||||||
|
{ name = "Target", button = "1", modifier = "", action = "target", spell = "" },
|
||||||
|
{ name = "Focus", button = "2", modifier = "", action = "focus", spell = "" },
|
||||||
|
}
|
||||||
|
for i = 3, 10 do
|
||||||
|
tinsert(attributes, { name = L["Action #%d"]:format(i), button = "", modifier = "", action = "disabled", spell = "" })
|
||||||
|
end
|
||||||
|
local Clicks = Gladdy:NewModule("Clicks", nil, {
|
||||||
|
attributes = attributes,
|
||||||
|
})
|
||||||
|
|
||||||
|
BINDING_HEADER_GLADDY = "Gladdy"
|
||||||
|
BINDING_NAME_GLADDYBUTTON1_LEFT = L["Left Click Enemy 1"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON2_LEFT = L["Left Click Enemy 2"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON3_LEFT = L["Left Click Enemy 3"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON4_LEFT = L["Left Click Enemy 4"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON5_LEFT = L["Left Click Enemy 5"]
|
||||||
|
|
||||||
|
BINDING_NAME_GLADDYBUTTON1_RIGHT = L["Right Click Enemy 1"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON2_RIGHT = L["Right Click Enemy 2"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON3_RIGHT = L["Right Click Enemy 3"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON4_RIGHT = L["Right Click Enemy 4"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON5_RIGHT = L["Right Click Enemy 5"]
|
||||||
|
|
||||||
|
BINDING_NAME_GLADDYBUTTON1_MIDDLE = L["Middle Click Enemy 1"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON2_MIDDLE = L["Middle Click Enemy 2"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON3_MIDDLE = L["Middle Click Enemy 3"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON4_MIDDLE = L["Middle Click Enemy 4"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON5_MIDDLE = L["Middle Click Enemy 5"]
|
||||||
|
|
||||||
|
BINDING_NAME_GLADDYBUTTON1_BUTTON4 = L["Button4 Click Enemy 1"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON2_BUTTON4 = L["Button4 Click Enemy 2"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON3_BUTTON4 = L["Button4 Click Enemy 3"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON4_BUTTON4 = L["Button4 Click Enemy 4"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON5_BUTTON4 = L["Button4 Click Enemy 5"]
|
||||||
|
|
||||||
|
BINDING_NAME_GLADDYBUTTON1_BUTTON5 = L["Button5 Click Enemy 1"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON2_BUTTON5 = L["Button5 Click Enemy 2"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON3_BUTTON5 = L["Button5 Click Enemy 3"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON4_BUTTON5 = L["Button5 Click Enemy 4"]
|
||||||
|
BINDING_NAME_GLADDYBUTTON5_BUTTON5 = L["Button5 Click Enemy 5"]
|
||||||
|
|
||||||
|
function Clicks:Initialise()
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:Reset()
|
||||||
|
--
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:ResetUnit(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if (not button) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
for k, v in pairs(Gladdy.db.attributes) do
|
||||||
|
button.secure:SetAttribute(v.modifier .. "macrotext" .. v.button, "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:Test()
|
||||||
|
Clicks:JOINED_ARENA()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:JOINED_ARENA()
|
||||||
|
for k, v in pairs(Gladdy.buttons) do
|
||||||
|
local left = GetBindingKey(("GLADDYBUTTON%d_LEFT"):format(v.id))
|
||||||
|
local right = GetBindingKey(("GLADDYBUTTON%d_RIGHT"):format(v.id))
|
||||||
|
local middle = GetBindingKey(("GLADDYBUTTON%d_MIDDLE"):format(v.id))
|
||||||
|
local button4 = GetBindingKey(("GLADDYBUTTON%d_BUTTON4"):format(v.id))
|
||||||
|
local button5 = GetBindingKey(("GLADDYBUTTON%d_BUTTON5"):format(v.id))
|
||||||
|
|
||||||
|
ClearOverrideBindings(v.secure)
|
||||||
|
|
||||||
|
if (left) then
|
||||||
|
SetOverrideBindingClick(v.secure, false, left, v.secure:GetName(), "LeftButton")
|
||||||
|
end
|
||||||
|
|
||||||
|
if (right) then
|
||||||
|
SetOverrideBindingClick(v.secure, false, right, v.secure:GetName(), "RightButton")
|
||||||
|
end
|
||||||
|
|
||||||
|
if (middle) then
|
||||||
|
SetOverrideBindingClick(v.secure, false, middle, v.secure:GetName(), "MiddleButton")
|
||||||
|
end
|
||||||
|
|
||||||
|
if (button4) then
|
||||||
|
SetOverrideBindingClick(v.secure, false, button4, v.secure:GetName(), "Button4")
|
||||||
|
end
|
||||||
|
|
||||||
|
if (button5) then
|
||||||
|
SetOverrideBindingClick(v.secure, false, button5, v.secure:GetName(), "Button5")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:SetupAttributes(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if (not button) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
for k, v in pairs(Gladdy.db.attributes) do
|
||||||
|
self:SetupAttribute(button, v.button, v.modifier, v.action, v.spell)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:SetupAttribute(button, key, mod, action, spell)
|
||||||
|
local attr = ""
|
||||||
|
local text = ""
|
||||||
|
|
||||||
|
if (action == "macro") then
|
||||||
|
attr = mod .. "macrotext" .. key
|
||||||
|
text = spell:gsub("%*arena%*", button.unit)
|
||||||
|
button.secure:SetAttribute(mod .. "type" .. key, "macro")
|
||||||
|
elseif (action ~= "disabled") then
|
||||||
|
if (action == "target") then
|
||||||
|
attr = mod .. "type" .. key
|
||||||
|
text = "target"
|
||||||
|
elseif (action == "focus") then
|
||||||
|
attr = mod .. "type" .. key
|
||||||
|
text = "focus"
|
||||||
|
elseif (action == "spell") then
|
||||||
|
attr = mod .. "type" .. key
|
||||||
|
text = "spell"
|
||||||
|
button.secure:SetAttribute(mod .. "spell" .. key, spell)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
button.secure:SetAttribute(attr, text)
|
||||||
|
end
|
||||||
|
|
||||||
|
local buttons = { ["1"] = L["Left button"], ["2"] = L["Right button"], ["3"] = L["Middle button"], ["4"] = L["Button 4"], ["5"] = L["Button 5"] }
|
||||||
|
local modifiers = { [""] = L["None"], ["ctrl-"] = L["CTRL"], ["shift-"] = L["SHIFT"], ["alt-"] = L["ALT"] }
|
||||||
|
local clickValues = { ["macro"] = MACRO, ["target"] = TARGET, ["focus"] = FOCUS, ["spell"] = L["Cast Spell"], ["disabled"] = ADDON_DISABLED }
|
||||||
|
|
||||||
|
local function SetupAttributeOption(i)
|
||||||
|
return {
|
||||||
|
type = "group",
|
||||||
|
name = Gladdy.dbi.profile.attributes[i].name,
|
||||||
|
desc = Gladdy.dbi.profile.attributes[i].name,
|
||||||
|
order = i + 1,
|
||||||
|
get = function(info)
|
||||||
|
return Gladdy.dbi.profile.attributes[tonumber(info[#info - 1])][info[#info]]
|
||||||
|
end,
|
||||||
|
set = function(info, value)
|
||||||
|
Gladdy.dbi.profile.attributes[tonumber(info[#info - 1])][info[#info]] = value
|
||||||
|
|
||||||
|
if (info[#info] == "name") then
|
||||||
|
Gladdy.options.args.Clicks.args[info[#info - 1]].name = value
|
||||||
|
end
|
||||||
|
|
||||||
|
Gladdy:UpdateFrame()
|
||||||
|
end,
|
||||||
|
args = {
|
||||||
|
name = {
|
||||||
|
type = "input",
|
||||||
|
name = L["Name"],
|
||||||
|
desc = L["Select the name of the click option"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
button = {
|
||||||
|
type = "select",
|
||||||
|
name = L["Button"],
|
||||||
|
desc = L["Select which mouse button to use"],
|
||||||
|
order = 2,
|
||||||
|
values = buttons,
|
||||||
|
},
|
||||||
|
modifier = {
|
||||||
|
type = "select",
|
||||||
|
name = L["Modifier"],
|
||||||
|
desc = L["Select which modifier to use"],
|
||||||
|
order = 3,
|
||||||
|
values = modifiers,
|
||||||
|
},
|
||||||
|
action = {
|
||||||
|
type = "select",
|
||||||
|
name = L["Action"],
|
||||||
|
desc = L["Select what action this mouse button does"],
|
||||||
|
order = 4,
|
||||||
|
values = clickValues,
|
||||||
|
},
|
||||||
|
spell = {
|
||||||
|
type = "input",
|
||||||
|
name = L["Cast Spell / Macro"],
|
||||||
|
desc = L["\n|cff1ac742Cast Spell:|r\n" ..
|
||||||
|
"Type in the spell name.\n" ..
|
||||||
|
"For example:\n" ..
|
||||||
|
"|cff17d1c8Polymorph|r\n" ..
|
||||||
|
"\n" ..
|
||||||
|
"|cff1ac742Macro:|r\n" ..
|
||||||
|
"Use *arena* as placeholder.\n" ..
|
||||||
|
"For example:\n" ..
|
||||||
|
"|cff17d1c8/cast [@*arena*] Blind\n" ..
|
||||||
|
"/run SendChatMessage(\"Blinding \" .. UnitName(\"*arena*\"), \"PARTY\")|r"],
|
||||||
|
order = 5,
|
||||||
|
width = "full",
|
||||||
|
multiline = 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:GetOptions()
|
||||||
|
local options = {}
|
||||||
|
for i = 1, 10 do
|
||||||
|
options[tostring(i)] = SetupAttributeOption(i)
|
||||||
|
end
|
||||||
|
return options
|
||||||
|
end
|
||||||
|
|
||||||
|
function Clicks:UpdateFrame(unit)
|
||||||
|
self:SetupAttributes(unit)
|
||||||
|
self:JOINED_ARENA()
|
||||||
|
end
|
248
Modules/CombatIndicator.lua
Normal file
248
Modules/CombatIndicator.lua
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
local select = select
|
||||||
|
local UnitExists, UnitAffectingCombat, GetSpellInfo = UnitExists, UnitAffectingCombat, GetSpellInfo
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"}
|
||||||
|
|
||||||
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local L = Gladdy.L
|
||||||
|
|
||||||
|
local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, {
|
||||||
|
ciEnabled = true,
|
||||||
|
ciSize = 20,
|
||||||
|
ciAlpha = 1,
|
||||||
|
ciWidthFactor = 1,
|
||||||
|
ciAnchor = "healthBar",
|
||||||
|
ciPos = "TOP",
|
||||||
|
ciXOffset = 0,
|
||||||
|
ciYOffset = -31,
|
||||||
|
ciBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
|
ciBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||||
|
})
|
||||||
|
|
||||||
|
function CombatIndicator:Initialize()
|
||||||
|
self.frames = {}
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
|
self.updateInterval = 0.05
|
||||||
|
self.combatIndicatorIcon = select(3, GetSpellInfo(674))
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:JOINED_ARENA()
|
||||||
|
self:SetScript("OnUpdate", CombatIndicator.OnEvent)
|
||||||
|
self.lastTimeUpdated = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:CreateFrame(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if not button then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local ciFrame = CreateFrame("Frame", "GladdyCombatindicator" .. unit, button)
|
||||||
|
ciFrame:EnableMouse(false)
|
||||||
|
ciFrame:SetFrameStrata("HIGH")
|
||||||
|
ciFrame:SetHeight(Gladdy.db.ciSize)
|
||||||
|
ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor)
|
||||||
|
|
||||||
|
ciFrame.texture = ciFrame:CreateTexture(nil, "OVERLAY")
|
||||||
|
ciFrame.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
ciFrame.texture:SetTexture(self.combatIndicatorIcon)
|
||||||
|
ciFrame.texture:SetAllPoints(ciFrame)
|
||||||
|
|
||||||
|
ciFrame.border = ciFrame:CreateTexture(nil, "OVERLAY")
|
||||||
|
ciFrame.border:SetAllPoints(ciFrame)
|
||||||
|
ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle)
|
||||||
|
ciFrame.border:SetVertexColor(Gladdy.db.ciBorderColor.r, Gladdy.db.ciBorderColor.g, Gladdy.db.ciBorderColor.b, Gladdy.db.ciBorderColor.a)
|
||||||
|
|
||||||
|
self.frames[unit] = ciFrame
|
||||||
|
button.ciFrame = ciFrame
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:UpdateFrame(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
local ciFrame = self.frames[unit]
|
||||||
|
if (not button or not ciFrame) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
ciFrame:SetHeight(Gladdy.db.ciSize)
|
||||||
|
ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor)
|
||||||
|
ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle)
|
||||||
|
ciFrame.border:SetVertexColor(Gladdy.db.ciBorderColor.r, Gladdy.db.ciBorderColor.g, Gladdy.db.ciBorderColor.b, Gladdy.db.ciBorderColor.a)
|
||||||
|
|
||||||
|
ciFrame:ClearAllPoints()
|
||||||
|
ciFrame:SetPoint(ANCHORS[Gladdy.db.ciPos], Gladdy.buttons[unit][Gladdy.db.ciAnchor], Gladdy.db.ciPos, Gladdy.db.ciXOffset, Gladdy.db.ciYOffset)
|
||||||
|
|
||||||
|
ciFrame:SetAlpha(Gladdy.db.ciAlpha)
|
||||||
|
|
||||||
|
if (Gladdy.db.ciEnabled == false) then
|
||||||
|
ciFrame:Hide()
|
||||||
|
else
|
||||||
|
ciFrame:Show()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:Test()
|
||||||
|
self.test = true
|
||||||
|
self:JOINED_ARENA()
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:Reset()
|
||||||
|
self:SetScript("OnUpdate", nil)
|
||||||
|
self.test = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator.OnEvent(self, elapsed)
|
||||||
|
self.lastTimeUpdated = self.lastTimeUpdated + elapsed
|
||||||
|
|
||||||
|
if (self.lastTimeUpdated > self.updateInterval) then
|
||||||
|
for i=1,Gladdy.curBracket do
|
||||||
|
local unit = "arena" .. i
|
||||||
|
if CombatIndicator.test or (UnitExists(unit) and UnitAffectingCombat(unit)) then
|
||||||
|
CombatIndicator.frames[unit]:Show()
|
||||||
|
else
|
||||||
|
CombatIndicator.frames[unit]:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.lastTimeUpdated = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function CombatIndicator:GetOptions()
|
||||||
|
return {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Combat Indicator"],
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
ciEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enabled"],
|
||||||
|
desc = L["Enable Combat Indicator icon"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
|
group = {
|
||||||
|
type = "group",
|
||||||
|
childGroups = "tree",
|
||||||
|
name = L["Frame"],
|
||||||
|
order = 4,
|
||||||
|
args = {
|
||||||
|
general = {
|
||||||
|
type = "group",
|
||||||
|
name = L["Frame"],
|
||||||
|
order = 1,
|
||||||
|
args = {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Frame"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
ciSize = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Icon size"],
|
||||||
|
min = 5,
|
||||||
|
max = 100,
|
||||||
|
step = 1,
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
ciWidthFactor = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Icon width factor"],
|
||||||
|
min = 0.5,
|
||||||
|
max = 2,
|
||||||
|
step = 0.05,
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
ciAlpha = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Alpha"],
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
step = 0.05,
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
position = {
|
||||||
|
type = "group",
|
||||||
|
name = L["Position"],
|
||||||
|
order = 4,
|
||||||
|
args = {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Position"],
|
||||||
|
order = 4,
|
||||||
|
},
|
||||||
|
ciAnchor = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Anchor"],
|
||||||
|
desc = L["This changes the anchor of the ci icon"],
|
||||||
|
order = 20,
|
||||||
|
values = {
|
||||||
|
["trinket"] = L["Trinket"],
|
||||||
|
["classIcon"] = L["Class Icon"],
|
||||||
|
["healthBar"] = L["Health Bar"],
|
||||||
|
["powerBar"] = L["Power Bar"],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
ciPos = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Position"],
|
||||||
|
desc = L["This changes position relative to its anchor of the ci icon"],
|
||||||
|
order = 21,
|
||||||
|
values = {
|
||||||
|
["LEFT"] = L["Left"],
|
||||||
|
["RIGHT"] = L["Right"],
|
||||||
|
["TOP"] = L["Top"],
|
||||||
|
["BOTTOM"] = L["Bottom"],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
ciXOffset = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Horizontal offset"],
|
||||||
|
order = 23,
|
||||||
|
min = -400,
|
||||||
|
max = 400,
|
||||||
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
ciYOffset = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Vertical offset"],
|
||||||
|
order = 24,
|
||||||
|
min = -400,
|
||||||
|
max = 400,
|
||||||
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
type = "group",
|
||||||
|
name = L["Border"],
|
||||||
|
order = 4,
|
||||||
|
args = {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Border"],
|
||||||
|
order = 4,
|
||||||
|
},
|
||||||
|
ciBorderStyle = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Border style"],
|
||||||
|
order = 31,
|
||||||
|
values = Gladdy:GetIconStyles()
|
||||||
|
}),
|
||||||
|
ciBorderColor = Gladdy:colorOption({
|
||||||
|
type = "color",
|
||||||
|
name = L["Border color"],
|
||||||
|
desc = L["Color of the border"],
|
||||||
|
order = 32,
|
||||||
|
hasAlpha = true,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
@ -93,11 +93,13 @@ function Cooldowns:CreateFrame(unit)
|
|||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
-- Cooldown frame
|
-- Cooldown frame
|
||||||
local spellCooldownFrame = CreateFrame("Frame", nil, button)
|
local spellCooldownFrame = CreateFrame("Frame", nil, button)
|
||||||
|
spellCooldownFrame:EnableMouse(false)
|
||||||
for x = 1, 14 do
|
for x = 1, 14 do
|
||||||
local icon = CreateFrame("Frame", nil, spellCooldownFrame)
|
local icon = CreateFrame("Frame", nil, spellCooldownFrame)
|
||||||
icon:EnableMouse(false)
|
icon:EnableMouse(false)
|
||||||
icon:SetFrameLevel(3)
|
icon:SetFrameLevel(3)
|
||||||
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
||||||
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
icon.texture:SetAllPoints(icon)
|
icon.texture:SetAllPoints(icon)
|
||||||
|
|
||||||
icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate")
|
||||||
@ -132,30 +134,31 @@ function Cooldowns:UpdateFrame(unit)
|
|||||||
-- Cooldown frame
|
-- Cooldown frame
|
||||||
if (Gladdy.db.cooldown) then
|
if (Gladdy.db.cooldown) then
|
||||||
button.spellCooldownFrame:ClearAllPoints()
|
button.spellCooldownFrame:ClearAllPoints()
|
||||||
local verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0
|
||||||
|
local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize)
|
||||||
if Gladdy.db.cooldownYPos == "TOP" then
|
if Gladdy.db.cooldownYPos == "TOP" then
|
||||||
if Gladdy.db.cooldownXPos == "RIGHT" then
|
if Gladdy.db.cooldownXPos == "RIGHT" then
|
||||||
button.spellCooldownFrame:SetPoint("BOTTOMRIGHT", button.healthBar, "TOPRIGHT", Gladdy.db.cooldownXOffset, Gladdy.db.highlightBorderSize + Gladdy.db.cooldownYOffset) -- needs to be properly anchored after trinket
|
button.spellCooldownFrame:SetPoint("BOTTOMRIGHT", button.healthBar, "TOPRIGHT", Gladdy.db.cooldownXOffset, horizontalMargin + Gladdy.db.cooldownYOffset)
|
||||||
else
|
else
|
||||||
button.spellCooldownFrame:SetPoint("BOTTOMLEFT", button.healthBar, "TOPLEFT", Gladdy.db.cooldownXOffset, Gladdy.db.highlightBorderSize + Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("BOTTOMLEFT", button.healthBar, "TOPLEFT", Gladdy.db.cooldownXOffset, horizontalMargin + Gladdy.db.cooldownYOffset)
|
||||||
end
|
end
|
||||||
elseif Gladdy.db.cooldownYPos == "BOTTOM" then
|
elseif Gladdy.db.cooldownYPos == "BOTTOM" then
|
||||||
if Gladdy.db.cooldownXPos == "RIGHT" then
|
if Gladdy.db.cooldownXPos == "RIGHT" then
|
||||||
button.spellCooldownFrame:SetPoint("TOPRIGHT", button.powerBar, "BOTTOMRIGHT", Gladdy.db.cooldownXOffset, -Gladdy.db.highlightBorderSize + Gladdy.db.cooldownYOffset) -- needs to be properly anchored after trinket
|
button.spellCooldownFrame:SetPoint("TOPRIGHT", button.healthBar, "BOTTOMRIGHT", Gladdy.db.cooldownXOffset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight)
|
||||||
else
|
else
|
||||||
button.spellCooldownFrame:SetPoint("TOPLEFT", button.powerBar, "BOTTOMLEFT", Gladdy.db.cooldownXOffset, -Gladdy.db.highlightBorderSize + Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("TOPLEFT", button.healthBar, "BOTTOMLEFT", Gladdy.db.cooldownXOffset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight)
|
||||||
end
|
end
|
||||||
elseif Gladdy.db.cooldownYPos == "LEFT" then
|
elseif Gladdy.db.cooldownYPos == "LEFT" then
|
||||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -(Gladdy.db.highlightBorderSize + Gladdy.db.padding) + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -(horizontalMargin + Gladdy.db.padding) + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||||
else
|
else
|
||||||
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||||
end
|
end
|
||||||
elseif Gladdy.db.cooldownYPos == "RIGHT" then
|
elseif Gladdy.db.cooldownYPos == "RIGHT" then
|
||||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.highlightBorderSize + Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||||
else
|
else
|
||||||
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||||
end
|
end
|
||||||
@ -235,9 +238,16 @@ end
|
|||||||
|
|
||||||
function Cooldowns:Test(unit)
|
function Cooldowns:Test(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
button.spellCooldownFrame:Show()
|
if Gladdy.db.cooldown then
|
||||||
button.lastCooldownSpell = 1
|
button.spellCooldownFrame:Show()
|
||||||
self:UpdateTestCooldowns(unit)
|
button.lastCooldownSpell = 1
|
||||||
|
self:UpdateTestCooldowns(unit)
|
||||||
|
else
|
||||||
|
button.spellCooldownFrame:Hide()
|
||||||
|
button.lastCooldownSpell = 1
|
||||||
|
self:UpdateTestCooldowns(unit)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cooldowns:UpdateTestCooldowns(unit)
|
function Cooldowns:UpdateTestCooldowns(unit)
|
||||||
@ -573,14 +583,14 @@ function Cooldowns:GetOptions()
|
|||||||
},
|
},
|
||||||
cooldown = Gladdy:option({
|
cooldown = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Enable"],
|
name = L["Enabled"],
|
||||||
desc = L["Enabled cooldown module"],
|
desc = L["Enabled cooldown module"],
|
||||||
order = 2,
|
order = 2,
|
||||||
}),
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
icon = {
|
icon = {
|
||||||
@ -599,7 +609,8 @@ function Cooldowns:GetOptions()
|
|||||||
desc = L["Size of each cd icon"],
|
desc = L["Size of each cd icon"],
|
||||||
order = 4,
|
order = 4,
|
||||||
min = 5,
|
min = 5,
|
||||||
max = (Gladdy.db.healthBarHeight + Gladdy.db.castBarHeight + Gladdy.db.powerBarHeight + Gladdy.db.bottomMargin) / 2,
|
max = 50,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownWidthFactor = Gladdy:option({
|
cooldownWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -609,6 +620,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownIconPadding = Gladdy:option({
|
cooldownIconPadding = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -618,6 +630,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownMaxIconsPerLine = Gladdy:option({
|
cooldownMaxIconsPerLine = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -626,6 +639,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = 3,
|
min = 3,
|
||||||
max = 14,
|
max = 14,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -643,6 +657,7 @@ function Cooldowns:GetOptions()
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownCooldownAlpha = Gladdy:option({
|
cooldownCooldownAlpha = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -651,6 +666,7 @@ function Cooldowns:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 9,
|
order = 9,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -680,6 +696,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownFontColor = Gladdy:colorOption({
|
cooldownFontColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
@ -734,6 +751,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
cooldownYOffset = Gladdy:option({
|
cooldownYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -742,6 +760,7 @@ function Cooldowns:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -775,7 +794,7 @@ function Cooldowns:GetOptions()
|
|||||||
cooldowns = {
|
cooldowns = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Cooldowns",
|
name = L["Cooldowns"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = Cooldowns:GetCooldownOptions(),
|
args = Cooldowns:GetCooldownOptions(),
|
||||||
},
|
},
|
||||||
|
@ -67,6 +67,7 @@ end
|
|||||||
|
|
||||||
function Diminishings:CreateFrame(unit)
|
function Diminishings:CreateFrame(unit)
|
||||||
local drFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit])
|
local drFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit])
|
||||||
|
drFrame:EnableMouse(false)
|
||||||
|
|
||||||
for i = 1, 16 do
|
for i = 1, 16 do
|
||||||
local icon = CreateFrame("Frame", "GladdyDr" .. unit .. "Icon" .. i, drFrame)
|
local icon = CreateFrame("Frame", "GladdyDr" .. unit .. "Icon" .. i, drFrame)
|
||||||
@ -74,6 +75,7 @@ function Diminishings:CreateFrame(unit)
|
|||||||
icon:EnableMouse(false)
|
icon:EnableMouse(false)
|
||||||
icon:SetFrameLevel(3)
|
icon:SetFrameLevel(3)
|
||||||
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
icon.texture = icon:CreateTexture(nil, "BACKGROUND")
|
||||||
|
icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
icon.texture:SetAllPoints(icon)
|
icon.texture:SetAllPoints(icon)
|
||||||
icon:SetScript("OnUpdate", function(self, elapsed)
|
icon:SetScript("OnUpdate", function(self, elapsed)
|
||||||
if (self.active) then
|
if (self.active) then
|
||||||
@ -160,7 +162,7 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
drFrame:ClearAllPoints()
|
drFrame:ClearAllPoints()
|
||||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
if (Gladdy.db.drCooldownPos == "LEFT") then
|
if (Gladdy.db.drCooldownPos == "LEFT") then
|
||||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||||
if anchor == Gladdy.buttons[unit].healthBar then
|
if anchor == Gladdy.buttons[unit].healthBar then
|
||||||
@ -229,9 +231,9 @@ function Diminishings:UpdateFrame(unit)
|
|||||||
icon.border:SetTexture(Gladdy.db.drBorderStyle)
|
icon.border:SetTexture(Gladdy.db.drBorderStyle)
|
||||||
end
|
end
|
||||||
|
|
||||||
icon.texture:SetTexCoord(.1, .9, .1, .9)
|
--icon.texture:SetTexCoord(.1, .9, .1, .9)
|
||||||
icon.texture:SetPoint("TOPLEFT", icon, "TOPLEFT", 2, -2)
|
--icon.texture:SetPoint("TOPLEFT", icon, "TOPLEFT", 2, -2)
|
||||||
icon.texture:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
|
--icon.texture:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT", -2, 2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -357,14 +359,14 @@ function Diminishings:GetOptions()
|
|||||||
},
|
},
|
||||||
drEnabled = Gladdy:option({
|
drEnabled = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Enable"],
|
name = L["Enabled"],
|
||||||
desc = L["Enabled DR module"],
|
desc = L["Enabled DR module"],
|
||||||
order = 3,
|
order = 3,
|
||||||
}),
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
icon = {
|
icon = {
|
||||||
@ -383,8 +385,9 @@ function Diminishings:GetOptions()
|
|||||||
desc = L["Size of the DR Icons"],
|
desc = L["Size of the DR Icons"],
|
||||||
order = 5,
|
order = 5,
|
||||||
min = 5,
|
min = 5,
|
||||||
max = 50,
|
max = 80,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
drWidthFactor = Gladdy:option({
|
drWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -394,6 +397,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
drIconPadding = Gladdy:option({
|
drIconPadding = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -403,6 +407,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -420,6 +425,7 @@ function Diminishings:GetOptions()
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
drCooldownAlpha = Gladdy:option({
|
drCooldownAlpha = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -428,6 +434,7 @@ function Diminishings:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 9,
|
order = 9,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -464,6 +471,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -499,6 +507,7 @@ function Diminishings:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
drYOffset = Gladdy:option({
|
drYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -507,6 +516,7 @@ function Diminishings:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -18,11 +18,9 @@ local function table_copy(t)
|
|||||||
return t2;
|
return t2;
|
||||||
end
|
end
|
||||||
|
|
||||||
local ExportImport = Gladdy:NewModule("ExportImport", nil, {
|
local ExportImport = Gladdy:NewModule("Export Import", nil, {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local export = AceGUI:Create("Frame")
|
local export = AceGUI:Create("Frame")
|
||||||
export:SetWidth(550)
|
export:SetWidth(550)
|
||||||
export.sizer_se:Hide()
|
export.sizer_se:Hide()
|
||||||
@ -85,6 +83,10 @@ end)
|
|||||||
import:AddChild(importClearButton)
|
import:AddChild(importClearButton)
|
||||||
import.clearButton = importClearButton
|
import.clearButton = importClearButton
|
||||||
|
|
||||||
|
local deletedOptions = { --TODO backward compatibility Imports on deleted options
|
||||||
|
growUp = true
|
||||||
|
}
|
||||||
|
|
||||||
function ExportImport:CheckDeserializedOptions(tbl, refTbl, str)
|
function ExportImport:CheckDeserializedOptions(tbl, refTbl, str)
|
||||||
if str == nil and not tbl.version_major_num then
|
if str == nil and not tbl.version_major_num then
|
||||||
return false, "Version conflict: version_major_num not seen"
|
return false, "Version conflict: version_major_num not seen"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local floor = math.floor
|
local floor = math.floor
|
||||||
local UnitHealth, UnitHealthMax, UnitName, UnitExists = UnitHealth, UnitHealthMax, UnitName, UnitExists
|
local UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost = UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost
|
||||||
|
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||||
@ -8,7 +8,7 @@ local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
|||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||||
local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
local Healthbar = Gladdy:NewModule("Health Bar", 100, {
|
||||||
healthBarFont = "DorisPP",
|
healthBarFont = "DorisPP",
|
||||||
healthBarHeight = 60,
|
healthBarHeight = 60,
|
||||||
healthBarTexture = "Smooth",
|
healthBarTexture = "Smooth",
|
||||||
@ -19,6 +19,7 @@ local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
|||||||
healthBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
healthBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||||
healthBarNameFontSize = 12,
|
healthBarNameFontSize = 12,
|
||||||
healthBarHealthFontSize = 12,
|
healthBarHealthFontSize = 12,
|
||||||
|
healthNameToArenaId = false,
|
||||||
healthName = true,
|
healthName = true,
|
||||||
healthActual = false,
|
healthActual = false,
|
||||||
healthMax = true,
|
healthMax = true,
|
||||||
@ -27,6 +28,7 @@ local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
|||||||
|
|
||||||
function Healthbar:Initialize()
|
function Healthbar:Initialize()
|
||||||
self.frames = {}
|
self.frames = {}
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
self:RegisterMessage("ENEMY_SPOTTED")
|
self:RegisterMessage("ENEMY_SPOTTED")
|
||||||
self:RegisterMessage("UNIT_DESTROYED")
|
self:RegisterMessage("UNIT_DESTROYED")
|
||||||
self:RegisterMessage("UNIT_DEATH")
|
self:RegisterMessage("UNIT_DEATH")
|
||||||
@ -36,6 +38,7 @@ function Healthbar:CreateFrame(unit)
|
|||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
|
|
||||||
local healthBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
local healthBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
healthBar:EnableMouse(false)
|
||||||
healthBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.healthBarBorderStyle),
|
healthBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.healthBarBorderStyle),
|
||||||
edgeSize = Gladdy.db.healthBarBorderSize })
|
edgeSize = Gladdy.db.healthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
||||||
@ -92,12 +95,22 @@ function Healthbar:CreateFrame(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Healthbar.OnEvent(self, event, unit)
|
function Healthbar.OnEvent(self, event, unit)
|
||||||
|
local isDead = UnitExists(unit) and UnitIsDeadOrGhost(unit)
|
||||||
if event == "UNIT_HEALTH" then
|
if event == "UNIT_HEALTH" then
|
||||||
|
if isDead then
|
||||||
|
Gladdy:SendMessage("UNIT_DEATH", unit)
|
||||||
|
return
|
||||||
|
end
|
||||||
local health = UnitHealth(unit)
|
local health = UnitHealth(unit)
|
||||||
local healthMax = UnitHealthMax(unit)
|
local healthMax = UnitHealthMax(unit)
|
||||||
Healthbar:SetHealthText(self, health, healthMax)
|
self.hp:SetMinMaxValues(0, healthMax)
|
||||||
self.hp:SetValue(UnitHealth(unit))
|
self.hp:SetValue(UnitHealth(unit))
|
||||||
|
Healthbar:SetHealthText(self, health, healthMax)
|
||||||
elseif event == "UNIT_MAXHEALTH" then
|
elseif event == "UNIT_MAXHEALTH" then
|
||||||
|
if isDead then
|
||||||
|
Gladdy:SendMessage("UNIT_DEATH", unit)
|
||||||
|
return
|
||||||
|
end
|
||||||
local health = UnitHealth(unit)
|
local health = UnitHealth(unit)
|
||||||
local healthMax = UnitHealthMax(unit)
|
local healthMax = UnitHealthMax(unit)
|
||||||
self.hp:SetMinMaxValues(0, healthMax)
|
self.hp:SetMinMaxValues(0, healthMax)
|
||||||
@ -106,7 +119,9 @@ function Healthbar.OnEvent(self, event, unit)
|
|||||||
elseif event == "UNIT_NAME_UPDATE" then
|
elseif event == "UNIT_NAME_UPDATE" then
|
||||||
local name = UnitName(unit)
|
local name = UnitName(unit)
|
||||||
Gladdy.buttons[unit].name = name
|
Gladdy.buttons[unit].name = name
|
||||||
self.nameText:SetText(name)
|
if Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then
|
||||||
|
self.nameText:SetText(name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if not Gladdy.buttons[unit].class then
|
if not Gladdy.buttons[unit].class then
|
||||||
Gladdy:SpotEnemy(unit, true)
|
Gladdy:SpotEnemy(unit, true)
|
||||||
@ -161,7 +176,7 @@ function Healthbar:UpdateFrame(unit)
|
|||||||
edgeSize = Gladdy.db.healthBarBorderSize })
|
edgeSize = Gladdy.db.healthBarBorderSize })
|
||||||
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a)
|
||||||
healthBar:ClearAllPoints()
|
healthBar:ClearAllPoints()
|
||||||
healthBar:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPLEFT", iconSize, 0)
|
healthBar:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPLEFT", 0, 0)
|
||||||
healthBar:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit], "BOTTOMRIGHT")
|
healthBar:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit], "BOTTOMRIGHT")
|
||||||
|
|
||||||
healthBar.hp:SetStatusBarTexture(Gladdy.LSM:Fetch("statusbar", Gladdy.db.healthBarTexture))
|
healthBar.hp:SetStatusBarTexture(Gladdy.LSM:Fetch("statusbar", Gladdy.db.healthBarTexture))
|
||||||
@ -210,10 +225,20 @@ function Healthbar:Test(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:JOINED_ARENA()
|
||||||
self:ENEMY_SPOTTED(unit)
|
self:ENEMY_SPOTTED(unit)
|
||||||
self:UNIT_HEALTH(unit, button.health, button.healthMax)
|
self:UNIT_HEALTH(unit, button.health, button.healthMax)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Healthbar:JOINED_ARENA()
|
||||||
|
if Gladdy.db.healthNameToArenaId and Gladdy.db.healthName then
|
||||||
|
for i=1,Gladdy.curBracket do
|
||||||
|
local healthBar = self.frames["arena" .. i]
|
||||||
|
healthBar.nameText:SetText("Arena" .. i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Healthbar:ENEMY_SPOTTED(unit)
|
function Healthbar:ENEMY_SPOTTED(unit)
|
||||||
local healthBar = self.frames[unit]
|
local healthBar = self.frames[unit]
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
@ -228,7 +253,10 @@ function Healthbar:ENEMY_SPOTTED(unit)
|
|||||||
healthBar.hp:SetValue(health)
|
healthBar.hp:SetValue(health)
|
||||||
Healthbar:SetHealthText(healthBar, health, healthMax)
|
Healthbar:SetHealthText(healthBar, health, healthMax)
|
||||||
end
|
end
|
||||||
healthBar.nameText:SetText(button.name)
|
if Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then
|
||||||
|
healthBar.nameText:SetText(button.name)
|
||||||
|
end
|
||||||
|
|
||||||
healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1)
|
healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -300,7 +328,7 @@ local function option(params)
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
local key = info.arg or info[#info]
|
local key = info.arg or info[#info]
|
||||||
Gladdy.dbi.profile[key] = value
|
Gladdy.dbi.profile[key] = value
|
||||||
Gladdy.options.args.Healthbar.args.group.args.border.args.healthBarBorderSize.max = Gladdy.db.healthBarHeight/2
|
Gladdy.options.args["Health Bar"].args.group.args.border.args.healthBarBorderSize.max = Gladdy.db.healthBarHeight/2
|
||||||
if Gladdy.db.healthBarBorderSize > Gladdy.db.healthBarHeight/2 then
|
if Gladdy.db.healthBarBorderSize > Gladdy.db.healthBarHeight/2 then
|
||||||
Gladdy.db.healthBarBorderSize = Gladdy.db.healthBarHeight/2
|
Gladdy.db.healthBarBorderSize = Gladdy.db.healthBarHeight/2
|
||||||
end
|
end
|
||||||
@ -328,7 +356,7 @@ function Healthbar:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
@ -349,6 +377,7 @@ function Healthbar:GetOptions()
|
|||||||
min = 10,
|
min = 10,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
healthBarTexture = option({
|
healthBarTexture = option({
|
||||||
type = "select",
|
type = "select",
|
||||||
@ -400,6 +429,7 @@ function Healthbar:GetOptions()
|
|||||||
step = 0.1,
|
step = 0.1,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
healthBarHealthFontSize = option({
|
healthBarHealthFontSize = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -409,6 +439,7 @@ function Healthbar:GetOptions()
|
|||||||
step = 0.1,
|
step = 0.1,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -437,6 +468,7 @@ function Healthbar:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = Gladdy.db.healthBarHeight/2,
|
max = Gladdy.db.healthBarHeight/2,
|
||||||
step = 0.5,
|
step = 0.5,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
healthBarBorderColor = Gladdy:colorOption({
|
healthBarBorderColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
@ -459,27 +491,39 @@ function Healthbar:GetOptions()
|
|||||||
},
|
},
|
||||||
healthName = option({
|
healthName = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show the name"],
|
name = L["Show name text"],
|
||||||
desc = L["Show the units name"],
|
desc = L["Show the units name"],
|
||||||
order = 30,
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
healthNameToArenaId = option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Show ArenaX"],
|
||||||
|
desc = L["Show Arena1-5 as name instead"],
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
disabled = function() return not Gladdy.db.healthName end
|
||||||
}),
|
}),
|
||||||
healthActual = option({
|
healthActual = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show the actual health"],
|
name = L["Show the actual health"],
|
||||||
desc = L["Show the actual health on the health bar"],
|
desc = L["Show the actual health on the health bar"],
|
||||||
order = 31,
|
order = 4,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
healthMax = option({
|
healthMax = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show max health"],
|
name = L["Show max health"],
|
||||||
desc = L["Show max health on the health bar"],
|
desc = L["Show max health on the health bar"],
|
||||||
order = 32,
|
order = 5,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
healthPercentage = option({
|
healthPercentage = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show health percentage"],
|
name = L["Show health percentage"],
|
||||||
desc = L["Show health percentage on the health bar"],
|
desc = L["Show health percentage on the health bar"],
|
||||||
order = 33,
|
order = 6,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -3,10 +3,12 @@ local CreateFrame, UnitIsUnit = CreateFrame, UnitIsUnit
|
|||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local Highlight = Gladdy:NewModule("Highlight", nil, {
|
local Highlight = Gladdy:NewModule("Highlight", nil, {
|
||||||
highlightBorderSize = 2,
|
highlightBorderSize = 1,
|
||||||
|
highlightInset = false,
|
||||||
targetBorderColor = { r = 1, g = 0.8, b = 0, a = 1 },
|
targetBorderColor = { r = 1, g = 0.8, b = 0, a = 1 },
|
||||||
focusBorderColor = { r = 1, g = 0, b = 0, a = 1 },
|
focusBorderColor = { r = 1, g = 0, b = 0, a = 1 },
|
||||||
leaderBorderColor = { r = 0, g = 1, b = 0, a = 1 },
|
leaderBorderColor = { r = 0, g = 1, b = 0, a = 1 },
|
||||||
|
highlightBorderStyle = "Square Full White",
|
||||||
highlight = true,
|
highlight = true,
|
||||||
targetBorder = true,
|
targetBorder = true,
|
||||||
focusBorder = true,
|
focusBorder = true,
|
||||||
@ -50,21 +52,21 @@ function Highlight:CreateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local healthBar = Gladdy.modules.Healthbar.frames[unit]
|
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
||||||
|
|
||||||
local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
targetBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = Gladdy.db.highlightBorderSize })
|
targetBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
targetBorder:SetFrameStrata("HIGH")
|
--targetBorder:SetFrameStrata("MEDIUM")
|
||||||
targetBorder:Hide()
|
targetBorder:Hide()
|
||||||
|
|
||||||
local focusBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local focusBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
focusBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = Gladdy.db.highlightBorderSize })
|
focusBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
focusBorder:SetFrameStrata("LOW")
|
--focusBorder:SetFrameStrata("MEDIUM")
|
||||||
focusBorder:Hide()
|
focusBorder:Hide()
|
||||||
|
|
||||||
local leaderBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
local leaderBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
leaderBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = Gladdy.db.highlightBorderSize })
|
leaderBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = Gladdy.db.highlightBorderSize })
|
||||||
leaderBorder:SetFrameStrata("MEDIUM")
|
--leaderBorder:SetFrameStrata("MEDIUM")
|
||||||
leaderBorder:Hide()
|
leaderBorder:Hide()
|
||||||
|
|
||||||
local highlight = healthBar:CreateTexture(nil, "OVERLAY")
|
local highlight = healthBar:CreateTexture(nil, "OVERLAY")
|
||||||
@ -87,30 +89,50 @@ function Highlight:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0
|
||||||
local borderSize = Gladdy.db.highlightBorderSize
|
local borderSize = Gladdy.db.highlightBorderSize
|
||||||
local iconSize = Gladdy.db.healthBarHeight + Gladdy.db.powerBarHeight + 1
|
local borderOffset = borderSize
|
||||||
local width = Gladdy.db.barWidth + borderSize * 2
|
local hpAndPowerHeight = Gladdy.db.healthBarHeight + powerBarHeight
|
||||||
local height = iconSize + borderSize * 2
|
local width = Gladdy.db.barWidth + (Gladdy.db.highlightInset and 0 or borderSize * 2)
|
||||||
|
local height = hpAndPowerHeight + (Gladdy.db.highlightInset and 0 or borderSize * 2)
|
||||||
|
|
||||||
button.targetBorder:SetWidth(width)
|
button.targetBorder:SetWidth(width)
|
||||||
button.targetBorder:SetHeight(height)
|
button.targetBorder:SetHeight(height)
|
||||||
button.targetBorder:ClearAllPoints()
|
button.targetBorder:ClearAllPoints()
|
||||||
button.targetBorder:SetPoint("TOP", button.healthBar, "TOP", 0, borderSize)
|
if Gladdy.db.highlightInset then
|
||||||
button.targetBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = borderSize })
|
button.targetBorder:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", -(borderOffset/Gladdy.db.statusbarBorderOffset), (borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
button.targetBorder:SetPoint("BOTTOMRIGHT", Gladdy.db.powerBarEnabled and button.powerBar or button.healthBar, "BOTTOMRIGHT", (borderOffset/Gladdy.db.statusbarBorderOffset), -(borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
else
|
||||||
|
button.targetBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
|
end
|
||||||
|
|
||||||
|
button.targetBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = borderSize })
|
||||||
button.targetBorder:SetBackdropBorderColor(Gladdy.db.targetBorderColor.r, Gladdy.db.targetBorderColor.g, Gladdy.db.targetBorderColor.b, Gladdy.db.targetBorderColor.a)
|
button.targetBorder:SetBackdropBorderColor(Gladdy.db.targetBorderColor.r, Gladdy.db.targetBorderColor.g, Gladdy.db.targetBorderColor.b, Gladdy.db.targetBorderColor.a)
|
||||||
|
|
||||||
button.focusBorder:SetWidth(width)
|
button.focusBorder:SetWidth(width)
|
||||||
button.focusBorder:SetHeight(height)
|
button.focusBorder:SetHeight(height)
|
||||||
button.focusBorder:ClearAllPoints()
|
button.focusBorder:ClearAllPoints()
|
||||||
button.focusBorder:SetPoint("TOP", button.healthBar, "TOP", 0, borderSize)
|
if Gladdy.db.highlightInset then
|
||||||
button.focusBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = borderSize })
|
button.focusBorder:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", -(borderOffset/Gladdy.db.statusbarBorderOffset), (borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
button.focusBorder:SetPoint("BOTTOMRIGHT", Gladdy.db.powerBarEnabled and button.powerBar or button.healthBar, "BOTTOMRIGHT", (borderOffset/Gladdy.db.statusbarBorderOffset), -(borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
else
|
||||||
|
button.focusBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
|
end
|
||||||
|
|
||||||
|
button.focusBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = borderSize })
|
||||||
button.focusBorder:SetBackdropBorderColor(Gladdy.db.focusBorderColor.r, Gladdy.db.focusBorderColor.g, Gladdy.db.focusBorderColor.b, Gladdy.db.focusBorderColor.a)
|
button.focusBorder:SetBackdropBorderColor(Gladdy.db.focusBorderColor.r, Gladdy.db.focusBorderColor.g, Gladdy.db.focusBorderColor.b, Gladdy.db.focusBorderColor.a)
|
||||||
|
|
||||||
button.leaderBorder:SetWidth(width)
|
button.leaderBorder:SetWidth(width)
|
||||||
button.leaderBorder:SetHeight(height)
|
button.leaderBorder:SetHeight(height)
|
||||||
button.leaderBorder:ClearAllPoints()
|
button.leaderBorder:ClearAllPoints()
|
||||||
button.leaderBorder:SetPoint("TOP", button.healthBar, "TOP", 0, borderSize)
|
if Gladdy.db.highlightInset then
|
||||||
button.leaderBorder:SetBackdrop({ edgeFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeSize = borderSize })
|
button.leaderBorder:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", -(borderOffset/Gladdy.db.statusbarBorderOffset), (borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
button.leaderBorder:SetPoint("BOTTOMRIGHT", button.powerBar, "BOTTOMRIGHT", (borderOffset/Gladdy.db.statusbarBorderOffset), -(borderOffset/Gladdy.db.statusbarBorderOffset))
|
||||||
|
else
|
||||||
|
button.leaderBorder:SetPoint("TOP", button.healthBar, "TOP", 0, (Gladdy.db.highlightInset and 0 or borderSize))
|
||||||
|
end
|
||||||
|
|
||||||
|
button.leaderBorder:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.highlightBorderStyle), edgeSize = borderSize })
|
||||||
button.leaderBorder:SetBackdropBorderColor(Gladdy.db.leaderBorderColor.r, Gladdy.db.leaderBorderColor.g, Gladdy.db.leaderBorderColor.b, Gladdy.db.leaderBorderColor.a)
|
button.leaderBorder:SetBackdropBorderColor(Gladdy.db.leaderBorderColor.r, Gladdy.db.leaderBorderColor.g, Gladdy.db.leaderBorderColor.b, Gladdy.db.leaderBorderColor.a)
|
||||||
if Gladdy.frame.testing then
|
if Gladdy.frame.testing then
|
||||||
Highlight:Test(unit)
|
Highlight:Test(unit)
|
||||||
@ -135,7 +157,7 @@ function Highlight:Test(unit)
|
|||||||
elseif (unit == "arena2") then
|
elseif (unit == "arena2") then
|
||||||
self:Toggle(unit, "target", true)
|
self:Toggle(unit, "target", true)
|
||||||
elseif (unit == "arena3") then
|
elseif (unit == "arena3") then
|
||||||
self:Toggle(unit, "leader", true)
|
--self:Toggle(unit, "leader", true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -179,39 +201,51 @@ function Highlight:GetOptions()
|
|||||||
name = L["Highlight"],
|
name = L["Highlight"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
highlightBorderSize = {
|
highlightInset = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Show Inside"],
|
||||||
|
desc = L["Show Highlight border inside of frame"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
|
highlightBorderSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Border size"],
|
name = L["Border size"],
|
||||||
desc = L["Border size"],
|
desc = L["Border size"],
|
||||||
order = 3,
|
order = 4,
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 10,
|
max = 20,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
highlightBorderStyle = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Border style"],
|
||||||
|
order = 5,
|
||||||
|
dialogControl = "LSM30_Border",
|
||||||
|
values = AceGUIWidgetLSMlists.border,
|
||||||
|
}),
|
||||||
|
headerColor = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Colors"],
|
||||||
|
order = 6,
|
||||||
},
|
},
|
||||||
targetBorderColor = Gladdy:colorOption({
|
targetBorderColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
name = L["Target border color"],
|
name = L["Target border color"],
|
||||||
desc = L["Color of the selected targets border"],
|
desc = L["Color of the selected targets border"],
|
||||||
order = 4,
|
order = 7,
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
}),
|
}),
|
||||||
focusBorderColor = Gladdy:colorOption({
|
focusBorderColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
name = L["Focus border color"],
|
name = L["Focus border color"],
|
||||||
desc = L["Color of the focus border"],
|
desc = L["Color of the focus border"],
|
||||||
order = 5,
|
order = 8,
|
||||||
hasAlpha = true,
|
|
||||||
}),
|
|
||||||
leaderBorderColor = Gladdy:colorOption({
|
|
||||||
type = "color",
|
|
||||||
name = L["Raid leader border color"],
|
|
||||||
desc = L["Color of the raid leader border"],
|
|
||||||
order = 6,
|
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
}),
|
}),
|
||||||
headerEnable = {
|
headerEnable = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Enable/Disable"],
|
name = L["Enabled"],
|
||||||
order = 10,
|
order = 10,
|
||||||
},
|
},
|
||||||
highlight = Gladdy:option({
|
highlight = Gladdy:option({
|
||||||
@ -219,24 +253,21 @@ function Highlight:GetOptions()
|
|||||||
name = L["Highlight target"],
|
name = L["Highlight target"],
|
||||||
desc = L["Toggle if the selected target should be highlighted"],
|
desc = L["Toggle if the selected target should be highlighted"],
|
||||||
order = 11,
|
order = 11,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
targetBorder = Gladdy:option({
|
targetBorder = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show border around target"],
|
name = L["Show border around target"],
|
||||||
desc = L["Toggle if a border should be shown around the selected target"],
|
desc = L["Toggle if a border should be shown around the selected target"],
|
||||||
order = 12,
|
order = 12,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
focusBorder = Gladdy:option({
|
focusBorder = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show border around focus"],
|
name = L["Show border around focus"],
|
||||||
desc = L["Toggle of a border should be shown around the current focus"],
|
desc = L["Toggle of a border should be shown around the current focus"],
|
||||||
order = 13,
|
order = 13,
|
||||||
}),
|
width = "full",
|
||||||
leaderBorder = Gladdy:option({
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Show border around raid leader"],
|
|
||||||
desc = L["Toggle if a border should be shown around the raid leader"],
|
|
||||||
order = 14,
|
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
end
|
end
|
@ -1,12 +1,12 @@
|
|||||||
local string_gsub, floor, pairs = string.gsub, math.floor, pairs
|
local string_gsub, floor, pairs = string.gsub, math.floor, pairs
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame, SetPortraitTexture = CreateFrame, SetPortraitTexture
|
||||||
local UnitHealthMax, UnitHealth, UnitGUID = UnitHealthMax, UnitHealth, UnitGUID
|
local UnitHealthMax, UnitHealth, UnitGUID = UnitHealthMax, UnitHealth, UnitGUID
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local Pets = Gladdy:NewModule("Pets", nil, {
|
local Pets = Gladdy:NewModule("Pets", nil, {
|
||||||
petEnabled = true,
|
petEnabled = true,
|
||||||
petWidth = 100,
|
petWidth = 128,
|
||||||
petHeight = 20,
|
petHeight = 20,
|
||||||
petPortraitEnabled = true,
|
petPortraitEnabled = true,
|
||||||
petPortraitBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
petPortraitBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||||
@ -21,8 +21,8 @@ local Pets = Gladdy:NewModule("Pets", nil, {
|
|||||||
petHealthBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
petHealthBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||||
petHealthBarFontSize = 12,
|
petHealthBarFontSize = 12,
|
||||||
petHealthPercentage = true,
|
petHealthPercentage = true,
|
||||||
petXOffset = 50,
|
petXOffset = 1,
|
||||||
petYOffset = 0,
|
petYOffset = -62,
|
||||||
})
|
})
|
||||||
|
|
||||||
function Pets:Initialize()
|
function Pets:Initialize()
|
||||||
@ -124,6 +124,7 @@ function Pets:Test(unitId)
|
|||||||
petFrame.healthBar.hp:SetMinMaxValues(0, 6200)
|
petFrame.healthBar.hp:SetMinMaxValues(0, 6200)
|
||||||
petFrame.healthBar.hp:SetValue(2000)
|
petFrame.healthBar.hp:SetValue(2000)
|
||||||
Pets:SetHealthText(petFrame.healthBar, 2000, 6200)
|
Pets:SetHealthText(petFrame.healthBar, 2000, 6200)
|
||||||
|
SetPortraitTexture(petFrame.healthBar.portrait, "player")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -136,9 +137,9 @@ function Pets:CreateFrame(unitId)
|
|||||||
--button:SetAlpha(0)
|
--button:SetAlpha(0)
|
||||||
button:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset)
|
button:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset)
|
||||||
|
|
||||||
local secure = CreateFrame("Button", "GladdyButton" .. unit, button, "SecureActionButtonTemplate")
|
local secure = CreateFrame("Button", "GladdyButton" .. unit, button, "SecureActionButtonTemplate, SecureHandlerEnterLeaveTemplate")
|
||||||
secure:RegisterForClicks("AnyUp")
|
|
||||||
secure:RegisterForClicks("AnyUp")
|
secure:RegisterForClicks("AnyUp")
|
||||||
|
secure:RegisterForClicks("AnyDown")
|
||||||
secure:SetAttribute("*type1", "target")
|
secure:SetAttribute("*type1", "target")
|
||||||
secure:SetAttribute("*type2", "focus")
|
secure:SetAttribute("*type2", "focus")
|
||||||
secure:SetAttribute("unit", unit)
|
secure:SetAttribute("unit", unit)
|
||||||
@ -155,7 +156,7 @@ function Pets:CreateFrame(unitId)
|
|||||||
healthBar:SetAllPoints(button)
|
healthBar:SetAllPoints(button)
|
||||||
healthBar:SetAlpha(0)
|
healthBar:SetAlpha(0)
|
||||||
|
|
||||||
healthBar.portrait = healthBar:CreateTexture(nil, "OVERLAY")
|
healthBar.portrait = healthBar:CreateTexture(nil, "BACKGROUND")
|
||||||
healthBar.portrait:SetPoint("LEFT", healthBar, "RIGHT")
|
healthBar.portrait:SetPoint("LEFT", healthBar, "RIGHT")
|
||||||
healthBar.portrait:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
healthBar.portrait:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||||
SetPortraitTexture(healthBar.portrait, "player")
|
SetPortraitTexture(healthBar.portrait, "player")
|
||||||
@ -332,21 +333,21 @@ end
|
|||||||
|
|
||||||
function Pets:GetOptions()
|
function Pets:GetOptions()
|
||||||
return {
|
return {
|
||||||
headerHealthbar = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Health Bar"],
|
name = L["Pets"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
petEnabled = Gladdy:option({
|
petEnabled = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Enable"],
|
name = L["Enabled"],
|
||||||
desc = L["Enabled Pets module"],
|
desc = L["Enables Pets module"],
|
||||||
order = 3,
|
order = 3,
|
||||||
}),
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 3,
|
||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
@ -367,6 +368,7 @@ function Pets:GetOptions()
|
|||||||
min = 10,
|
min = 10,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
petWidth = option({
|
petWidth = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -374,8 +376,9 @@ function Pets:GetOptions()
|
|||||||
desc = L["Width of the bar"],
|
desc = L["Width of the bar"],
|
||||||
order = 4,
|
order = 4,
|
||||||
min = 10,
|
min = 10,
|
||||||
max = 100,
|
max = 300,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
petHealthBarTexture = option({
|
petHealthBarTexture = option({
|
||||||
type = "select",
|
type = "select",
|
||||||
@ -457,6 +460,7 @@ function Pets:GetOptions()
|
|||||||
order = 13,
|
order = 13,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -485,6 +489,7 @@ function Pets:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = Gladdy.db.petHeight/2,
|
max = Gladdy.db.petHeight/2,
|
||||||
step = 0.5,
|
step = 0.5,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
petHealthBarBorderColor = Gladdy:colorOption({
|
petHealthBarBorderColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
@ -512,6 +517,7 @@ function Pets:GetOptions()
|
|||||||
min = -600,
|
min = -600,
|
||||||
max = 600,
|
max = 600,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
petYOffset = Gladdy:option({
|
petYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -520,6 +526,7 @@ function Pets:GetOptions()
|
|||||||
min = -600,
|
min = -600,
|
||||||
max = 600,
|
max = 600,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -6,7 +6,8 @@ local CreateFrame, UnitPower, UnitPowerType, UnitPowerMax, UnitExists = CreateFr
|
|||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
local AceGUIWidgetLSMlists = AceGUIWidgetLSMlists
|
||||||
local Powerbar = Gladdy:NewModule("Powerbar", 90, {
|
local Powerbar = Gladdy:NewModule("Power Bar", 90, {
|
||||||
|
powerBarEnabled = true,
|
||||||
powerBarFont = "DorisPP",
|
powerBarFont = "DorisPP",
|
||||||
powerBarHeight = 20,
|
powerBarHeight = 20,
|
||||||
powerBarTexture = "Smooth",
|
powerBarTexture = "Smooth",
|
||||||
@ -36,6 +37,7 @@ function Powerbar:CreateFrame(unit)
|
|||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
|
|
||||||
local powerBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
local powerBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
powerBar:EnableMouse(false)
|
||||||
powerBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.powerBarBorderStyle),
|
powerBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.powerBarBorderStyle),
|
||||||
edgeSize = Gladdy.db.powerBarBorderSize })
|
edgeSize = Gladdy.db.powerBarBorderSize })
|
||||||
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
||||||
@ -112,17 +114,24 @@ function Powerbar:SetPower(powerBar, power, powerMax, powerType)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (powerType == 1) then
|
if (powerType == 1 and powerBar.powerType ~= powerType) then
|
||||||
powerBar.energy:SetStatusBarColor(1, 0, 0, 1)
|
powerBar.energy:SetStatusBarColor(1, 0, 0, 1)
|
||||||
elseif (powerType == 3) then
|
powerBar.powerColor = {r = 1, g = 0, b = 0}
|
||||||
|
powerBar.powerType = powerType
|
||||||
|
elseif (powerType == 3 and powerBar.powerType ~= powerType) then
|
||||||
powerBar.energy:SetStatusBarColor(1, 1, 0, 1)
|
powerBar.energy:SetStatusBarColor(1, 1, 0, 1)
|
||||||
else
|
powerBar.powerColor = {r = 1, g = 1, b = 0}
|
||||||
|
powerBar.powerType = powerType
|
||||||
|
elseif powerBar.powerType ~= powerType then
|
||||||
powerBar.energy:SetStatusBarColor(.18, .44, .75, 1)
|
powerBar.energy:SetStatusBarColor(.18, .44, .75, 1)
|
||||||
|
powerBar.powerColor = {r = .18, g = .44, b = .75}
|
||||||
|
powerBar.powerType = powerType
|
||||||
end
|
end
|
||||||
|
|
||||||
powerBar.powerText:SetText(powerText)
|
powerBar.powerText:SetText(powerText)
|
||||||
powerBar.energy:SetMinMaxValues(0, powerMax)
|
powerBar.energy:SetMinMaxValues(0, powerMax)
|
||||||
powerBar.energy:SetValue(power)
|
powerBar.energy:SetValue(power)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Powerbar:UpdateFrame(unit)
|
function Powerbar:UpdateFrame(unit)
|
||||||
@ -131,9 +140,15 @@ function Powerbar:UpdateFrame(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local healthBar = Gladdy.modules.Healthbar.frames[unit]
|
local healthBar = Gladdy.modules["Health Bar"].frames[unit]
|
||||||
|
|
||||||
|
|
||||||
|
if not Gladdy.db.powerBarEnabled then
|
||||||
|
powerBar:Hide()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
powerBar:Show()
|
||||||
|
end
|
||||||
powerBar.bg:SetTexture(Gladdy.LSM:Fetch("statusbar", Gladdy.db.powerBarTexture))
|
powerBar.bg:SetTexture(Gladdy.LSM:Fetch("statusbar", Gladdy.db.powerBarTexture))
|
||||||
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a)
|
||||||
|
|
||||||
@ -168,6 +183,8 @@ function Powerbar:ResetUnit(unit)
|
|||||||
powerBar.raceText:SetText("")
|
powerBar.raceText:SetText("")
|
||||||
powerBar.powerText:SetText("")
|
powerBar.powerText:SetText("")
|
||||||
powerBar.energy:SetValue(0)
|
powerBar.energy:SetValue(0)
|
||||||
|
powerBar.powerType = ""
|
||||||
|
powerBar.powerColor = {r = 1, g = 1, b = 1}
|
||||||
end
|
end
|
||||||
|
|
||||||
function Powerbar:Test(unit)
|
function Powerbar:Test(unit)
|
||||||
@ -206,8 +223,13 @@ function Powerbar:UNIT_SPEC(unit, spec)
|
|||||||
if (not powerBar or not button) then
|
if (not powerBar or not button) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local raceText = Gladdy.db.powerShowRace and button.raceLoc or ""
|
||||||
|
|
||||||
powerBar.raceText:SetText(spec .. " " .. button.raceLoc)
|
if (button.spec and Gladdy.db.powerShowSpec) then
|
||||||
|
raceText = spec .. " " .. raceText
|
||||||
|
end
|
||||||
|
|
||||||
|
powerBar.raceText:SetText(raceText)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Powerbar:UNIT_POWER(unit, power, powerMax, powerType)
|
function Powerbar:UNIT_POWER(unit, power, powerMax, powerType)
|
||||||
@ -246,10 +268,13 @@ function Powerbar:UNIT_POWER(unit, power, powerMax, powerType)
|
|||||||
|
|
||||||
if (powerType == 1) then
|
if (powerType == 1) then
|
||||||
powerBar.energy:SetStatusBarColor(1, 0, 0, 1)
|
powerBar.energy:SetStatusBarColor(1, 0, 0, 1)
|
||||||
|
powerBar.powerColor = {r = 1, g = 0, b = 0}
|
||||||
elseif (powerType == 3) then
|
elseif (powerType == 3) then
|
||||||
powerBar.energy:SetStatusBarColor(1, 1, 0, 1)
|
powerBar.energy:SetStatusBarColor(1, 1, 0, 1)
|
||||||
|
powerBar.powerColor = {r = 1, g = 1, b = 0}
|
||||||
else
|
else
|
||||||
powerBar.energy:SetStatusBarColor(.18, .44, .75, 1)
|
powerBar.energy:SetStatusBarColor(.18, .44, .75, 1)
|
||||||
|
powerBar.powerColor = {r = .18, g = .44, b = .75}
|
||||||
end
|
end
|
||||||
|
|
||||||
powerBar.powerText:SetText(powerText)
|
powerBar.powerText:SetText(powerText)
|
||||||
@ -284,7 +309,7 @@ local function option(params)
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
local key = info.arg or info[#info]
|
local key = info.arg or info[#info]
|
||||||
Gladdy.dbi.profile[key] = value
|
Gladdy.dbi.profile[key] = value
|
||||||
Gladdy.options.args.Powerbar.args.group.args.border.args.powerBarBorderSize.max = Gladdy.db.powerBarHeight/2
|
Gladdy.options.args["Power Bar"].args.group.args.border.args.powerBarBorderSize.max = Gladdy.db.powerBarHeight/2
|
||||||
if Gladdy.db.powerBarBorderSize > Gladdy.db.powerBarHeight/2 then
|
if Gladdy.db.powerBarBorderSize > Gladdy.db.powerBarHeight/2 then
|
||||||
Gladdy.db.powerBarBorderSize = Gladdy.db.powerBarHeight/2
|
Gladdy.db.powerBarBorderSize = Gladdy.db.powerBarHeight/2
|
||||||
end
|
end
|
||||||
@ -309,11 +334,16 @@ function Powerbar:GetOptions()
|
|||||||
name = L["Power Bar"],
|
name = L["Power Bar"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
powerBarEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enabled"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 3,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
type = "group",
|
type = "group",
|
||||||
@ -333,6 +363,7 @@ function Powerbar:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
powerBarTexture = option({
|
powerBarTexture = option({
|
||||||
type = "select",
|
type = "select",
|
||||||
@ -384,6 +415,7 @@ function Powerbar:GetOptions()
|
|||||||
step = 0.1,
|
step = 0.1,
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -412,6 +444,7 @@ function Powerbar:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = Gladdy.db.powerBarHeight/2,
|
max = Gladdy.db.powerBarHeight/2,
|
||||||
step = 0.5,
|
step = 0.5,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
powerBarBorderColor = Gladdy:colorOption({
|
powerBarBorderColor = Gladdy:colorOption({
|
||||||
type = "color",
|
type = "color",
|
||||||
|
@ -62,12 +62,12 @@ local function iconTimer(self,elapsed)
|
|||||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
elseif timeLeft <= 10 and timeLeft >= 5 then
|
||||||
-- between 10s and 5s (orange)
|
-- between 10s and 5s (orange)
|
||||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft)
|
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft)
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
elseif timeLeft < 5 and timeLeft > 0 then
|
||||||
-- between 5s and 1s (red)
|
-- between 5s and 1s (red)
|
||||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft >= 0.0 and timeLeft or 0.0)
|
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
else
|
else
|
||||||
self.cooldownFont:SetText("")
|
self.cooldownFont:SetText("")
|
||||||
@ -77,8 +77,10 @@ end
|
|||||||
|
|
||||||
function Racial:CreateFrame(unit)
|
function Racial:CreateFrame(unit)
|
||||||
local racial = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
local racial = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||||
|
racial:EnableMouse(false)
|
||||||
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
||||||
racial.texture:SetAllPoints(racial)
|
racial.texture:SetAllPoints(racial)
|
||||||
|
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
--racial.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
--racial.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||||
|
|
||||||
racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate")
|
racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate")
|
||||||
@ -132,7 +134,7 @@ function Racial:UpdateFrame(unit)
|
|||||||
racial.texture.overlay:SetVertexColor(Gladdy.db.racialBorderColor.r, Gladdy.db.racialBorderColor.g, Gladdy.db.racialBorderColor.b, Gladdy.db.racialBorderColor.a)
|
racial.texture.overlay:SetVertexColor(Gladdy.db.racialBorderColor.r, Gladdy.db.racialBorderColor.g, Gladdy.db.racialBorderColor.b, Gladdy.db.racialBorderColor.a)
|
||||||
|
|
||||||
racial:ClearAllPoints()
|
racial:ClearAllPoints()
|
||||||
local margin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
local parent = Gladdy.buttons[unit][Gladdy.db.racialAnchor]
|
local parent = Gladdy.buttons[unit][Gladdy.db.racialAnchor]
|
||||||
if (Gladdy.db.racialPos == "RIGHT") then
|
if (Gladdy.db.racialPos == "RIGHT") then
|
||||||
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset)
|
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset)
|
||||||
@ -194,7 +196,7 @@ function Racial:ResetUnit(unit)
|
|||||||
if (not racial) then
|
if (not racial) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
racial.texture:SetTexture(nil)
|
||||||
racial.timeLeft = nil
|
racial.timeLeft = nil
|
||||||
racial.active = false
|
racial.active = false
|
||||||
racial.cooldown:Clear()
|
racial.cooldown:Clear()
|
||||||
@ -224,7 +226,7 @@ function Racial:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
@ -235,7 +237,7 @@ function Racial:GetOptions()
|
|||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Size"],
|
||||||
order = 4,
|
order = 1,
|
||||||
},
|
},
|
||||||
racialSize = Gladdy:option({
|
racialSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -243,7 +245,8 @@ function Racial:GetOptions()
|
|||||||
min = 5,
|
min = 5,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 4,
|
order = 2,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
racialWidthFactor = Gladdy:option({
|
racialWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -251,7 +254,8 @@ function Racial:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 6,
|
order = 3,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -269,6 +273,7 @@ function Racial:GetOptions()
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
order = 7,
|
order = 7,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
racialCooldownAlpha = Gladdy:option({
|
racialCooldownAlpha = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -277,6 +282,7 @@ function Racial:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -306,6 +312,7 @@ function Racial:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -316,7 +323,7 @@ function Racial:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Position"],
|
name = L["Icon position"],
|
||||||
order = 4,
|
order = 4,
|
||||||
},
|
},
|
||||||
racialAnchor = Gladdy:option({
|
racialAnchor = Gladdy:option({
|
||||||
@ -333,7 +340,7 @@ function Racial:GetOptions()
|
|||||||
}),
|
}),
|
||||||
racialPos = Gladdy:option({
|
racialPos = Gladdy:option({
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Position"],
|
name = L["Icon position"],
|
||||||
desc = L["This changes position relative to its anchor of the racial icon"],
|
desc = L["This changes position relative to its anchor of the racial icon"],
|
||||||
order = 21,
|
order = 21,
|
||||||
values = {
|
values = {
|
||||||
@ -350,6 +357,7 @@ function Racial:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
racialYOffset = Gladdy:option({
|
racialYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -358,6 +366,7 @@ function Racial:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
415
Modules/RangeCheck.lua
Normal file
415
Modules/RangeCheck.lua
Normal file
@ -0,0 +1,415 @@
|
|||||||
|
local UnitIsConnected = UnitIsConnected
|
||||||
|
local UnitInPhase = UnitInPhase
|
||||||
|
local UnitInRaid = UnitInRaid
|
||||||
|
local UnitInParty = UnitInParty
|
||||||
|
local UnitInRange = UnitInRange
|
||||||
|
local CheckInteractDistance = CheckInteractDistance
|
||||||
|
local C_Timer = C_Timer
|
||||||
|
local UnitIsUnit = UnitIsUnit
|
||||||
|
local UnitClass = UnitClass
|
||||||
|
local GetSpellInfo = GetSpellInfo
|
||||||
|
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||||
|
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
||||||
|
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||||
|
local select, ipairs, type, tonumber, tostring, format = select, ipairs, type, tonumber, tostring, format
|
||||||
|
|
||||||
|
local LibStub = LibStub
|
||||||
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local LSR = LibStub("SpellRange-1.0")
|
||||||
|
local L = Gladdy.L
|
||||||
|
|
||||||
|
local classSpells = {
|
||||||
|
["MAGE"] = 118,
|
||||||
|
["PRIEST"] = 32379,
|
||||||
|
["DRUID"] = 33786,
|
||||||
|
["SHAMAN"] = 10414,
|
||||||
|
["PALADIN"] = 10308,
|
||||||
|
["WARLOCK"] = 5782,
|
||||||
|
["WARRIOR"] = 20252,
|
||||||
|
["HUNTER"] = 27018,
|
||||||
|
["ROGUE"] = 36554,
|
||||||
|
}
|
||||||
|
|
||||||
|
local function defaultSpells()
|
||||||
|
local defaults = {}
|
||||||
|
for _,class in ipairs(Gladdy.CLASSES) do
|
||||||
|
defaults[class] = { min = classSpells[class] }
|
||||||
|
end
|
||||||
|
return defaults
|
||||||
|
end
|
||||||
|
|
||||||
|
local RangeCheck = Gladdy:NewModule("Range Check", nil, {
|
||||||
|
rangeCheckEnabled = true,
|
||||||
|
rangeCheckDefaultSpells = defaultSpells(),
|
||||||
|
rangeCheckOorFactor = 1.5,
|
||||||
|
rangeCheckHealthBar = true,
|
||||||
|
rangeCheckHealthBarText = true,
|
||||||
|
rangeCheckPowerBar = true,
|
||||||
|
rangeCheckPowerBarText = true,
|
||||||
|
rangeCheckClassIcon = false,
|
||||||
|
rangeCheckTrinket = false,
|
||||||
|
rangeCheckRacial = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
function RangeCheck:Initialize()
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
|
self:RegisterMessage("ENEMY_STEALTH")
|
||||||
|
self:RegisterMessage("ENEMY_SPOTTED")
|
||||||
|
self.playerClass = select(2, UnitClass("player"))
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:Reset()
|
||||||
|
self.test = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:ResetUnit(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
self:CancelTimer(button)
|
||||||
|
self:SetColor(button, 1)
|
||||||
|
button.classColors = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:Test(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if not button then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self:ENEMY_SPOTTED(unit)
|
||||||
|
self.test = true
|
||||||
|
button.lastState = 0
|
||||||
|
if Gladdy.db.rangeCheckEnabled then
|
||||||
|
if unit == "arena1" then
|
||||||
|
--button.unit = "target"
|
||||||
|
--self:CreateTimer(button)
|
||||||
|
self:SetRangeAlpha(button, nil)
|
||||||
|
else
|
||||||
|
self:SetRangeAlpha(button, true)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self:SetRangeAlpha(button, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:UpdateFrame(unit)
|
||||||
|
if self.test then
|
||||||
|
self:Test(unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:SetColor(button, oorFac)
|
||||||
|
if button.lastState == oorFac then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not button.classColors.r then
|
||||||
|
if button.class then
|
||||||
|
button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b }
|
||||||
|
else
|
||||||
|
button.classColors = { r = 0.66, g = 0.66, b = 0.66 }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.rangeCheckHealthBar then
|
||||||
|
button.healthBar.hp:SetStatusBarColor(button.classColors.r/oorFac, button.classColors.g/oorFac, button.classColors.b/oorFac, 1)
|
||||||
|
else
|
||||||
|
button.healthBar.hp:SetStatusBarColor(button.classColors.r, button.classColors.g, button.classColors.b, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.rangeCheckHealthBarText then
|
||||||
|
button.healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r/oorFac, Gladdy.db.healthBarFontColor.g/oorFac, Gladdy.db.healthBarFontColor.b/oorFac, Gladdy.db.healthBarFontColor.a)
|
||||||
|
button.healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r/oorFac, Gladdy.db.healthBarFontColor.g/oorFac, Gladdy.db.healthBarFontColor.b/oorFac, Gladdy.db.healthBarFontColor.a)
|
||||||
|
else
|
||||||
|
button.healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||||
|
button.healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.rangeCheckPowerBar then
|
||||||
|
button.powerBar.energy:SetStatusBarColor(button.powerBar.powerColor.r/oorFac, button.powerBar.powerColor.g/oorFac, button.powerBar.powerColor.b/oorFac, 1)
|
||||||
|
else
|
||||||
|
button.powerBar.energy:SetStatusBarColor(button.powerBar.powerColor.r, button.powerBar.powerColor.g, button.powerBar.powerColor.b, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.rangeCheckPowerBarText then
|
||||||
|
button.powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r/oorFac, Gladdy.db.powerBarFontColor.g/oorFac, Gladdy.db.powerBarFontColor.b/oorFac, Gladdy.db.powerBarFontColor.a)
|
||||||
|
button.powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r/oorFac, Gladdy.db.powerBarFontColor.g/oorFac, Gladdy.db.powerBarFontColor.b/oorFac, Gladdy.db.powerBarFontColor.a)
|
||||||
|
else
|
||||||
|
button.powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
|
button.powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a)
|
||||||
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.rangeCheckTrinket then
|
||||||
|
button.trinket.texture:SetVertexColor(1/oorFac, 1/oorFac, 1/oorFac)
|
||||||
|
else
|
||||||
|
button.trinket.texture:SetVertexColor(1, 1, 1)
|
||||||
|
end
|
||||||
|
if Gladdy.db.rangeCheckClassIcon then
|
||||||
|
button.classIcon.texture:SetVertexColor(1/oorFac, 1/oorFac, 1/oorFac)
|
||||||
|
button.aura.icon:SetVertexColor(1/oorFac, 1/oorFac, 1/oorFac)
|
||||||
|
else
|
||||||
|
button.classIcon.texture:SetVertexColor(1, 1, 1)
|
||||||
|
button.aura.icon:SetVertexColor(1, 1, 1)
|
||||||
|
end
|
||||||
|
if Gladdy.db.rangeCheckRacial then
|
||||||
|
button.racial.texture:SetVertexColor(1/oorFac, 1/oorFac, 1/oorFac)
|
||||||
|
else
|
||||||
|
button.racial.texture:SetVertexColor(1, 1, 1)
|
||||||
|
end
|
||||||
|
button.lastState = oorFac
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:SetRangeAlpha(button, inRange)
|
||||||
|
local oorFac = Gladdy.db.rangeCheckOorFactor
|
||||||
|
if inRange then
|
||||||
|
RangeCheck:SetColor(button, 1)
|
||||||
|
else
|
||||||
|
RangeCheck:SetColor(button, oorFac)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:JOINED_ARENA()
|
||||||
|
self.test = nil
|
||||||
|
if Gladdy.db.rangeCheckEnabled then
|
||||||
|
for i = 1, Gladdy.curBracket do
|
||||||
|
local button = Gladdy.buttons["arena"..i]
|
||||||
|
--if i == 1 then button.unit = "focus" end
|
||||||
|
self:CreateTimer(button)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:ENEMY_STEALTH(unit, stealth)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if not button then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
button.lastState = 0
|
||||||
|
if stealth then
|
||||||
|
button.classColors = { r = 0.66, g = 0.66, b = 0.66 }
|
||||||
|
else
|
||||||
|
if button.class then
|
||||||
|
button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:ENEMY_SPOTTED(unit)
|
||||||
|
local button = Gladdy.buttons[unit]
|
||||||
|
if (not button) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b }
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck.CheckRange(self)
|
||||||
|
local button = self.parent
|
||||||
|
|
||||||
|
local spell = Gladdy.db.rangeCheckDefaultSpells[RangeCheck.playerClass].min
|
||||||
|
|
||||||
|
if( not UnitIsConnected(button.unit) or not UnitInPhase(button.unit) ) then
|
||||||
|
RangeCheck:SetRangeAlpha(button, false)
|
||||||
|
elseif( spell ) then
|
||||||
|
RangeCheck:SetRangeAlpha(button, LSR.IsSpellInRange(spell, button.unit) == 1)
|
||||||
|
-- That didn't work, but they are grouped lets try the actual API for this, it's a bit flaky though and not that useful generally
|
||||||
|
elseif( UnitInRaid(button.unit) or UnitInParty(button.unit) ) then
|
||||||
|
RangeCheck:SetRangeAlpha(button, UnitInRange(button.unit, "player"))
|
||||||
|
-- Nope, fall back to interaction :(
|
||||||
|
else
|
||||||
|
RangeCheck:SetRangeAlpha(button, CheckInteractDistance(button.unit, 4))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:CreateTimer(frame)
|
||||||
|
if not frame.range then
|
||||||
|
frame.range = C_Timer.NewTicker(0.05, RangeCheck.CheckRange)
|
||||||
|
frame.range.parent = frame
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:CancelTimer(frame)
|
||||||
|
if frame.range then
|
||||||
|
frame.range:Cancel()
|
||||||
|
frame.range = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:ForceUpdate(frame)
|
||||||
|
if( UnitIsUnit(frame.unit, "player") ) then
|
||||||
|
frame.healthBar:SetAlpha(1)
|
||||||
|
frame.powerBar:SetAlpha(1)
|
||||||
|
self:CancelTimer(frame)
|
||||||
|
else
|
||||||
|
self:CreateTimer(frame)
|
||||||
|
self.CheckRange(frame.parent)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:GetOptions()
|
||||||
|
return {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Range Check"],
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
|
||||||
|
rangeCheckEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enabled"],
|
||||||
|
desc = L["Enable racial icon"],
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
|
group = {
|
||||||
|
type = "group",
|
||||||
|
childGroups = "tree",
|
||||||
|
name = L["General"],
|
||||||
|
order = 5,
|
||||||
|
args = {
|
||||||
|
general = {
|
||||||
|
type = "group",
|
||||||
|
name = L["General"],
|
||||||
|
order = 1,
|
||||||
|
args = {
|
||||||
|
header = {
|
||||||
|
type = "header",
|
||||||
|
name = L["General"],
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
rangeCheckOorFactor = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Out of Range Darkening Level"],
|
||||||
|
desc = L["Higher is darker"],
|
||||||
|
min = 1.1,
|
||||||
|
max = 5,
|
||||||
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
|
order = 2,
|
||||||
|
}),
|
||||||
|
rangeCheckHealthBar = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Health Bar"],
|
||||||
|
width = "full",
|
||||||
|
order = 3,
|
||||||
|
}),
|
||||||
|
rangeCheckHealthBarText = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Health Bar Text"],
|
||||||
|
width = "full",
|
||||||
|
order = 4,
|
||||||
|
}),
|
||||||
|
rangeCheckPowerBar = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Power Bar"],
|
||||||
|
width = "full",
|
||||||
|
order = 5,
|
||||||
|
}),
|
||||||
|
rangeCheckPowerBarText = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Power Bar Text"],
|
||||||
|
width = "full",
|
||||||
|
order = 6,
|
||||||
|
}),
|
||||||
|
rangeCheckClassIcon = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Class Icon"],
|
||||||
|
width = "full",
|
||||||
|
order = 7,
|
||||||
|
}),
|
||||||
|
rangeCheckTrinket = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Trinket"],
|
||||||
|
width = "full",
|
||||||
|
order = 8,
|
||||||
|
}),
|
||||||
|
rangeCheckRacial = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Fade"] .. " " .. L["Racial"],
|
||||||
|
width = "full",
|
||||||
|
order = 9,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
oorSpells = {
|
||||||
|
type = "group",
|
||||||
|
childGroups = "tree",
|
||||||
|
name = L["Spells"],
|
||||||
|
order = 5,
|
||||||
|
args = RangeCheck:GetSpells(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function RangeCheck:GetSpells()
|
||||||
|
local group = {
|
||||||
|
description = {
|
||||||
|
type = "description",
|
||||||
|
name = "Changing the spellID only applies to your player class!\n\nExample: If you are a Paladin and wish to change your range check spell to Repentance, edit the Paladin spellID to 20066.",
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for i,class in ipairs(Gladdy.CLASSES) do
|
||||||
|
group[class] = {
|
||||||
|
type = "group",
|
||||||
|
name = LOCALIZED_CLASS_NAMES_MALE[class],
|
||||||
|
order = i + 1,
|
||||||
|
icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes",
|
||||||
|
iconCoords = CLASS_ICON_TCOORDS[class],
|
||||||
|
args = {
|
||||||
|
headerMin = {
|
||||||
|
type = "header",
|
||||||
|
name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s - %dyds", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(6, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
||||||
|
or "nil",
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
min = {
|
||||||
|
type = "input",
|
||||||
|
name = "Spell ID", --format("|T%s:20|t %s", select(3, GetSpellInfo(k)), select(1, GetSpellInfo(k)))
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
pattern = "%d+",
|
||||||
|
validate = function(_, value)
|
||||||
|
LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy")
|
||||||
|
return type(tonumber(value)) == "number"
|
||||||
|
end,
|
||||||
|
--image = select(3, GetSpellInfo(defaultSpells()[class].min)),
|
||||||
|
get = function(_)
|
||||||
|
return tostring(Gladdy.db.rangeCheckDefaultSpells[class].min)
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
Gladdy.db.rangeCheckDefaultSpells[class].min = tonumber(value)
|
||||||
|
--Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.min.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
||||||
|
-- or "nil"
|
||||||
|
Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.headerMin.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s - %dyds", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(6, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
||||||
|
or "nil"
|
||||||
|
end
|
||||||
|
},
|
||||||
|
--[[headerMax = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Max"],
|
||||||
|
order = 3,
|
||||||
|
},
|
||||||
|
max = {
|
||||||
|
type = "input",
|
||||||
|
name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max) and format("|T%s:20|t %s", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max)))
|
||||||
|
or "nil",
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
pattern = "%d+",
|
||||||
|
validate = function(_, value)
|
||||||
|
return type(tonumber(value)) == "number"
|
||||||
|
end,
|
||||||
|
--image = select(3, GetSpellInfo(defaultSpells()[class].max)),
|
||||||
|
get = function(_)
|
||||||
|
return tostring(Gladdy.db.rangeCheckDefaultSpells[class].max)
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
Gladdy.db.rangeCheckDefaultSpells[class].max = tonumber(value)
|
||||||
|
Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.max.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max) and format("|T%s:20|t %s", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].max)))
|
||||||
|
or "nil"
|
||||||
|
end
|
||||||
|
}--]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return group
|
||||||
|
end
|
169
Modules/ShadowsightTimer.lua
Normal file
169
Modules/ShadowsightTimer.lua
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
local floor, str_len, tostring, str_sub, str_find, pairs = math.floor, string.len, tostring, string.sub, string.find, pairs
|
||||||
|
local CreateFrame = CreateFrame
|
||||||
|
|
||||||
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local L = Gladdy.L
|
||||||
|
local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
||||||
|
shadowsightTimerEnabled = true,
|
||||||
|
shadowsightTimerScale = 1,
|
||||||
|
shadowsightTimerRelPoint1 = "CENTER",
|
||||||
|
shadowsightTimerRelPoint2 = "CENTER",
|
||||||
|
shadowsightTimerX = 0,
|
||||||
|
shadowsightTimerY = 0,
|
||||||
|
shadowsightAnnounce = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
function ShadowsightTimer:OnEvent(event, ...)
|
||||||
|
self[event](self, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:Initialize()
|
||||||
|
self.locale = Gladdy:GetArenaTimer()
|
||||||
|
self:RegisterMessage("JOINED_ARENA")
|
||||||
|
self:CreateTimerFrame()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:JOINED_ARENA()
|
||||||
|
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||||
|
self:SetScript("OnEvent", ShadowsightTimer.OnEvent)
|
||||||
|
self.timerFrame.font:SetText("1:30")
|
||||||
|
self.timerFrame.font:SetTextColor(1, 0.8, 0)
|
||||||
|
self.timerFrame:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
||||||
|
for k,v in pairs(self.locale) do
|
||||||
|
if str_find(msg, v) then
|
||||||
|
if k == 0 then
|
||||||
|
self:Start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:Test()
|
||||||
|
if Gladdy.db.shadowsightTimerEnabled then
|
||||||
|
self.timerFrame:Show()
|
||||||
|
self:Start()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:Reset()
|
||||||
|
self.timerFrame:Hide()
|
||||||
|
self.timerFrame:SetScript("OnUpdate", nil)
|
||||||
|
self.timerFrame.font:SetTextColor(1, 0.8, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:CreateTimerFrame()
|
||||||
|
self.timerFrame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY)
|
||||||
|
|
||||||
|
local backdrop = {
|
||||||
|
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
|
||||||
|
edgeFile = "",
|
||||||
|
tile = true, tileSize = 16, edgeSize = 10,
|
||||||
|
insets = {left = 0, right = 0, top = 0, bottom = 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.timerFrame:SetBackdrop(backdrop)
|
||||||
|
self.timerFrame:SetBackdropColor(0,0,0,0.8)
|
||||||
|
self.timerFrame:SetHeight(17)
|
||||||
|
self.timerFrame:SetWidth(35)
|
||||||
|
|
||||||
|
self.timerFrame:SetMovable(true)
|
||||||
|
self.timerFrame:EnableMouse(true)
|
||||||
|
|
||||||
|
self.timerFrame.texture = self.timerFrame:CreateTexture(nil,"OVERLAY")
|
||||||
|
self.timerFrame.texture:SetWidth(16)
|
||||||
|
self.timerFrame.texture:SetHeight(16)
|
||||||
|
self.timerFrame.texture:SetTexture("Interface\\Icons\\Spell_Shadow_EvilEye")
|
||||||
|
self.timerFrame.texture:SetTexCoord(0.125,0.875,0.125,0.875)
|
||||||
|
self.timerFrame.texture:SetPoint("RIGHT", self.timerFrame, "LEFT")
|
||||||
|
|
||||||
|
self.timerFrame.font = self.timerFrame:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||||
|
self.timerFrame.font:SetPoint("LEFT", 5, 0)
|
||||||
|
self.timerFrame.font:SetJustifyH("LEFT")
|
||||||
|
self.timerFrame.font:SetTextColor(1, 0.8, 0)
|
||||||
|
|
||||||
|
self.timerFrame:SetScript("OnMouseDown",function(self) self:StartMoving() end)
|
||||||
|
self.timerFrame:SetScript("OnMouseUp",function(self)
|
||||||
|
self:StopMovingOrSizing()
|
||||||
|
Gladdy.db.shadowsightTimerRelPoint1,_,Gladdy.db.shadowsightTimerRelPoint2,Gladdy.db.shadowsightTimerX,Gladdy.db.shadowsightTimerY = self:GetPoint()
|
||||||
|
end)
|
||||||
|
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
||||||
|
self.timerFrame:Hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:UpdateFrame()
|
||||||
|
if Gladdy.db.shadowsightTimerEnabled then
|
||||||
|
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
||||||
|
self.timerFrame:ClearAllPoints()
|
||||||
|
self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY)
|
||||||
|
self.timerFrame:Show()
|
||||||
|
else
|
||||||
|
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
||||||
|
self.timerFrame:ClearAllPoints()
|
||||||
|
self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY)
|
||||||
|
self.timerFrame:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:Start()
|
||||||
|
self.timerFrame.endTime = 92
|
||||||
|
self.timerFrame.timeSinceLastUpdate = 0
|
||||||
|
self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer.OnUpdate(self, elapsed)
|
||||||
|
self.timeSinceLastUpdate = self.timeSinceLastUpdate + elapsed;
|
||||||
|
self.endTime = self.endTime - elapsed
|
||||||
|
|
||||||
|
if (self.timeSinceLastUpdate > 0.1) then
|
||||||
|
self.font:SetFormattedText(floor(self.endTime / 60) .. ":" .. "%02d", self.endTime - floor(self.endTime / 60) * 60)
|
||||||
|
self.timeSinceLastUpdate = 0;
|
||||||
|
if floor(self.endTime) == 15 and Gladdy.db.shadowsightAnnounce then
|
||||||
|
Gladdy:SendMessage("SHADOWSIGHT", L["Shadowsight up in %ds"]:format(15))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self.endTime <= 0 then
|
||||||
|
if Gladdy.db.shadowsightAnnounce then
|
||||||
|
Gladdy:SendMessage("SHADOWSIGHT", L["Shadowsight up!"])
|
||||||
|
end
|
||||||
|
self:SetScript("OnUpdate", nil)
|
||||||
|
self.font:SetText("0:00")
|
||||||
|
self.font:SetTextColor(0, 1, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ShadowsightTimer:GetOptions()
|
||||||
|
return {
|
||||||
|
headerArenaCountdown = {
|
||||||
|
type = "header",
|
||||||
|
name = L["Shadowsight Timer"],
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
shadowsightTimerEnabled = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Enabled"],
|
||||||
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
shadowsightAnnounce = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Announce"],
|
||||||
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
shadowsightTimerScale = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["Scale"],
|
||||||
|
order = 5,
|
||||||
|
min = 0.1,
|
||||||
|
max = 5,
|
||||||
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
end
|
@ -26,7 +26,7 @@ local totemData = {
|
|||||||
[string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Disease Cleansing Totem
|
[string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Disease Cleansing Totem
|
||||||
[string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Healing Stream Totem
|
[string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Healing Stream Totem
|
||||||
[string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, enabled = true, priority = 3}, -- Mana Tide Totem
|
[string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, enabled = true, priority = 3}, -- Mana Tide Totem
|
||||||
[string_lower("Mana Spring Totem")] = {id = 5675,texture = "Interface\\AddOns\\Gladdy\\Images\\Totems\\Spell_Nature_ManaRegenTotem_edit", color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Mana Spring Totem
|
[string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Mana Spring Totem
|
||||||
-- Earth
|
-- Earth
|
||||||
[string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, enabled = true, priority = 1}, -- Earthbind Totem
|
[string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, enabled = true, priority = 1}, -- Earthbind Totem
|
||||||
[string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneclaw Totem
|
[string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneclaw Totem
|
||||||
@ -36,13 +36,13 @@ local totemData = {
|
|||||||
[string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, enabled = true, priority = 3}, -- Tremor Totem
|
[string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, enabled = true, priority = 3}, -- Tremor Totem
|
||||||
-- Air
|
-- Air
|
||||||
[string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}, enabled = true, priority = 3}, -- Grounding Totem
|
[string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}, enabled = true, priority = 3}, -- Grounding Totem
|
||||||
[string_lower("Grace of Air Totem")] = {id = 8835,texture = "Interface\\AddOns\\Gladdy\\Images\\Totems\\Spell_Nature_InvisibilityTotem_edit", color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Grace of Air Totem
|
[string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Grace of Air Totem
|
||||||
[string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Nature Resistance Totem
|
[string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Nature Resistance Totem
|
||||||
[string_lower("Windfury Totem")] = {id = 8512,texture = "Interface\\AddOns\\Gladdy\\Images\\Totems\\Spell_Nature_Windfury_edit", color = {r = 0.96, g = 0, b = 0.07, a = 1}, enabled = true, priority = 2}, -- Windfury Totem
|
[string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}, enabled = true, priority = 2}, -- Windfury Totem
|
||||||
[string_lower("Sentry Totem")] = {id = 6495, texture = "Interface\\AddOns\\Gladdy\\Images\\Totems\\Spell_Nature_RemoveCurse_edit", color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Sentry Totem
|
[string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Sentry Totem
|
||||||
[string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Windwall Totem
|
[string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Windwall Totem
|
||||||
[string_lower("Wrath of Air Totem")] = {id = 3738,texture = "Interface\\AddOns\\Gladdy\\Images\\Totems\\Spell_Nature_SlowingTotem_edit", color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Wrath of Air Totem
|
[string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Wrath of Air Totem
|
||||||
[string_lower("Tranquil Air Totem")] = {id = 25908,texture = "Interface\\Icons\\INV_Staff_07", color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Tranquil Air Totem
|
[string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Tranquil Air Totem
|
||||||
}
|
}
|
||||||
local localizedTotemData = {
|
local localizedTotemData = {
|
||||||
["default"] = {
|
["default"] = {
|
||||||
@ -78,36 +78,11 @@ local localizedTotemData = {
|
|||||||
[string_lower(select(1, GetSpellInfo(25908)))] = totemData[string_lower("Tranquil Air Totem")], -- Tranquil Air Totem
|
[string_lower(select(1, GetSpellInfo(25908)))] = totemData[string_lower("Tranquil Air Totem")], -- Tranquil Air Totem
|
||||||
},
|
},
|
||||||
["frFR"] = {
|
["frFR"] = {
|
||||||
[string_lower("Totem incendiaire")] = totemData[string_lower("Searing Totem")],
|
[string_lower("Totem d'\195\169lementaire de terre")] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem
|
||||||
[string_lower("Totem Langue de feu")] = totemData[string_lower("Flametongue Totem")],
|
[string_lower("Totem d'\195\169lementaire de feu")] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem
|
||||||
[string_lower("Totem de lien terrestre")] = totemData[string_lower("Earthbind Totem")],
|
},
|
||||||
[string_lower("Totem de Griffes de pierre")] = totemData[string_lower("Stoneclaw Totem")],
|
["ruRU"] = {
|
||||||
[string_lower("Totem Nova de feu")] = totemData[string_lower("Fire Nova Totem")],
|
[string_lower("")] = totemData[string_lower("Sentry Totem")], -- Sentry Totem
|
||||||
[string_lower("Totem de Magma")] = totemData[string_lower("Magma Totem")],
|
|
||||||
[string_lower("Totem de courroux")] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[string_lower("Totem d'\195\169lementaire de feu")] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[string_lower("Totem d'\195\169l\195\169mentaire de feu")] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[string_lower("Totem de Peau de pierre")] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[string_lower("Totem d'\195\169lementaire de terre")] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[string_lower("Totem d'\195\169l\195\169mentaire de terre")] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[string_lower("Totem de Force de la Terre")] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[string_lower("Totem de r\195\169sistance au Givre")] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[string_lower("Totem de r\195\169sistance au Feu")] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[string_lower("Totem de Gl\195\168be")] = totemData[string_lower("Grounding Totem")],
|
|
||||||
[string_lower("Totem de Gr\195\162ce a\195\169rienne")] = totemData[string_lower("Grace of Air Totem")],
|
|
||||||
[string_lower("Totem de R\195\169sistance \195\160 la Nature")] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[string_lower("Totem Furie-des-vents")] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[string_lower("Totem Sentinelle")] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[string_lower("Totem de Mur des vents")] = totemData[string_lower("Windwall Totem")],
|
|
||||||
[string_lower("Totem de courroux de l'air")] = totemData[string_lower("Wrath of Air Totem")],
|
|
||||||
[string_lower("Totem de S\195\169isme")] = totemData[string_lower("Tremor Totem")],
|
|
||||||
[string_lower("Totem gu\195\169risseur")] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[string_lower("Totem de Purification du poison")] = totemData[string_lower("Poison Cleansing Totem")],
|
|
||||||
[string_lower("Totem Fontaine de mana")] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[string_lower("Totem de Purification des maladies")] = totemData[string_lower("Disease Cleansing Totem")],
|
|
||||||
[string_lower("Totem de purification")] = totemData[string_lower("Disease Cleansing Totem")],
|
|
||||||
[string_lower("Totem de Vague de mana")] = totemData[string_lower("Mana Tide Totem")],
|
|
||||||
[string_lower("Totem de Tranquillit\195\169 de l'air")] = totemData[string_lower("Tranquil Air Totem")],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +97,7 @@ local function GetTotemColorDefaultOptions()
|
|||||||
return a.name < b.name
|
return a.name < b.name
|
||||||
end)
|
end)
|
||||||
for i=1,#indexedList do
|
for i=1,#indexedList do
|
||||||
defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6}
|
defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""}
|
||||||
options["totem" .. indexedList[i].id] = {
|
options["totem" .. indexedList[i].id] = {
|
||||||
order = i+1,
|
order = i+1,
|
||||||
name = select(1, GetSpellInfo(indexedList[i].id)),
|
name = select(1, GetSpellInfo(indexedList[i].id)),
|
||||||
@ -138,7 +113,7 @@ local function GetTotemColorDefaultOptions()
|
|||||||
},
|
},
|
||||||
enabled = {
|
enabled = {
|
||||||
order = 2,
|
order = 2,
|
||||||
name = "Enabled",
|
name = L["Enabled"],
|
||||||
desc = "Enable " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))),
|
desc = "Enable " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))),
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
width = "full",
|
width = "full",
|
||||||
@ -188,12 +163,12 @@ local function GetTotemColorDefaultOptions()
|
|||||||
end
|
end
|
||||||
},
|
},
|
||||||
customText = {
|
customText = {
|
||||||
type = "input",
|
type = "input",
|
||||||
name = L["Custom totem name"],
|
name = L["Custom totem name"],
|
||||||
order = 5,
|
order = 5,
|
||||||
width = "full",
|
width = "full",
|
||||||
get = function(info) return Gladdy.dbi.profile.npTotemColors["totem" .. indexedList[i].id].customText end,
|
get = function(info) return Gladdy.db.npTotemColors["totem" .. indexedList[i].id].customText end,
|
||||||
set = function(info, value) Gladdy.dbi.profile.npTotemColors["totem" .. indexedList[i].id].customText = value Gladdy:UpdateFrame() end
|
set = function(info, value) Gladdy.db.npTotemColors["totem" .. indexedList[i].id].customText = value Gladdy:UpdateFrame() end
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +195,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
local TotemPlates = Gladdy:NewModule("TotemPlates", nil, {
|
local TotemPlates = Gladdy:NewModule("Totem Plates", nil, {
|
||||||
npTotems = true,
|
npTotems = true,
|
||||||
npTotemsShowFriendly = true,
|
npTotemsShowFriendly = true,
|
||||||
npTotemsShowEnemy = true,
|
npTotemsShowEnemy = true,
|
||||||
@ -253,6 +228,34 @@ function TotemPlates:Initialize()
|
|||||||
self:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
self:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED")
|
||||||
self:SetScript("OnEvent", TotemPlates.OnEvent)
|
self:SetScript("OnEvent", TotemPlates.OnEvent)
|
||||||
|
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then
|
||||||
|
--GetCVar("nameplateShowEnemyTotems")
|
||||||
|
--SetCVar("nameplateShowEnemyTotems", true);
|
||||||
|
end
|
||||||
|
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then
|
||||||
|
--GetCVar("nameplateShowFriendlyTotems")
|
||||||
|
--SetCVar("nameplateShowFriendlyTotems", true);
|
||||||
|
end
|
||||||
|
self.addon = "Blizzard"
|
||||||
|
if (IsAddOnLoaded("Plater")) then
|
||||||
|
self.addon = "Plater"
|
||||||
|
elseif (IsAddOnLoaded("Kui_Nameplates")) then
|
||||||
|
self.addon = "Kui_Nameplates"
|
||||||
|
elseif (IsAddOnLoaded("NeatPlates")) then
|
||||||
|
self.addon = "NeatPlates"
|
||||||
|
elseif (IsAddOnLoaded("TidyPlates_ThreatPlates")) then
|
||||||
|
self.addon = "TidyPlates_ThreatPlates"
|
||||||
|
elseif (IsAddOnLoaded("Tukui")) then
|
||||||
|
local _, C, _ = Tukui:unpack()
|
||||||
|
if C.NamePlates.Enable then
|
||||||
|
self.addon = "Tukui"
|
||||||
|
end
|
||||||
|
elseif (IsAddOnLoaded("ElvUI")) then
|
||||||
|
local E = unpack(ElvUI)
|
||||||
|
if E.private.nameplates.enable then
|
||||||
|
self.addon = "ElvUI"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TotemPlates:PLAYER_ENTERING_WORLD()
|
function TotemPlates:PLAYER_ENTERING_WORLD()
|
||||||
@ -279,8 +282,7 @@ function TotemPlates:UpdateFrameOnce()
|
|||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
||||||
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16)
|
self:ToggleAddon(nameplate)
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16)
|
|
||||||
end
|
end
|
||||||
for i,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
for i,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
||||||
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
||||||
@ -293,6 +295,44 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
|
-- TotemPlates Frame
|
||||||
|
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
function TotemPlates:CreateTotemFrame(nameplate)
|
||||||
|
nameplate.gladdyTotemFrame = CreateFrame("Frame")
|
||||||
|
nameplate.gladdyTotemFrame:SetIgnoreParentAlpha(true)
|
||||||
|
nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
||||||
|
nameplate.gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
||||||
|
nameplate.gladdyTotemFrame.totemIcon = nameplate.gladdyTotemFrame:CreateTexture(nil, "BACKGROUND")
|
||||||
|
nameplate.gladdyTotemFrame.totemIcon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
nameplate.gladdyTotemFrame.totemIcon:ClearAllPoints()
|
||||||
|
nameplate.gladdyTotemFrame.totemIcon:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT")
|
||||||
|
nameplate.gladdyTotemFrame.totemIcon:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
||||||
|
nameplate.gladdyTotemFrame.totemBorder = nameplate.gladdyTotemFrame:CreateTexture(nil, "BORDER")
|
||||||
|
nameplate.gladdyTotemFrame.totemBorder:ClearAllPoints()
|
||||||
|
nameplate.gladdyTotemFrame.totemBorder:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT")
|
||||||
|
nameplate.gladdyTotemFrame.totemBorder:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
||||||
|
nameplate.gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
||||||
|
nameplate.gladdyTotemFrame.totemName = nameplate.gladdyTotemFrame:CreateFontString(nil, "OVERLAY")
|
||||||
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
|
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight = nameplate.gladdyTotemFrame:CreateTexture(nil, "OVERLAY")
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetTexture("Interface/TargetingFrame/UI-TargetingFrame-BarFill")
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetAlpha(0)
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetBlendMode("ADD")
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetIgnoreParentAlpha(true)
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16)
|
||||||
|
nameplate.gladdyTotemFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16)
|
||||||
|
nameplate.gladdyTotemFrame:SetScript('OnUpdate', TotemPlates.OnUpdate)
|
||||||
|
nameplate.gladdyTotemFrame:SetScript("OnHide", function(self)
|
||||||
|
self.parent = nil
|
||||||
|
self:SetParent(nil)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
-- Nameplate functions
|
-- Nameplate functions
|
||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
@ -303,6 +343,36 @@ function TotemPlates:PLAYER_TARGET_CHANGED()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TotemPlates:ToggleAddon(nameplate)
|
||||||
|
if self.addon == "Blizzard" then
|
||||||
|
nameplate.UnitFrame:Hide()
|
||||||
|
elseif self.addon == "Plater" then
|
||||||
|
nameplate.unitFrame:Hide()
|
||||||
|
elseif self.addon == "Kui_Nameplates" then
|
||||||
|
nameplate.kui:Hide()
|
||||||
|
elseif self.addon == "NeatPlates" then
|
||||||
|
nameplate.extended:Hide()
|
||||||
|
nameplate.carrier:Hide()
|
||||||
|
elseif self.addon == "TidyPlates_ThreatPlates" then
|
||||||
|
nameplate.TPFrame:Hide()
|
||||||
|
elseif self.addon == "Tukui" or self.addon == "ElvUI" then
|
||||||
|
if nameplate.unitFrame then
|
||||||
|
nameplate.unitFrame:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function TotemPlates.OnUpdate(self)
|
||||||
|
if (UnitIsUnit("mouseover", self.unitID) or UnitIsUnit("target", self.unitID)) then
|
||||||
|
self.selectionHighlight:SetAlpha(.25)
|
||||||
|
else
|
||||||
|
self.selectionHighlight:SetAlpha(0)
|
||||||
|
end
|
||||||
|
if (TotemPlates.addon == "Tukui" or TotemPlates.addon == "ElvUI") and self.parent and self.parent.unitFrame then
|
||||||
|
self.parent.unitFrame:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
||||||
local unitID = ...
|
local unitID = ...
|
||||||
local isEnemy = UnitIsEnemy("player", unitID)
|
local isEnemy = UnitIsEnemy("player", unitID)
|
||||||
@ -318,29 +388,14 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
|||||||
totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank
|
totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank
|
||||||
totemName = string_lower(totemName)
|
totemName = string_lower(totemName)
|
||||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
||||||
local totemDataEntry = localizedTotemData["default"][totemName]
|
local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName]
|
||||||
if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates
|
if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates
|
||||||
|
|
||||||
if #self.totemPlateCache > 0 then
|
if #self.totemPlateCache > 0 then
|
||||||
nameplate.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache)
|
nameplate.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache)
|
||||||
else
|
else
|
||||||
nameplate.gladdyTotemFrame = CreateFrame("Frame", nil)
|
self:CreateTotemFrame(nameplate)
|
||||||
nameplate.gladdyTotemFrame:SetIgnoreParentAlpha(true)
|
|
||||||
nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
|
||||||
nameplate.gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
|
||||||
nameplate.gladdyTotemFrame.totemIcon = nameplate.gladdyTotemFrame:CreateTexture(nil, "BACKGROUND")
|
|
||||||
nameplate.gladdyTotemFrame.totemIcon:ClearAllPoints()
|
|
||||||
nameplate.gladdyTotemFrame.totemIcon:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT")
|
|
||||||
nameplate.gladdyTotemFrame.totemIcon:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
|
||||||
nameplate.gladdyTotemFrame.totemBorder = nameplate.gladdyTotemFrame:CreateTexture(nil, "BORDER")
|
|
||||||
nameplate.gladdyTotemFrame.totemBorder:ClearAllPoints()
|
|
||||||
nameplate.gladdyTotemFrame.totemBorder:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT")
|
|
||||||
nameplate.gladdyTotemFrame.totemBorder:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT")
|
|
||||||
nameplate.gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
|
||||||
nameplate.gladdyTotemFrame.totemName = nameplate.gladdyTotemFrame:CreateFontString(nil, "OVERLAY")
|
|
||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
|
||||||
nameplate.gladdyTotemFrame.totemName:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", Gladdy.db.npTremorFontXOffset, Gladdy.db.npTremorFontYOffset)
|
|
||||||
end
|
end
|
||||||
|
nameplate.gladdyTotemFrame.unitID = unitID
|
||||||
nameplate.gladdyTotemFrame.totemDataEntry = totemDataEntry
|
nameplate.gladdyTotemFrame.totemDataEntry = totemDataEntry
|
||||||
nameplate.gladdyTotemFrame.parent = nameplate
|
nameplate.gladdyTotemFrame.parent = nameplate
|
||||||
nameplate.gladdyTotemFrame:SetParent(nameplate)
|
nameplate.gladdyTotemFrame:SetParent(nameplate)
|
||||||
@ -352,21 +407,10 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
|||||||
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b,
|
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b,
|
||||||
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a)
|
Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a)
|
||||||
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
||||||
|
nameplate.gladdyTotemFrame.parent = nameplate
|
||||||
nameplate.gladdyTotemFrame:Show()
|
nameplate.gladdyTotemFrame:Show()
|
||||||
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
||||||
|
self:ToggleAddon(nameplate)
|
||||||
nameplate.UnitFrame:SetAlpha(0)
|
|
||||||
nameplate.UnitFrame.point = select(2, nameplate.UnitFrame.selectionHighlight:GetPoint())
|
|
||||||
nameplate.UnitFrame.selectionHighlight:ClearAllPoints()
|
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("TOPLEFT", nameplate.gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16)
|
|
||||||
nameplate.UnitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", nameplate.gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16)
|
|
||||||
nameplate.UnitFrame:SetScript("OnHide", function(unitFrame)
|
|
||||||
unitFrame:SetAlpha(1)
|
|
||||||
unitFrame.selectionHighlight:ClearAllPoints()
|
|
||||||
unitFrame.selectionHighlight:SetPoint("TOPLEFT", unitFrame.point, "TOPLEFT")
|
|
||||||
unitFrame.selectionHighlight:SetPoint("BOTTOMRIGHT", unitFrame.point, "BOTTOMRIGHT")
|
|
||||||
unitFrame:SetScript("OnHide", nil)
|
|
||||||
end)
|
|
||||||
self.activeTotemNameplates[unitID] = nameplate
|
self.activeTotemNameplates[unitID] = nameplate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -415,12 +459,12 @@ function TotemPlates:GetOptions()
|
|||||||
return {
|
return {
|
||||||
headerTotems = {
|
headerTotems = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Totem General"],
|
name = L["Totem Plates"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
npTotems = Gladdy:option({
|
npTotems = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Totem icons on/off"],
|
name = L["Enabled"],
|
||||||
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
||||||
order = 3,
|
order = 3,
|
||||||
width = 0.9,
|
width = 0.9,
|
||||||
@ -442,7 +486,7 @@ function TotemPlates:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
icon = {
|
icon = {
|
||||||
@ -463,6 +507,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = 20,
|
min = 20,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
npTotemPlatesWidthFactor = Gladdy:option({
|
npTotemPlatesWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -472,6 +517,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = 0.5,
|
min = 0.5,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -482,7 +528,7 @@ function TotemPlates:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Icon"],
|
name = L["Font"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
npTremorFont = Gladdy:option({
|
npTremorFont = Gladdy:option({
|
||||||
@ -501,6 +547,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = 1,
|
min = 1,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
npTremorFontXOffset = Gladdy:option({
|
npTremorFontXOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -510,6 +557,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = -300,
|
min = -300,
|
||||||
max = 300,
|
max = 300,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
npTremorFontYOffset = Gladdy:option({
|
npTremorFontYOffset = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -519,6 +567,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = -300,
|
min = -300,
|
||||||
max = 300,
|
max = 300,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -552,7 +601,7 @@ function TotemPlates:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
width = "double",
|
width = "full",
|
||||||
order = 23,
|
order = 23,
|
||||||
get = function(info)
|
get = function(info)
|
||||||
local alphas = GetTotemOptions()
|
local alphas = GetTotemOptions()
|
||||||
@ -621,7 +670,7 @@ function TotemPlates:GetOptions()
|
|||||||
},
|
},
|
||||||
npTotemColors = {
|
npTotemColors = {
|
||||||
order = 50,
|
order = 50,
|
||||||
name = "Customize Totems",
|
name = L["Customize Totems"],
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = select(2, Gladdy:GetTotemColors())
|
args = select(2, Gladdy:GetTotemColors())
|
||||||
|
@ -56,12 +56,12 @@ local function iconTimer(self, elapsed)
|
|||||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
elseif timeLeft <= 10 and timeLeft >= 5 then
|
||||||
-- between 10s and 5s (orange)
|
-- between 10s and 5s (orange)
|
||||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft)
|
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft)
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
elseif timeLeft < 5 and timeLeft > 0 then
|
||||||
-- between 5s and 1s (red)
|
-- between 5s and 1s (red)
|
||||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft >= 0.0 and timeLeft or 0.0)
|
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
else
|
else
|
||||||
self.cooldownFont:SetText("")
|
self.cooldownFont:SetText("")
|
||||||
@ -71,9 +71,11 @@ end
|
|||||||
|
|
||||||
function Trinket:CreateFrame(unit)
|
function Trinket:CreateFrame(unit)
|
||||||
local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||||
|
trinket:EnableMouse(false)
|
||||||
trinket.texture = trinket:CreateTexture(nil, "BACKGROUND")
|
trinket.texture = trinket:CreateTexture(nil, "BACKGROUND")
|
||||||
trinket.texture:SetAllPoints(trinket)
|
trinket.texture:SetAllPoints(trinket)
|
||||||
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||||
|
trinket.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||||
|
|
||||||
trinket.cooldown = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate")
|
trinket.cooldown = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate")
|
||||||
trinket.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC
|
trinket.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC
|
||||||
@ -128,7 +130,7 @@ function Trinket:UpdateFrame(unit)
|
|||||||
trinket.texture.overlay:SetVertexColor(Gladdy.db.trinketBorderColor.r, Gladdy.db.trinketBorderColor.g, Gladdy.db.trinketBorderColor.b, Gladdy.db.trinketBorderColor.a)
|
trinket.texture.overlay:SetVertexColor(Gladdy.db.trinketBorderColor.r, Gladdy.db.trinketBorderColor.g, Gladdy.db.trinketBorderColor.b, Gladdy.db.trinketBorderColor.a)
|
||||||
|
|
||||||
trinket:ClearAllPoints()
|
trinket:ClearAllPoints()
|
||||||
local margin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding
|
||||||
if (Gladdy.db.classIconPos == "LEFT") then
|
if (Gladdy.db.classIconPos == "LEFT") then
|
||||||
if (Gladdy.db.trinketPos == "RIGHT") then
|
if (Gladdy.db.trinketPos == "RIGHT") then
|
||||||
trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", margin, 0)
|
trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", margin, 0)
|
||||||
@ -227,7 +229,7 @@ function Trinket:GetOptions()
|
|||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = "Frame",
|
name = L["Frame"],
|
||||||
order = 4,
|
order = 4,
|
||||||
args = {
|
args = {
|
||||||
general = {
|
general = {
|
||||||
@ -238,15 +240,16 @@ function Trinket:GetOptions()
|
|||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Size"],
|
name = L["Size"],
|
||||||
order = 4,
|
order = 1,
|
||||||
},
|
},
|
||||||
trinketSize = Gladdy:option({
|
trinketSize = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Trinket size"],
|
name = L["Size"],
|
||||||
min = 5,
|
min = 5,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 4,
|
order = 4,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
trinketWidthFactor = Gladdy:option({
|
trinketWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -255,6 +258,7 @@ function Trinket:GetOptions()
|
|||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 6,
|
order = 6,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -272,6 +276,7 @@ function Trinket:GetOptions()
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["No Cooldown Circle"],
|
name = L["No Cooldown Circle"],
|
||||||
order = 7,
|
order = 7,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
trinketCooldownAlpha = Gladdy:option({
|
trinketCooldownAlpha = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -280,6 +285,7 @@ function Trinket:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -309,6 +315,7 @@ function Trinket:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -319,12 +326,12 @@ function Trinket:GetOptions()
|
|||||||
args = {
|
args = {
|
||||||
header = {
|
header = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Position"],
|
name = L["Icon position"],
|
||||||
order = 4,
|
order = 4,
|
||||||
},
|
},
|
||||||
trinketPos = Gladdy:option({
|
trinketPos = Gladdy:option({
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Trinket position"],
|
name = L["Icon position"],
|
||||||
desc = L["This changes positions of the trinket"],
|
desc = L["This changes positions of the trinket"],
|
||||||
order = 21,
|
order = 21,
|
||||||
values = {
|
values = {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
local str_match, tonumber, tostring = string.match, tonumber, tostring
|
local str_match, tonumber, tostring = string.match, tonumber, tostring
|
||||||
|
|
||||||
local UnitName = UnitName
|
local UnitName = UnitName
|
||||||
|
local IsInGroup, IsInRaid = IsInGroup, IsInRaid
|
||||||
|
local LE_PARTY_CATEGORY_HOME, LE_PARTY_CATEGORY_INSTANCE = LE_PARTY_CATEGORY_HOME, LE_PARTY_CATEGORY_INSTANCE
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
@ -21,6 +23,13 @@ end
|
|||||||
|
|
||||||
function VersionCheck:JOINED_ARENA()
|
function VersionCheck:JOINED_ARENA()
|
||||||
self:RegisterComm("GladdyVCheck", VersionCheck.OnCommReceived)
|
self:RegisterComm("GladdyVCheck", VersionCheck.OnCommReceived)
|
||||||
|
if IsInRaid(LE_PARTY_CATEGORY_HOME) then
|
||||||
|
self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", self.playerName)
|
||||||
|
elseif IsInGroup(LE_PARTY_CATEGORY_INSTANCE) or IsInRaid(LE_PARTY_CATEGORY_INSTANCE) then
|
||||||
|
self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "INSTANCE_CHAT", self.playerName)
|
||||||
|
elseif IsInGroup(LE_PARTY_CATEGORY_HOME) then
|
||||||
|
self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "PARTY", self.playerName)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function VersionCheck:Test(unit)
|
function VersionCheck:Test(unit)
|
||||||
@ -39,7 +48,7 @@ function VersionCheck.OnCommReceived(prefix, message, distribution, sender)
|
|||||||
else
|
else
|
||||||
Gladdy:Warn("Current version", "\"".. addonVersion.."\"", "is outdated. Most recent version is", "\"".. message.."\"")
|
Gladdy:Warn("Current version", "\"".. addonVersion.."\"", "is outdated. Most recent version is", "\"".. message.."\"")
|
||||||
Gladdy:Warn("Please download the latest Gladdy version at:")
|
Gladdy:Warn("Please download the latest Gladdy version at:")
|
||||||
Gladdy:Warn("https://github.com/XiconQoo/Gladdy-TBC")
|
Gladdy:Warn("https://www.curseforge.com/wow/addons/gladdy-tbc or https://github.com/XiconQoo/Gladdy-TBC")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,9 +5,9 @@ local XiconProfiles = Gladdy:NewModule("XiconProfiles", nil, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function XiconProfiles:ApplyKlimp()
|
function XiconProfiles:ApplyKlimp()
|
||||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKlimpProfile())
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKlimpProfile())
|
||||||
if deserialized then
|
if deserialized then
|
||||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
end
|
end
|
||||||
Gladdy:Reset()
|
Gladdy:Reset()
|
||||||
Gladdy:HideFrame()
|
Gladdy:HideFrame()
|
||||||
@ -15,9 +15,9 @@ function XiconProfiles:ApplyKlimp()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function XiconProfiles:ApplyKnall()
|
function XiconProfiles:ApplyKnall()
|
||||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKnallProfile())
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKnallProfile())
|
||||||
if deserialized then
|
if deserialized then
|
||||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
end
|
end
|
||||||
Gladdy:Reset()
|
Gladdy:Reset()
|
||||||
Gladdy:HideFrame()
|
Gladdy:HideFrame()
|
||||||
@ -25,9 +25,29 @@ function XiconProfiles:ApplyKnall()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function XiconProfiles:ApplyClassic()
|
function XiconProfiles:ApplyClassic()
|
||||||
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetClassicProfile())
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfile())
|
||||||
if deserialized then
|
if deserialized then
|
||||||
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
|
end
|
||||||
|
Gladdy:Reset()
|
||||||
|
Gladdy:HideFrame()
|
||||||
|
Gladdy:ToggleFrame(3)
|
||||||
|
end
|
||||||
|
|
||||||
|
function XiconProfiles:ApplyClassicNoPet()
|
||||||
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfileNoPet())
|
||||||
|
if deserialized then
|
||||||
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
|
end
|
||||||
|
Gladdy:Reset()
|
||||||
|
Gladdy:HideFrame()
|
||||||
|
Gladdy:ToggleFrame(3)
|
||||||
|
end
|
||||||
|
|
||||||
|
function XiconProfiles:ApplyBlizz()
|
||||||
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetBlizzardProfile())
|
||||||
|
if deserialized then
|
||||||
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
end
|
end
|
||||||
Gladdy:Reset()
|
Gladdy:Reset()
|
||||||
Gladdy:HideFrame()
|
Gladdy:HideFrame()
|
||||||
@ -36,10 +56,29 @@ end
|
|||||||
|
|
||||||
function XiconProfiles:GetOptions()
|
function XiconProfiles:GetOptions()
|
||||||
return {
|
return {
|
||||||
|
headerProfileBlizzard = {
|
||||||
|
type = "header",
|
||||||
|
name = "Blizzard " .. L["Profile"],
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
blizzardProfile = {
|
||||||
|
type = "execute",
|
||||||
|
func = function()
|
||||||
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
||||||
|
XiconProfiles:ApplyBlizz()
|
||||||
|
end,
|
||||||
|
name = " ",
|
||||||
|
desc = "Blizzard " .. L["Profile"],
|
||||||
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Blizz1.blp",
|
||||||
|
imageWidth = 350,
|
||||||
|
imageHeight = 175,
|
||||||
|
width = "full",
|
||||||
|
order = 3,
|
||||||
|
},
|
||||||
headerProfileClassic = {
|
headerProfileClassic = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Classic Profile"],
|
name = "Classic " .. L["Profile"],
|
||||||
order = 2,
|
order = 4,
|
||||||
},
|
},
|
||||||
classicProfile = {
|
classicProfile = {
|
||||||
type = "execute",
|
type = "execute",
|
||||||
@ -48,17 +87,36 @@ function XiconProfiles:GetOptions()
|
|||||||
XiconProfiles:ApplyClassic()
|
XiconProfiles:ApplyClassic()
|
||||||
end,
|
end,
|
||||||
name = " ",
|
name = " ",
|
||||||
desc = "Classic Profile",
|
desc = "Classic " .. L["Profile"],
|
||||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Classic1.blp",
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Classic1.blp",
|
||||||
imageWidth = 256,
|
imageWidth = 350,
|
||||||
imageHeight = 128,
|
imageHeight = 175,
|
||||||
width = "full",
|
width = "full",
|
||||||
order = 3,
|
order = 5,
|
||||||
|
},
|
||||||
|
headerProfileClassicNoPet = {
|
||||||
|
type = "header",
|
||||||
|
name = "Classic " .. L["Profile"] .. " No Pet",
|
||||||
|
order = 6,
|
||||||
|
},
|
||||||
|
classicProfileNoPet = {
|
||||||
|
type = "execute",
|
||||||
|
func = function()
|
||||||
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
||||||
|
XiconProfiles:ApplyClassicNoPet()
|
||||||
|
end,
|
||||||
|
name = " ",
|
||||||
|
desc = "Classic " .. L["Profile"] .. " No Pet",
|
||||||
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Classic2.blp",
|
||||||
|
imageWidth = 350,
|
||||||
|
imageHeight = 175,
|
||||||
|
width = "full",
|
||||||
|
order = 7,
|
||||||
},
|
},
|
||||||
headerProfileKnall = {
|
headerProfileKnall = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Knall's Profile"],
|
name = "Knall's " .. L["Profile"],
|
||||||
order = 4,
|
order = 8,
|
||||||
},
|
},
|
||||||
knallProfile = {
|
knallProfile = {
|
||||||
type = "execute",
|
type = "execute",
|
||||||
@ -67,17 +125,17 @@ function XiconProfiles:GetOptions()
|
|||||||
XiconProfiles:ApplyKnall()
|
XiconProfiles:ApplyKnall()
|
||||||
end,
|
end,
|
||||||
name = " ",
|
name = " ",
|
||||||
desc = "Knall's Profile",
|
desc = "Knall's " .. L["Profile"],
|
||||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Knall1.blp",
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Knall1.blp",
|
||||||
imageWidth = 256,
|
imageWidth = 350,
|
||||||
imageHeight = 128,
|
imageHeight = 175,
|
||||||
width = "full",
|
width = "full",
|
||||||
order = 5,
|
order = 9,
|
||||||
},
|
},
|
||||||
headerProfileKlimp = {
|
headerProfileKlimp = {
|
||||||
type = "header",
|
type = "header",
|
||||||
name = L["Klimp's Profile"],
|
name = "Klimp's " .. L["Profile"],
|
||||||
order = 6,
|
order = 10,
|
||||||
},
|
},
|
||||||
klimpProfiles = {
|
klimpProfiles = {
|
||||||
type = "execute",
|
type = "execute",
|
||||||
@ -86,12 +144,13 @@ function XiconProfiles:GetOptions()
|
|||||||
XiconProfiles:ApplyKlimp()
|
XiconProfiles:ApplyKlimp()
|
||||||
end,
|
end,
|
||||||
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Klimp1.blp",
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Klimp1.blp",
|
||||||
imageWidth = 256,
|
imageWidth = 350,
|
||||||
imageHeight = 128,
|
imageHeight = 175,
|
||||||
name = " ",
|
name = " ",
|
||||||
desc = "Klimp's Profile",
|
desc = "Klimp's " .. L["Profile"],
|
||||||
width = "full",
|
width = "full",
|
||||||
order = 7,
|
order = 11,
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
end
|
end
|
250
Options.lua
250
Options.lua
@ -1,9 +1,10 @@
|
|||||||
local type, pairs, tinsert, tsort, tostring = type, pairs, table.insert, table.sort, tostring
|
local type, pairs, tinsert, tsort, tostring, str_match, tonumber = type, pairs, table.insert, table.sort, tostring, string.match, tonumber
|
||||||
|
|
||||||
local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
||||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||||
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||||
@ -12,28 +13,28 @@ local L = Gladdy.L
|
|||||||
Gladdy.defaults = {
|
Gladdy.defaults = {
|
||||||
profile = {
|
profile = {
|
||||||
locked = false,
|
locked = false,
|
||||||
|
hideBlizzard = "arena",
|
||||||
x = 0,
|
x = 0,
|
||||||
y = 0,
|
y = 0,
|
||||||
growUp = false,
|
growUp = false,
|
||||||
|
growDirection = "BOTTOM",
|
||||||
frameScale = 1,
|
frameScale = 1,
|
||||||
padding = 3,
|
padding = 1,
|
||||||
barWidth = 180,
|
barWidth = 180,
|
||||||
bottomMargin = 10,
|
bottomMargin = 2,
|
||||||
statusbarBorderOffset = 7,
|
statusbarBorderOffset = 6,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
SLASH_GLADDY1 = "/gladdy"
|
SLASH_GLADDY1 = "/gladdy"
|
||||||
SlashCmdList["GLADDY"] = function(msg)
|
SlashCmdList["GLADDY"] = function(msg)
|
||||||
if (msg == "test2") then
|
if (str_match(msg, "test[1-5]")) then
|
||||||
Gladdy:ToggleFrame(2)
|
local _, num = str_match(msg, "(test)([1-5])")
|
||||||
elseif (msg == "test5") then
|
Gladdy:ToggleFrame(tonumber(num))
|
||||||
Gladdy:ToggleFrame(5)
|
elseif (msg == "test") then
|
||||||
elseif (msg:find("test")) then
|
|
||||||
Gladdy:ToggleFrame(3)
|
Gladdy:ToggleFrame(3)
|
||||||
elseif (msg == "ui" or msg == "options" or msg == "config") then
|
elseif (msg == "ui" or msg == "options" or msg == "config") then
|
||||||
LibStub("AceConfigDialog-3.0"):Open("Gladdy")
|
LibStub("AceConfigDialog-3.0"):Open("Gladdy")
|
||||||
--Gladdy:ShowOptions()
|
|
||||||
elseif (msg == "reset") then
|
elseif (msg == "reset") then
|
||||||
Gladdy.dbi:ResetProfile()
|
Gladdy.dbi:ResetProfile()
|
||||||
elseif (msg == "hide") then
|
elseif (msg == "hide") then
|
||||||
@ -42,7 +43,8 @@ SlashCmdList["GLADDY"] = function(msg)
|
|||||||
else
|
else
|
||||||
Gladdy:Print(L["Valid slash commands are:"])
|
Gladdy:Print(L["Valid slash commands are:"])
|
||||||
Gladdy:Print("/gladdy ui")
|
Gladdy:Print("/gladdy ui")
|
||||||
Gladdy:Print("/gladdy test2-5")
|
Gladdy:Print("/gladdy test")
|
||||||
|
Gladdy:Print("/gladdy test1-5")
|
||||||
Gladdy:Print("/gladdy hide")
|
Gladdy:Print("/gladdy hide")
|
||||||
Gladdy:Print("/gladdy reset")
|
Gladdy:Print("/gladdy reset")
|
||||||
end
|
end
|
||||||
@ -96,6 +98,11 @@ local function setOpt(info, value)
|
|||||||
local key = info.arg or info[#info]
|
local key = info.arg or info[#info]
|
||||||
Gladdy.dbi.profile[key] = value
|
Gladdy.dbi.profile[key] = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
|
if Gladdy.db.hideBlizzard == "always" then
|
||||||
|
SetCVar("showArenaEnemyFrames", 0)
|
||||||
|
elseif Gladdy.db.hideBlizzard == "never" then
|
||||||
|
SetCVar("showArenaEnemyFrames", 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local function getColorOpt(info)
|
local function getColorOpt(info)
|
||||||
local key = info.arg or info[#info]
|
local key = info.arg or info[#info]
|
||||||
@ -113,7 +120,7 @@ function Gladdy:SetupModule(name, module, order)
|
|||||||
self.options.args[name] = {
|
self.options.args[name] = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = L[name],
|
name = L[name],
|
||||||
desc = L[name .. " settings"],
|
desc = L[name] .. " " .. L["settings"],
|
||||||
childGroups = "tab",
|
childGroups = "tab",
|
||||||
order = order,
|
order = order,
|
||||||
args = {},
|
args = {},
|
||||||
@ -151,7 +158,7 @@ local function pairsByKeys(t)
|
|||||||
for k in pairs(t) do
|
for k in pairs(t) do
|
||||||
tinsert(a, k)
|
tinsert(a, k)
|
||||||
end
|
end
|
||||||
tsort(a)
|
tsort(a, function(a, b) return L[a] < L[b] end)
|
||||||
|
|
||||||
local i = 0
|
local i = 0
|
||||||
return function()
|
return function()
|
||||||
@ -193,10 +200,31 @@ function Gladdy:SetupOptions()
|
|||||||
desc = L["If enabled the frame will grow upwards instead of downwards"],
|
desc = L["If enabled the frame will grow upwards instead of downwards"],
|
||||||
order = 2,
|
order = 2,
|
||||||
},
|
},
|
||||||
|
growDirection = {
|
||||||
|
type = "select",
|
||||||
|
name = L["Grow Direction"],
|
||||||
|
order = 3,
|
||||||
|
values = {
|
||||||
|
["BOTTOM"] = L["Down"],
|
||||||
|
["TOP"] = L["Up"],
|
||||||
|
["LEFT"] = L["Left"],
|
||||||
|
["RIGHT"] = L["Right"],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideBlizzard = {
|
||||||
|
type = "select",
|
||||||
|
name = L["Hide Blizzard"],
|
||||||
|
values = {
|
||||||
|
["arena"] = L["Arena only"],
|
||||||
|
["never"] = L["Never"],
|
||||||
|
["always"] = L["Always"],
|
||||||
|
},
|
||||||
|
order = 4,
|
||||||
|
},
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
name = "General",
|
name = L["General"],
|
||||||
order = 3,
|
order = 5,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = {
|
args = {
|
||||||
frameGeneral = {
|
frameGeneral = {
|
||||||
@ -238,11 +266,11 @@ function Gladdy:SetupOptions()
|
|||||||
},
|
},
|
||||||
bottomMargin = {
|
bottomMargin = {
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Bottom margin"],
|
name = L["Margin"],
|
||||||
desc = L["Margin between each button"],
|
desc = L["Margin between each button"],
|
||||||
order = 7,
|
order = 7,
|
||||||
min = -100,
|
min = -200,
|
||||||
max = 100,
|
max = 200,
|
||||||
step = 1,
|
step = 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -267,7 +295,8 @@ function Gladdy:SetupOptions()
|
|||||||
local c = Gladdy.db.trinketDisableCircle
|
local c = Gladdy.db.trinketDisableCircle
|
||||||
local d = Gladdy.db.drDisableCircle
|
local d = Gladdy.db.drDisableCircle
|
||||||
local e = Gladdy.db.buffsDisableCircle
|
local e = Gladdy.db.buffsDisableCircle
|
||||||
if (a == b and a == c and a == d and a == e) then
|
local f = Gladdy.db.racialDisableCircle
|
||||||
|
if (a == b and a == c and a == d and a == e and a == f) then
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
@ -279,6 +308,7 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.trinketDisableCircle = value
|
Gladdy.db.trinketDisableCircle = value
|
||||||
Gladdy.db.drDisableCircle = value
|
Gladdy.db.drDisableCircle = value
|
||||||
Gladdy.db.buffsDisableCircle = value
|
Gladdy.db.buffsDisableCircle = value
|
||||||
|
Gladdy.db.racialDisableCircle = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
width= "full",
|
width= "full",
|
||||||
@ -296,7 +326,8 @@ function Gladdy:SetupOptions()
|
|||||||
local c = Gladdy.db.auraCooldownAlpha
|
local c = Gladdy.db.auraCooldownAlpha
|
||||||
local d = Gladdy.db.trinketCooldownAlpha
|
local d = Gladdy.db.trinketCooldownAlpha
|
||||||
local e = Gladdy.db.buffsCooldownAlpha
|
local e = Gladdy.db.buffsCooldownAlpha
|
||||||
if (a == b and a == c and a == d and a == e) then
|
local f = Gladdy.db.racialCooldownAlpha
|
||||||
|
if (a == b and a == c and a == d and a == e and a == f) then
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
@ -308,6 +339,7 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.auraCooldownAlpha = value
|
Gladdy.db.auraCooldownAlpha = value
|
||||||
Gladdy.db.trinketCooldownAlpha = value
|
Gladdy.db.trinketCooldownAlpha = value
|
||||||
Gladdy.db.buffsCooldownAlpha = value
|
Gladdy.db.buffsCooldownAlpha = value
|
||||||
|
Gladdy.db.racialCooldownAlpha = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
@ -331,33 +363,42 @@ function Gladdy:SetupOptions()
|
|||||||
dialogControl = "LSM30_Font",
|
dialogControl = "LSM30_Font",
|
||||||
values = AceGUIWidgetLSMlists.font,
|
values = AceGUIWidgetLSMlists.font,
|
||||||
get = function(info)
|
get = function(info)
|
||||||
local a = Gladdy.db.castBarFont
|
local a = Gladdy.db.auraFont
|
||||||
local b = Gladdy.db.healthBarFont
|
local b = Gladdy.db.buffsFont
|
||||||
local c = Gladdy.db.powerBarFont
|
local c = Gladdy.db.castBarFont
|
||||||
local d = Gladdy.db.cooldownFont
|
local d = Gladdy.db.cooldownFont
|
||||||
local e = Gladdy.db.drFont
|
local e = Gladdy.db.drFont
|
||||||
local f = Gladdy.db.auraFont
|
local f = Gladdy.db.healthBarFont
|
||||||
local g = Gladdy.db.buffsFont
|
local g = Gladdy.db.petHealthBarFont
|
||||||
if (a == b and a == c and a == d and a == e and a == f and a == g) then
|
local h = Gladdy.db.powerBarFont
|
||||||
|
local i = Gladdy.db.racialFont
|
||||||
|
local j = Gladdy.db.npTremorFont
|
||||||
|
local k = Gladdy.db.trinketFont
|
||||||
|
if (a == b and a == c and a == d and a == e and a == f
|
||||||
|
and a == g and a == h and a == i and a == j and a == k) then
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
Gladdy.db.castBarFont = value
|
|
||||||
Gladdy.db.healthBarFont = value
|
|
||||||
Gladdy.db.powerBarFont = value
|
|
||||||
Gladdy.db.cooldownFont = value
|
|
||||||
Gladdy.db.drFont = value
|
|
||||||
Gladdy.db.auraFont = value
|
Gladdy.db.auraFont = value
|
||||||
Gladdy.db.buffsFont = value
|
Gladdy.db.buffsFont = value
|
||||||
|
Gladdy.db.castBarFont = value
|
||||||
|
Gladdy.db.cooldownFont = value
|
||||||
|
Gladdy.db.drFont = value
|
||||||
|
Gladdy.db.healthBarFont = value
|
||||||
|
Gladdy.db.petHealthBarFont = value
|
||||||
|
Gladdy.db.powerBarFont = value
|
||||||
|
Gladdy.db.racialFont = value
|
||||||
|
Gladdy.db.npTremorFont = value
|
||||||
|
Gladdy.db.trinketFont = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
fontColor = {
|
fontColor = {
|
||||||
type = "color",
|
type = "color",
|
||||||
name = L["Font color"],
|
name = L["Font color text"],
|
||||||
desc = L["Color of the text"],
|
desc = L["Color of the text"],
|
||||||
order = 12,
|
order = 12,
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
@ -365,8 +406,10 @@ function Gladdy:SetupOptions()
|
|||||||
local a = Gladdy.db.healthBarFontColor
|
local a = Gladdy.db.healthBarFontColor
|
||||||
local b = Gladdy.db.powerBarFontColor
|
local b = Gladdy.db.powerBarFontColor
|
||||||
local c = Gladdy.db.castBarFontColor
|
local c = Gladdy.db.castBarFontColor
|
||||||
|
local d = Gladdy.db.petHealthBarFontColor
|
||||||
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
||||||
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a) then
|
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a
|
||||||
|
and a.r == d.r and a.g == d.g and a.b == d.b and a.a == d.a) then
|
||||||
return a.r, a.g, a.b, a.a
|
return a.r, a.g, a.b, a.a
|
||||||
else
|
else
|
||||||
return { r = 0, g = 0, b = 0, a = 0 }
|
return { r = 0, g = 0, b = 0, a = 0 }
|
||||||
@ -377,6 +420,35 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.healthBarFontColor = rgb
|
Gladdy.db.healthBarFontColor = rgb
|
||||||
Gladdy.db.powerBarFontColor = rgb
|
Gladdy.db.powerBarFontColor = rgb
|
||||||
Gladdy.db.castBarFontColor = rgb
|
Gladdy.db.castBarFontColor = rgb
|
||||||
|
Gladdy.db.petHealthBarFontColor = rgb
|
||||||
|
Gladdy:UpdateFrame()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
fontColorCD = {
|
||||||
|
type = "color",
|
||||||
|
name = L["Font color timer"],
|
||||||
|
desc = L["Color of the timers"],
|
||||||
|
order = 12,
|
||||||
|
hasAlpha = true,
|
||||||
|
get = function(info)
|
||||||
|
local a = Gladdy.db.auraFontColor
|
||||||
|
local b = Gladdy.db.buffsFontColor
|
||||||
|
local c = Gladdy.db.cooldownFontColor
|
||||||
|
local d = Gladdy.db.drFontColor
|
||||||
|
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
||||||
|
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a
|
||||||
|
and a.r == d.r and a.g == d.g and a.b == d.b and a.a == d.a) then
|
||||||
|
return a.r, a.g, a.b, a.a
|
||||||
|
else
|
||||||
|
return { r = 0, g = 0, b = 0, a = 0 }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
set = function(info, r, g, b, a)
|
||||||
|
local rgb = {r = r, g = g, b = b, a = a}
|
||||||
|
Gladdy.db.auraFontColor = rgb
|
||||||
|
Gladdy.db.buffsFontColor = rgb
|
||||||
|
Gladdy.db.cooldownFontColor = rgb
|
||||||
|
Gladdy.db.drFontColor = rgb
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -399,27 +471,34 @@ function Gladdy:SetupOptions()
|
|||||||
order = 14,
|
order = 14,
|
||||||
values = Gladdy:GetIconStyles(),
|
values = Gladdy:GetIconStyles(),
|
||||||
get = function(info)
|
get = function(info)
|
||||||
if (Gladdy.db.classIconBorderStyle == Gladdy.db.trinketBorderStyle
|
if (Gladdy.db.auraBorderStyle == Gladdy.db.buffsBorderStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.castBarIconStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.castBarIconStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.auraBorderStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.classIconBorderStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.cooldownBorderStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.cooldownBorderStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.buffsBorderStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.ciBorderStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.drBorderStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.cooldownBorderStyle
|
||||||
and Gladdy.db.classIconBorderStyle == Gladdy.db.npTotemPlatesBorderStyle) then
|
and Gladdy.db.auraBorderStyle == Gladdy.db.drBorderStyle
|
||||||
return Gladdy.db.classIconBorderStyle
|
and Gladdy.db.auraBorderStyle == Gladdy.db.racialBorderStyle
|
||||||
|
and Gladdy.db.auraBorderStyle == Gladdy.db.npTotemPlatesBorderStyle
|
||||||
|
and Gladdy.db.auraBorderStyle == Gladdy.db.petPortraitBorderStyle
|
||||||
|
and Gladdy.db.auraBorderStyle == Gladdy.db.trinketBorderStyle) then
|
||||||
|
return Gladdy.db.auraBorderStyle
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
Gladdy.db.classIconBorderStyle = value
|
|
||||||
Gladdy.db.trinketBorderStyle = value
|
|
||||||
Gladdy.db.castBarIconStyle = value
|
|
||||||
Gladdy.db.auraBorderStyle = value
|
Gladdy.db.auraBorderStyle = value
|
||||||
Gladdy.db.npTotemPlatesBorderStyle = value
|
|
||||||
Gladdy.db.cooldownBorderStyle = value
|
|
||||||
Gladdy.db.buffsBorderStyle = value
|
Gladdy.db.buffsBorderStyle = value
|
||||||
|
Gladdy.db.castBarIconStyle = value
|
||||||
|
Gladdy.db.classIconBorderStyle = value
|
||||||
|
Gladdy.db.ciBorderStyle = value
|
||||||
|
Gladdy.db.cooldownBorderStyle = value
|
||||||
Gladdy.db.drBorderStyle = value
|
Gladdy.db.drBorderStyle = value
|
||||||
|
Gladdy.db.racialBorderStyle = value
|
||||||
|
Gladdy.db.npTotemPlatesBorderStyle = value
|
||||||
|
Gladdy.db.petPortraitBorderStyle = value
|
||||||
|
Gladdy.db.trinketBorderStyle = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -430,11 +509,25 @@ function Gladdy:SetupOptions()
|
|||||||
order = 15,
|
order = 15,
|
||||||
hasAlpha = true,
|
hasAlpha = true,
|
||||||
get = function(info)
|
get = function(info)
|
||||||
local a = Gladdy.db.classIconBorderColor
|
local a = Gladdy.db.auraBuffBorderColor
|
||||||
local b = Gladdy.db.trinketBorderColor
|
local b = Gladdy.db.auraDebuffBorderColor
|
||||||
local c = Gladdy.db.castBarIconColor
|
local c = Gladdy.db.buffsBorderColor
|
||||||
|
local d = Gladdy.db.castBarIconColor
|
||||||
|
local e = Gladdy.db.classIconBorderColor
|
||||||
|
local f = Gladdy.db.ciBorderColor
|
||||||
|
local g = Gladdy.db.cooldownBorderColor
|
||||||
|
local h = Gladdy.db.drBorderColor
|
||||||
|
local i = Gladdy.db.trinketBorderColor
|
||||||
|
local j = Gladdy.db.racialBorderColor
|
||||||
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
||||||
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a) then
|
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a
|
||||||
|
and a.r == d.r and a.g == d.g and a.b == d.b and a.a == d.a
|
||||||
|
and a.r == e.r and a.g == e.g and a.b == e.b and a.a == e.a
|
||||||
|
and a.r == f.r and a.g == f.g and a.b == f.b and a.a == f.a
|
||||||
|
and a.r == g.r and a.g == g.g and a.b == g.b and a.a == g.a
|
||||||
|
and a.r == h.r and a.g == h.g and a.b == h.b and a.a == h.a
|
||||||
|
and a.r == i.r and a.g == i.g and a.b == i.b and a.a == i.a
|
||||||
|
and a.r == j.r and a.g == j.g and a.b == j.b and a.a == j.a) then
|
||||||
return a.r, a.g, a.b, a.a
|
return a.r, a.g, a.b, a.a
|
||||||
else
|
else
|
||||||
return { r = 0, g = 0, b = 0, a = 0 }
|
return { r = 0, g = 0, b = 0, a = 0 }
|
||||||
@ -442,13 +535,16 @@ function Gladdy:SetupOptions()
|
|||||||
end,
|
end,
|
||||||
set = function(info, r, g, b, a)
|
set = function(info, r, g, b, a)
|
||||||
local rgb = {r = r, g = g, b = b, a = a}
|
local rgb = {r = r, g = g, b = b, a = a}
|
||||||
Gladdy.db.classIconBorderColor = rgb
|
Gladdy.db.auraBuffBorderColor = rgb
|
||||||
Gladdy.db.trinketBorderColor = rgb
|
Gladdy.db.auraDebuffBorderColor = rgb
|
||||||
Gladdy.db.castBarIconColor = rgb
|
|
||||||
Gladdy.db.npTotemPlatesBorderColor = rgb
|
|
||||||
Gladdy.db.drBorderColor = rgb
|
|
||||||
Gladdy.db.cooldownBorderColor = rgb
|
|
||||||
Gladdy.db.buffsBorderColor = rgb
|
Gladdy.db.buffsBorderColor = rgb
|
||||||
|
Gladdy.db.castBarIconColor = rgb
|
||||||
|
Gladdy.db.classIconBorderColor = rgb
|
||||||
|
Gladdy.db.ciBorderColor = rgb
|
||||||
|
Gladdy.db.cooldownBorderColor = rgb
|
||||||
|
Gladdy.db.drBorderColor = rgb
|
||||||
|
Gladdy.db.trinketBorderColor = rgb
|
||||||
|
Gladdy.db.racialBorderColor = rgb
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -475,7 +571,8 @@ function Gladdy:SetupOptions()
|
|||||||
local a = Gladdy.db.healthBarTexture
|
local a = Gladdy.db.healthBarTexture
|
||||||
local b = Gladdy.db.powerBarTexture
|
local b = Gladdy.db.powerBarTexture
|
||||||
local c = Gladdy.db.castBarTexture
|
local c = Gladdy.db.castBarTexture
|
||||||
if (a == b and a == c) then
|
local d = Gladdy.db.petHealthBarTexture
|
||||||
|
if (a == b and a == c and a == d) then
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
@ -485,6 +582,7 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.healthBarTexture = value
|
Gladdy.db.healthBarTexture = value
|
||||||
Gladdy.db.powerBarTexture = value
|
Gladdy.db.powerBarTexture = value
|
||||||
Gladdy.db.castBarTexture = value
|
Gladdy.db.castBarTexture = value
|
||||||
|
Gladdy.db.petHealthBarTexture = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
width= "full",
|
width= "full",
|
||||||
@ -500,7 +598,8 @@ function Gladdy:SetupOptions()
|
|||||||
local a = Gladdy.db.healthBarBorderStyle
|
local a = Gladdy.db.healthBarBorderStyle
|
||||||
local b = Gladdy.db.powerBarBorderStyle
|
local b = Gladdy.db.powerBarBorderStyle
|
||||||
local c = Gladdy.db.castBarBorderStyle
|
local c = Gladdy.db.castBarBorderStyle
|
||||||
if (a == b and a == c) then
|
local d = Gladdy.db.petHealthBarBorderStyle
|
||||||
|
if (a == b and a == c and a == d) then
|
||||||
return a
|
return a
|
||||||
else
|
else
|
||||||
return ""
|
return ""
|
||||||
@ -510,6 +609,7 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.healthBarBorderStyle = value
|
Gladdy.db.healthBarBorderStyle = value
|
||||||
Gladdy.db.powerBarBorderStyle = value
|
Gladdy.db.powerBarBorderStyle = value
|
||||||
Gladdy.db.castBarBorderStyle = value
|
Gladdy.db.castBarBorderStyle = value
|
||||||
|
Gladdy.db.petHealthBarBorderStyle = value
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -531,8 +631,10 @@ function Gladdy:SetupOptions()
|
|||||||
local a = Gladdy.db.castBarBorderColor
|
local a = Gladdy.db.castBarBorderColor
|
||||||
local b = Gladdy.db.healthBarBorderColor
|
local b = Gladdy.db.healthBarBorderColor
|
||||||
local c = Gladdy.db.powerBarBorderColor
|
local c = Gladdy.db.powerBarBorderColor
|
||||||
|
local d = Gladdy.db.petHealthBarBorderColor
|
||||||
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
if (a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a
|
||||||
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a) then
|
and a.r == c.r and a.g == c.g and a.b == c.b and a.a == c.a
|
||||||
|
and a.r == d.r and a.g == d.g and a.b == d.b and a.a == d.a) then
|
||||||
return a.r, a.g, a.b, a.a
|
return a.r, a.g, a.b, a.a
|
||||||
else
|
else
|
||||||
return { r = 0, g = 0, b = 0, a = 0 }
|
return { r = 0, g = 0, b = 0, a = 0 }
|
||||||
@ -543,6 +645,7 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy.db.castBarBorderColor = rgb
|
Gladdy.db.castBarBorderColor = rgb
|
||||||
Gladdy.db.healthBarBorderColor = rgb
|
Gladdy.db.healthBarBorderColor = rgb
|
||||||
Gladdy.db.powerBarBorderColor = rgb
|
Gladdy.db.powerBarBorderColor = rgb
|
||||||
|
Gladdy.db.petHealthBarBorderColor = rgb
|
||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -597,8 +700,14 @@ function Gladdy:GetAuras(auraType)
|
|||||||
name = "Check All",
|
name = "Check All",
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(Gladdy.dbi.profile.trackedDebuffs) do
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
Gladdy.dbi.profile.trackedDebuffs[k] = true
|
for k,v in pairs(Gladdy.defaults.profile.trackedDebuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedDebuffs[k] = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for k,v in pairs(Gladdy.defaults.profile.trackedBuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedBuffs[k] = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -608,8 +717,14 @@ function Gladdy:GetAuras(auraType)
|
|||||||
name = "Uncheck All",
|
name = "Uncheck All",
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(Gladdy.dbi.profile.trackedDebuffs) do
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
Gladdy.dbi.profile.trackedDebuffs[k] = false
|
for k,v in pairs(Gladdy.defaults.profile.trackedDebuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedDebuffs[k] = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for k,v in pairs(Gladdy.defaults.profile.trackedBuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedBuffs[k] = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -689,13 +804,12 @@ function Gladdy:GetAuras(auraType)
|
|||||||
local defaultDebuffs = {}
|
local defaultDebuffs = {}
|
||||||
local assignForClass = function(class)
|
local assignForClass = function(class)
|
||||||
local args = {}
|
local args = {}
|
||||||
local classSpells = auraType == "debuff" and LibClassAuras.GetClassDebuffs(class) or LibClassAuras.GetClassBuffs(class)
|
local classSpells = auraType == AURA_TYPE_DEBUFF and LibClassAuras.GetClassDebuffs(class) or LibClassAuras.GetClassBuffs(class)
|
||||||
table.sort(classSpells, function(a, b)
|
table.sort(classSpells, function(a, b)
|
||||||
return a.name:upper() < b.name:upper()
|
return a.name:upper() < b.name:upper()
|
||||||
end)
|
end)
|
||||||
for i=1, #classSpells do
|
for i=1, #classSpells do
|
||||||
local spellName, _, texture = GetSpellInfo(classSpells[i].id[#classSpells[i].id])
|
local _, _, texture = GetSpellInfo(classSpells[i].id[#classSpells[i].id])
|
||||||
--spellName = (classSpells[i].id[#classSpells[i].id] == 31117 or classSpells[i].id[#classSpells[i].id] == 43523) and "Unstable Affliction Silence" or spellName
|
|
||||||
if classSpells[i].texture then
|
if classSpells[i].texture then
|
||||||
texture = classSpells[i].texture
|
texture = classSpells[i].texture
|
||||||
end
|
end
|
||||||
@ -704,8 +818,8 @@ function Gladdy:GetAuras(auraType)
|
|||||||
name = classSpells[i].name,
|
name = classSpells[i].name,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
image = texture,
|
image = texture,
|
||||||
width = "2",
|
width = "full",
|
||||||
arg = classSpells[i].name
|
arg = tostring(classSpells[i].id[1])
|
||||||
}
|
}
|
||||||
defaultDebuffs[tostring(classSpells[i].id[1])] = true
|
defaultDebuffs[tostring(classSpells[i].id[1])] = true
|
||||||
end
|
end
|
||||||
|
121
README.md
121
README.md
@ -1,31 +1,47 @@
|
|||||||
# Gladdy - TBC
|
# Gladdy - TBC
|
||||||
|
|
||||||
### The most powerful arena addon for WoW TBC 2.5.1
|
### The most powerful arena addon for WoW TBC 2.5.1
|
||||||
## [v1.0.5-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.0.5-Beta/Gladdy_TBC-Classic_v1.0.5-Beta.zip)
|
## [v1.15-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.15-Beta/Gladdy_TBC-Classic_v1.15-Beta.zip)
|
||||||
|
|
||||||
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
||||||
|
|
||||||
### Origin
|
### Origin
|
||||||
|
|
||||||
Based on https://github.com/Schaka/gladdy
|
Based on https://github.com/miraage/gladdy
|
||||||
|
|
||||||
### Motivation for this edit
|
### Motivation for this edit
|
||||||
|
|
||||||
The goal is to make Gladdy highly configurable in it's appearance. Everything can be arranged left or right independently. Also I gave Gladdy a new look with black borders. A lot can be configured.
|
The goal is to make Gladdy highly configurable in it's appearance. Everything can be arranged left or right independently. Also I gave Gladdy a new look with black borders. A lot can be configured.
|
||||||
|
|
||||||
### Modules:
|
### Modules:
|
||||||
- Announcement (drink, trinket usage, spec detection ...)
|
- **Announcement** (drink, trinket usage, spec detection ...)
|
||||||
- ArenaCountDown
|
- **ArenaCountDown**
|
||||||
- Auras (show important (de)buffs in the class icon)
|
- **Auras** (show important (de)buffs as well as interrupts on the class icon)
|
||||||
- Cooldown (tracks important cooldowns)
|
- **BuffsDebuffs** (show buffs and debuffs on arena frames - can be filtered)
|
||||||
- Diminishing (tracks DRs)
|
- **CastBar** (shows a castbar, can be disabled)
|
||||||
- ExportImport (share your profile with your friends in the form of a string, which can be imported)
|
- **ClassIcon** (or specicon, once detected)
|
||||||
- Highlight (highlights focus and target)
|
- **Clicks** (bind spells or macros to click actions)
|
||||||
- Pets (show arena pets)
|
- **CombatIndicator** (shows a sword icon if unit is in combat)
|
||||||
- TotemPlates (show totem icons instead of normal nameplates)
|
- **Cooldown** (tracks important cooldowns)
|
||||||
- Trinket (tracks trinket usage)
|
- **Diminishing** (tracks DRs)
|
||||||
- VersionCheck (checks if you use an older version that your teammate)
|
- **ExportImport** (share your profile with your friends in the form of a string, which can be imported)
|
||||||
- XiconProfiles (predefined profiles to start your configuration from)
|
- **Highlight** (highlights focus and target)
|
||||||
|
- **Pets** (show arena pets)
|
||||||
|
- **Racial** (show arena racial cooldowns)
|
||||||
|
- **Range Check** (checks the range to a unit by a configurable spell)
|
||||||
|
- **Shadowsight Timer** (shows a little movable frame with time left until Shadow Eyes spawn)
|
||||||
|
- **TotemPlates** (show totem icons instead of normal nameplates, compatible with **Plater, NeatPlates, KUI, ThreatPlates, ElvUI, TukUI**)
|
||||||
|
- **Trinket** (tracks trinket usage)
|
||||||
|
- **VersionCheck** (checks if you use an older version that your teammate)
|
||||||
|
- **XiconProfiles** (predefined profiles to start your configuration from)
|
||||||
|
|
||||||
|
### Valid Slash commands
|
||||||
|
|
||||||
|
- **/gladdy ui** (shows config)
|
||||||
|
- **/gladdy test** (standard 3v3 test mode)
|
||||||
|
- **/gladdy test1** to **/gladdy test5** (test mode with 1-5 frames active)
|
||||||
|
- **/gladdy hide** (hides the frames)
|
||||||
|
- **/gladdy reset** (resets current profile to default settings)
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
@ -33,8 +49,85 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca
|
|||||||
<img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/sample2.jpg" align="right" width="48.5%">
|
<img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/sample2.jpg" align="right" width="48.5%">
|
||||||
<img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/sample3.png" width="48.5%">
|
<img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/sample3.png" width="48.5%">
|
||||||
|
|
||||||
|
## Special Thanks
|
||||||
|
|
||||||
|
- **miraage** - the origininal author of Gladdy! Your work set the foundation for this edit. Thanks!
|
||||||
|
- **Schaka** - the maintainer of Gladdy! (thanks for letting me continue Gladdy and all the work you put into the TBC community)
|
||||||
|
- **Macumba** (thanks for all the support, your feedback and your dedication for the TBC community)
|
||||||
|
- **RMO** (without you I would not have modified Gladdy at all and thanks for all the suggestions and active feedback)
|
||||||
|
- **Ur0b0r0s aka DrainTheLock** (thanks for testing, giving feedback and correcting/adding wrong CDs)
|
||||||
|
- **Klimp** (thanks for all the suggestions and active feedback)
|
||||||
|
- **the whole TBC addons 2.4.3 discord** (thanks for the support and great community, especially the MVPs)
|
||||||
|
- **Hydra** (thanks for constructive feedback and suggestions)
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
|
### v1.15-Beta
|
||||||
|
- hotfix added entangling roots nature's grasp
|
||||||
|
|
||||||
|
### v1.14-Beta
|
||||||
|
- hotfix for secure button grow direction up
|
||||||
|
|
||||||
|
### v1.13-Beta
|
||||||
|
- frames behave now to mouseover macros
|
||||||
|
- added Range Check module (configurable which spell is used for range check)
|
||||||
|
- added Shadowsight Timer module (with announce)
|
||||||
|
- added Clicks module
|
||||||
|
- added Interrupt Tracker in Aura module (border color by spell school locked)
|
||||||
|
- TotemPlates compatible with Plater, NeatPlates, KUI, ThreatPlates, ElvUI, TukUI
|
||||||
|
- added a new Classic Profile in XiconProfiles
|
||||||
|
- hide blizzard arena frames option added in General
|
||||||
|
- castbar enable/disable
|
||||||
|
- powerbar enable/disable
|
||||||
|
- added some auras (Blackout, Improved Hamstring, Mace Stun, Stormherald Stun, Shadowsight Buff)
|
||||||
|
- added Swiftmend and Berserker Rage cooldowns
|
||||||
|
- changed textures for Mace Stun, Charge Stun and Intercept Stun
|
||||||
|
- reduced BLP size by 80%
|
||||||
|
- show XiconProfiles on first login
|
||||||
|
- DR bigger icons possible
|
||||||
|
- minor fixes
|
||||||
|
|
||||||
|
### v1.12-Beta
|
||||||
|
- fix classic profile
|
||||||
|
|
||||||
|
### v1.11-Beta
|
||||||
|
- TotemPlates fix after blizzard update
|
||||||
|
|
||||||
|
### v1.10-Beta
|
||||||
|
- fix german and russian client not working
|
||||||
|
- ArenaCountdown loacalization now working for all languages (except itIT...beta has no option to select italian)
|
||||||
|
- Race and Class localization working for all languages
|
||||||
|
- Localization finished for German
|
||||||
|
|
||||||
|
#### v1.09-Beta
|
||||||
|
- fix Blizzard profile not having all modules preconfigured
|
||||||
|
|
||||||
|
#### v1.08-Beta
|
||||||
|
- fix Buffs not showing on class icon
|
||||||
|
- added option highlight to be inside
|
||||||
|
- added option to grow frames vertically
|
||||||
|
- added new profile to XiconProfile (Blizzard raid style)
|
||||||
|
- minor bugfixes
|
||||||
|
|
||||||
|
#### v1.07-Beta
|
||||||
|
|
||||||
|
- CombatIndicator module added
|
||||||
|
- spec icon option added to Classicon module
|
||||||
|
- arena1-5 for name option added
|
||||||
|
- add a couple buffs to LibClassAuras
|
||||||
|
- add blessing of sacrifice and intervene to auras
|
||||||
|
- general options updated to apply font/borders/etc for all frames
|
||||||
|
- XiconProfiles updated
|
||||||
|
- /gladdy test1-5 now possible
|
||||||
|
- fix PowerBar text updates
|
||||||
|
- click through frames exept health/power bar
|
||||||
|
- add mask texture for icons
|
||||||
|
|
||||||
|
#### v1.06-Beta
|
||||||
|
- fixed BuffsDebuff module
|
||||||
|
- fix racial texture reset
|
||||||
|
- minor bugfixes
|
||||||
|
|
||||||
#### v1.0.5-Beta
|
#### v1.0.5-Beta
|
||||||
- fixed Aura-Module
|
- fixed Aura-Module
|
||||||
- Racial module added to EventListener and Version check updated
|
- Racial module added to EventListener and Version check updated
|
||||||
|
@ -14,4 +14,5 @@
|
|||||||
<Include file="libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
|
<Include file="libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
|
||||||
<Include file="libs\DRData-1.0\DRData-1.0.xml"/>
|
<Include file="libs\DRData-1.0\DRData-1.0.xml"/>
|
||||||
<Include file="libs\LibClassAuras-1.0\lib.xml"/>
|
<Include file="libs\LibClassAuras-1.0\lib.xml"/>
|
||||||
|
<Include file="libs\LibSpellRange-1.0\lib.xml"/>
|
||||||
</Ui>
|
</Ui>
|
Reference in New Issue
Block a user