This commit is contained in:
Sumsebrum 2021-06-15 09:06:50 +02:00
parent 779e81727c
commit 5972ef8c05
9 changed files with 41 additions and 34 deletions

View File

@ -1,7 +1,6 @@
local select, string_gsub, tostring = select, string.gsub, tostring
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF
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_SUCCEEDED")
self:SetScript("OnEvent", EventListener.OnEvent)
Gladdy:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", UnitName("player"))
end
function EventListener:Reset()
@ -80,17 +78,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
local srcUnit = Gladdy.guids[sourceGUID]
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
-- diminish tracker
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 updateReason == "seen" then
-- ENEMY_SPOTTED
if button and not button.class then
Gladdy:SpotEnemy(unit, true)
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)
if button then
Gladdy:SendMessage("ENEMY_STEALTH", unit, false)
if not button.class then
Gladdy:SpotEnemy(unit, true)
end
end
if pet then
Gladdy:SendMessage("PET_SPOTTED", unit)
@ -156,9 +142,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
elseif updateReason == "unseen" then
-- STEALTH
if button then
Gladdy:SendMessage("ENEMY_STEALTH", unit)
button.healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1)
button.stealthed = true
Gladdy:SendMessage("ENEMY_STEALTH", unit, true)
end
if pet then
Gladdy:SendMessage("PET_STEALTH", unit)
@ -213,7 +197,7 @@ function EventListener:UNIT_AURA(unit)
end
if not button.spec and Gladdy.specBuffs[spellName] then
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])
end
end
@ -252,7 +236,3 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit)
end
end
end
function EventListener:GetOptions()
return nil
end

BIN
Images/Square_FullWhite.tga Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -387,6 +387,7 @@ function Diminishings:GetOptions()
min = 5,
max = 50,
step = 1,
width = "full",
}),
drWidthFactor = Gladdy:option({
type = "range",
@ -396,6 +397,7 @@ function Diminishings:GetOptions()
min = 0.5,
max = 2,
step = 0.05,
width = "full",
}),
drIconPadding = Gladdy:option({
type = "range",
@ -405,6 +407,7 @@ function Diminishings:GetOptions()
min = 0,
max = 10,
step = 0.1,
width = "full",
}),
},
},
@ -431,6 +434,7 @@ function Diminishings:GetOptions()
max = 1,
step = 0.1,
order = 9,
width = "full",
}),
},
},
@ -467,6 +471,7 @@ function Diminishings:GetOptions()
min = 0.1,
max = 2,
step = 0.1,
width = "full",
}),
}
},
@ -502,6 +507,7 @@ function Diminishings:GetOptions()
min = -400,
max = 400,
step = 0.1,
width = "full",
}),
drYOffset = Gladdy:option({
type = "range",
@ -510,6 +516,7 @@ function Diminishings:GetOptions()
min = -400,
max = 400,
step = 0.1,
width = "full",
}),
},
},

View File

