cleanup
This commit is contained in:
parent
779e81727c
commit
5972ef8c05
@ -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()
|
||||||
@ -80,17 +78,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
|||||||
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
|
||||||
@ -143,12 +130,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:SendMessage("ENEMY_STEALTH", unit, false)
|
||||||
|
if not button.class then
|
||||||
Gladdy:SpotEnemy(unit, true)
|
Gladdy:SpotEnemy(unit, true)
|
||||||
end
|
end
|
||||||
if button and button.stealthed then
|
|
||||||
local class = Gladdy.buttons[unit].class
|
|
||||||
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 +142,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)
|
||||||
@ -213,7 +197,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 +236,3 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:GetOptions()
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
BIN
Images/Square_FullWhite.tga
Normal file
BIN
Images/Square_FullWhite.tga
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -387,6 +387,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 5,
|
min = 5,
|
||||||
max = 50,
|
max = 50,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
drWidthFactor = Gladdy:option({
|
drWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -396,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",
|
||||||
@ -405,6 +407,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 0,
|
min = 0,
|
||||||
max = 10,
|
max = 10,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -431,6 +434,7 @@ function Diminishings:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 9,
|
order = 9,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -467,6 +471,7 @@ function Diminishings:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -502,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",
|
||||||
@ -510,6 +516,7 @@ function Diminishings:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -368,6 +368,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",
|
||||||
@ -419,6 +420,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",
|
||||||
@ -428,6 +430,7 @@ function Healthbar:GetOptions()
|
|||||||
step = 0.1,
|
step = 0.1,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -456,6 +459,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",
|
||||||
|
@ -156,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")
|
||||||
@ -368,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",
|
||||||
@ -377,6 +378,7 @@ function Pets:GetOptions()
|
|||||||
min = 10,
|
min = 10,
|
||||||
max = 300,
|
max = 300,
|
||||||
step = 1,
|
step = 1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
petHealthBarTexture = option({
|
petHealthBarTexture = option({
|
||||||
type = "select",
|
type = "select",
|
||||||
@ -458,6 +460,7 @@ function Pets:GetOptions()
|
|||||||
order = 13,
|
order = 13,
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 20,
|
max = 20,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -486,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",
|
||||||
@ -513,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",
|
||||||
@ -521,6 +526,7 @@ function Pets:GetOptions()
|
|||||||
min = -600,
|
min = -600,
|
||||||
max = 600,
|
max = 600,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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("")
|
||||||
@ -246,6 +246,7 @@ function Racial:GetOptions()
|
|||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 2,
|
order = 2,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
racialWidthFactor = Gladdy:option({
|
racialWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -254,6 +255,7 @@ function Racial:GetOptions()
|
|||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 3,
|
order = 3,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -280,6 +282,7 @@ function Racial:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -309,6 +312,7 @@ function Racial:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -353,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",
|
||||||
@ -361,6 +366,7 @@ function Racial:GetOptions()
|
|||||||
min = -400,
|
min = -400,
|
||||||
max = 400,
|
max = 400,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -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("")
|
||||||
@ -249,6 +249,7 @@ function Trinket:GetOptions()
|
|||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
order = 4,
|
order = 4,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
trinketWidthFactor = Gladdy:option({
|
trinketWidthFactor = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
@ -257,6 +258,7 @@ function Trinket:GetOptions()
|
|||||||
max = 2,
|
max = 2,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
order = 6,
|
order = 6,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -283,6 +285,7 @@ function Trinket:GetOptions()
|
|||||||
max = 1,
|
max = 1,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
order = 8,
|
order = 8,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -312,6 +315,7 @@ function Trinket:GetOptions()
|
|||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 2,
|
max = 2,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
width = "full",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user