Release Candidate 3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## Interface: 90207
|
||||
## Interface: 100002
|
||||
## Title: Lib: LibDFramework-1.0
|
||||
## Notes: Base Framework for many Addons
|
||||
|
||||
|
||||
+6
-1
@@ -22,7 +22,11 @@ do
|
||||
["MONK"] = {0.0, 1.00, 0.59},
|
||||
["DEMONHUNTER"] = {0.64, 0.19, 0.79},
|
||||
["EVOKER"] = {0.20, 0.58, 0.50},
|
||||
|
||||
|
||||
["dark1"] = {0.1215, 0.1176, 0.1294},
|
||||
["dark2"] = {0.2215, 0.2176, 0.2294},
|
||||
["dark3"] = {0.3215, 0.3176, 0.3294},
|
||||
|
||||
["aliceblue"] = {0.941176, 0.972549, 1, 1},
|
||||
["antiquewhite"] = {0.980392, 0.921569, 0.843137, 1},
|
||||
["aqua"] = {0, 1, 1, 1},
|
||||
@@ -67,6 +71,7 @@ do
|
||||
["dimgrey"] = {0.411765, 0.411765, 0.411765, 1},
|
||||
["dodgerblue"] = {0.117647, 0.564706, 1, 1},
|
||||
["firebrick"] = {0.698039, 0.133333, 0.133333, 1},
|
||||
["firebrickdark"] = {0.258039, 0.033333, 0.033333, 1},
|
||||
["floralwhite"] = {1, 0.980392, 0.941176, 1},
|
||||
["forestgreen"] = {0.133333, 0.545098, 0.133333, 1},
|
||||
["fuchsia"] = {1, 0, 1, 1},
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 393
|
||||
local dversion = 395
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary(major, minor)
|
||||
|
||||
|
||||
+48
-2
@@ -7625,6 +7625,9 @@ detailsFramework.CastFrameFunctions = {
|
||||
{"UNIT_SPELLCAST_CHANNEL_START"},
|
||||
{"UNIT_SPELLCAST_CHANNEL_UPDATE"},
|
||||
{"UNIT_SPELLCAST_CHANNEL_STOP"},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_START"},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_UPDATE"},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_EMPOWER_STOP"},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_INTERRUPTIBLE"},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_SPELLCAST_NOT_INTERRUPTIBLE"},
|
||||
{"PLAYER_ENTERING_WORLD"},
|
||||
@@ -7644,6 +7647,8 @@ detailsFramework.CastFrameFunctions = {
|
||||
CanLazyTick = true, --if true, it'll execute the lazy tick function, it ticks in a much slower pace comparece with the regular tick
|
||||
LazyUpdateCooldown = 0.2, --amount of time to wait for the next lazy update, this updates non critical things like the cast timer
|
||||
|
||||
ShowEmpoweredDuration = true, --full hold time for empowered spells
|
||||
|
||||
FillOnInterrupt = true,
|
||||
HideSparkOnInterrupt = true,
|
||||
|
||||
@@ -8228,12 +8233,40 @@ detailsFramework.CastFrameFunctions = {
|
||||
end,
|
||||
|
||||
UpdateChannelInfo = function(self, unit, ...)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID = UnitChannelInfo (unit)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID, _, numStages = UnitChannelInfo (unit)
|
||||
|
||||
--is valid?
|
||||
if (not self:IsValid (unit, name, isTradeSkill, true)) then
|
||||
return
|
||||
end
|
||||
|
||||
--empowered?
|
||||
self.empStages = {}
|
||||
if numStages and numStages > 0 then
|
||||
self.holdAtMaxTime = GetUnitEmpowerHoldAtMaxTime(unit)
|
||||
self.empowered = true
|
||||
|
||||
local lastStageEndTime = 0
|
||||
for i = 1, numStages do
|
||||
self.empStages[i] = {
|
||||
start = lastStageEndTime,
|
||||
finish = lastStageEndTime - GetUnitEmpowerStageDuration(unit, i - 1) / 1000,
|
||||
}
|
||||
lastStageEndTime = self.empStages[i].finish
|
||||
|
||||
if startTime / 1000 + lastStageEndTime <= GetTime() then
|
||||
self.curStage = i
|
||||
end
|
||||
end
|
||||
|
||||
if (self.Settings.ShowEmpoweredDuration) then
|
||||
endTime = endTime + self.holdAtMaxTime
|
||||
end
|
||||
else
|
||||
self.holdAtMaxTime = 0
|
||||
self.empowered = false
|
||||
self.curStage = 0
|
||||
end
|
||||
|
||||
--setup cast
|
||||
self.casting = nil
|
||||
@@ -8250,6 +8283,7 @@ detailsFramework.CastFrameFunctions = {
|
||||
self.spellEndTime = endTime / 1000
|
||||
self.value = self.spellEndTime - GetTime()
|
||||
self.maxValue = self.spellEndTime - self.spellStartTime
|
||||
self.numStages = numStages
|
||||
|
||||
self:SetMinMaxValues(0, self.maxValue)
|
||||
self:SetValue(self.value)
|
||||
@@ -8366,6 +8400,18 @@ detailsFramework.CastFrameFunctions = {
|
||||
self:UpdateCastColor()
|
||||
end
|
||||
end,
|
||||
|
||||
UNIT_SPELLCAST_EMPOWER_START = function(self, unit, ...)
|
||||
self:UNIT_SPELLCAST_CHANNEL_START(unit, ...)
|
||||
end,
|
||||
|
||||
UNIT_SPELLCAST_EMPOWER_UPDATE = function(self, unit, ...)
|
||||
self:UNIT_SPELLCAST_CHANNEL_UPDATE(unit, ...)
|
||||
end,
|
||||
|
||||
UNIT_SPELLCAST_EMPOWER_STOP = function(self, unit, ...)
|
||||
self:UNIT_SPELLCAST_CHANNEL_STOP(unit, ...)
|
||||
end,
|
||||
|
||||
UNIT_SPELLCAST_FAILED = function(self, unit, ...)
|
||||
local unitID, castID, spellID = ...
|
||||
@@ -8431,7 +8477,7 @@ detailsFramework.CastFrameFunctions = {
|
||||
end,
|
||||
|
||||
UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, unit, ...)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo (unit)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID, _, numStages = UnitChannelInfo (unit)
|
||||
|
||||
if (not self:IsValid (unit, name, isTradeSkill)) then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user