@ -368,6 +368,7 @@ function Healthbar:GetOptions()
min = 10,
max = 100,
step = 1,
width = "full",
}),
healthBarTexture = option({
type = "select",
@ -419,6 +420,7 @@ function Healthbar:GetOptions()
step = 0.1,
min = 0,
max = 20,
width = "full",
}),
healthBarHealthFontSize = option({
type = "range",
@ -428,6 +430,7 @@ function Healthbar:GetOptions()
step = 0.1,
min = 0,
max = 20,
width = "full",
}),
},
},
@ -456,6 +459,7 @@ function Healthbar:GetOptions()
min = 0.5,
max = Gladdy.db.healthBarHeight/2,
step = 0.5,
width = "full",
}),
healthBarBorderColor = Gladdy:colorOption({
type = "color",

View File

@ -156,7 +156,7 @@ function Pets:CreateFrame(unitId)
healthBar:SetAllPoints(button)
healthBar:SetAlpha(0)
healthBar.portrait = healthBar:CreateTexture(nil, "OVERLAY")
healthBar.portrait = healthBar:CreateTexture(nil, "BACKGROUND")
healthBar.portrait:SetPoint("LEFT", healthBar, "RIGHT")
healthBar.portrait:SetTexCoord(0.1, 0.9, 0.1, 0.9)
SetPortraitTexture(healthBar.portrait, "player")
@ -368,6 +368,7 @@ function Pets:GetOptions()
min = 10,
max = 100,
step = 1,
width = "full",
}),
petWidth = option({
type = "range",
@ -377,6 +378,7 @@ function Pets:GetOptions()
min = 10,
max = 300,
step = 1,
width = "full",
}),
petHealthBarTexture = option({
type = "select",
@ -458,6 +460,7 @@ function Pets:GetOptions()
order = 13,
min = 0,
max = 20,
width = "full",
}),
},
},
@ -486,6 +489,7 @@ function Pets:GetOptions()
min = 0.5,
max = Gladdy.db.petHeight/2,
step = 0.5,
width = "full",
}),
petHealthBarBorderColor = Gladdy:colorOption({
type = "color",
@ -513,6 +517,7 @@ function Pets:GetOptions()
min = -600,
max = 600,
step = 0.1,
width = "full",
}),
petYOffset = Gladdy:option({
type = "range",
@ -521,6 +526,7 @@ function Pets:GetOptions()
min = -600,
max = 600,
step = 0.1,
width = "full",
}),
}
},

View File

@ -62,12 +62,12 @@ local function iconTimer(self,elapsed)
elseif timeLeft <= 10 and timeLeft >= 5 then
-- between 10s and 5s (orange)
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")
elseif timeLeft < 5 and timeLeft > 0 then
-- between 5s and 1s (red)
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")
else
self.cooldownFont:SetText("")
@ -246,6 +246,7 @@ function Racial:GetOptions()
max = 100,
step = 1,
order = 2,
width = "full",
}),
racialWidthFactor = Gladdy:option({
type = "range",
@ -254,6 +255,7 @@ function Racial:GetOptions()
max = 2,
step = 0.05,
order = 3,
width = "full",
}),
},
},
@ -280,6 +282,7 @@ function Racial:GetOptions()
max = 1,
step = 0.1,
order = 8,
width = "full",
}),
},
},
@ -309,6 +312,7 @@ function Racial:GetOptions()
min = 0.1,
max = 2,
step = 0.1,
width = "full",
}),
},
},
@ -353,6 +357,7 @@ function Racial:GetOptions()
min = -400,
max = 400,
step = 0.1,
width = "full",
}),
racialYOffset = Gladdy:option({
type = "range",
@ -361,6 +366,7 @@ function Racial:GetOptions()
min = -400,
max = 400,
step = 0.1,
width = "full",
}),
},
},

View File

@ -56,12 +56,12 @@ local function iconTimer(self, elapsed)
elseif timeLeft <= 10 and timeLeft >= 5 then
-- between 10s and 5s (orange)
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")
elseif timeLeft < 5 and timeLeft > 0 then
-- between 5s and 1s (red)
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")
else
self.cooldownFont:SetText("")
@ -249,6 +249,7 @@ function Trinket:GetOptions()
max = 100,
step = 1,
order = 4,
width = "full",
}),
trinketWidthFactor = Gladdy:option({
type = "range",
@ -257,6 +258,7 @@ function Trinket:GetOptions()
max = 2,
step = 0.05,
order = 6,
width = "full",
}),
},
},
@ -283,6 +285,7 @@ function Trinket:GetOptions()
max = 1,
step = 0.1,
order = 8,
width = "full",
}),
},
},
@ -312,6 +315,7 @@ function Trinket:GetOptions()
min = 0.1,
max = 2,
step = 0.1,
width = "full",
}),
},
},

View File

@ -27,7 +27,7 @@ end
function XiconProfiles:ApplyClassic()
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfile())
if deserialized then
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
end
Gladdy:Reset()
Gladdy:HideFrame()